From 4cbb62b0907a2adb29c16f58f53dc96e94aeb68f Mon Sep 17 00:00:00 2001 From: Utkarsh Singh Date: Fri, 31 Mar 2017 13:04:39 +0530 Subject: [PATCH] Committed code regarding black border issue in CI and CA. --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js | 20 ++++++++++---------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js | 14 +++++++++++++- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js index 840a3af..fa84f25 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js @@ -576,17 +576,17 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout "slug": $rootScope.currentSlug }); + + var jspContentHeight = $('.jsPanel-content').height(); + var videoHeight = $('#divplayerinlineVideo div').height(); + if (videoHeight <= 0) + videoHeight = 360; + var textH = $('.well').height(); + textH = textH + 40; + var blackBorderHeight = jspContentHeight - (videoHeight + textH); + if ($('.jsPanel-content').length > 0) { - if ($('.jsPanel-content').height() - $('#canvasDiv').height() > 300) { - $('.well').css('margin-bottom', $('.jsPanel-content').height() - $('#canvasDiv').height() + 150); - } - if ($('.jsPanel-content').height() - $('#canvasDiv').height() > 200) { - $('.well').css('margin-bottom', $('.jsPanel-content').height() - $('#canvasDiv').height() + 80); - } - if ($('.jsPanel-content').height() - $('#canvasDiv').height() > 100) { - $('.well').css('margin-bottom', $('.jsPanel-content').height() - $('#canvasDiv').height() + 50); - } - //$('.well').css('margin-bottom', $('.jsPanel-content').height() - $('#canvasDiv').height() + 20); + $('.well').css('margin-bottom', blackBorderHeight); $('#divplayerinlineVideo').css('background', '#fff'); } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js index f73c972..01eb827 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js @@ -608,7 +608,19 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout "slug": $rootScope.currentSlug }); - + var jspContentHeight = $('.jsPanel-content').height(); + var imgHeight = $('.img-thumbnail').find('img').height(); + if (imgHeight <= 0) + imgHeight = 320; + var textH = $('.well').height(); + textH = textH + 40; + var blackBorderHeight = jspContentHeight - (imgHeight + textH); + if ($('.jsPanel-content').length > 0) { + $('.jsPanel-btn-min').attr('style', 'display: none'); + $('.jsPanel-btn-max').attr('style', 'display: none'); + $('.jsPanel-btn-norm').attr('style', 'display: none'); + $('.well').css('margin-bottom', blackBorderHeight); + } } -- libgit2 0.21.4