diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index a82c89d..f896ad0 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -4255,6 +4255,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic }; $rootScope.ShowPrintPreviewWindow = function (event) { // Print Preview + if ($location.url() == "/module-item-view") { + if ($("#hidePinBtn").hasClass("btn-primary")) { + $rootScope.isHidePinBtnActiveInPrintPreview = true; + } + if ($("#selectedPin").hasClass("btn-primary")) { + $rootScope.isShowSelectedPinActiveInPrintPrevMode = true; + } + if ($("#allPinBtn").hasClass("btn-primary")) { + $rootScope.isShowAllPinBtnActiveInPrintPreviewMode = true; + } + } $(".tools").css("z-index", "1029"); $rootScope.CloseListManager(); $rootScope.CloseAnnotationTool(); @@ -4319,6 +4330,13 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic } } }); + + if ($location.url() == "/module-item-view") { + $timeout(function () { + $rootScope.hidePins(); + }, 100); + } + }; function OpenJSPanel() { diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index fe915d4..2f533c3 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -303,10 +303,28 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $rootScope.searchSelectedText = ''; }); + + $(document).on("click", "#dvPrintPreview .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { + + if ($rootScope.isShowAllPinBtnActiveInPrintPreviewMode == true) { + $("#allPinBtn").trigger("click"); + $rootScope.isShowAllPinBtnActiveInPrintPreviewMode = false; + } + if ($rootScope.isHidePinBtnActiveInPrintPreview == true) { + $("#hidePinBtn").trigger("click"); + $rootScope.isHidePinBtnActiveInPrintPreview = false; + } + if($rootScope.isShowSelectedPinActiveInPrintPrevMode == true) + { + $("#selectedPin").trigger("click"); + $rootScope.isShowSelectedPinActiveInPrintPrevMode = false; + } + }); + }) $rootScope.aaPinDataArray = []; $scope.showAllPins = function () { - + $scope.allPinDataArray = []; var promise = ModuleService.getPinDataForImage($rootScope.imageName) @@ -1341,11 +1359,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } } - $scope.hidePins = function () { + $rootScope.hidePins = function () { $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); - $scope.hideSpeechBubble(); $scope.isHidePinBtnClicked = true; @@ -1372,12 +1389,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } $scope.showAllPinsAfterHide = function (event) { - - $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); - - $scope.isHidePinBtnClicked = false; if ($scope.selectedSystemName != null && $scope.selectedSystemName != undefined) { @@ -1402,7 +1415,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.showSelectedPins = function () { - $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -1720,9 +1732,9 @@ function showSelectedSystemPins(event) { function hidePins(event) { - var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); - scope.$apply(function () { - scope.hidePins(event); + var rootScope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); + rootScope.$apply(function () { + rootScope.hidePins(event); }); }