Commit 04d90b3234581268114cd60f81dbd771304fba88

Authored by Amrita Vishnoi
2 parents 81b18dd3 06c391d7

Merge branch '#23687' into Develop

400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... ... @@ -324,7 +324,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
324 324 })
325 325 $rootScope.aaPinDataArray = [];
326 326 $scope.showAllPins = function () {
327   -
  327 +
328 328 $scope.allPinDataArray = [];
329 329 var promise = ModuleService.getPinDataForImage($rootScope.imageName)
330 330  
... ... @@ -576,7 +576,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
576 576 }
577 577  
578 578 $scope.showSelectedSystemPins = function (event) {
579   -
580 579 var bodySystemListObj = document.getElementById("bodySystemList").getElementsByTagName("a");
581 580 var bodySystemListlength = bodySystemListObj.length;
582 581 for (var i = 0; i < bodySystemListlength; i++) {
... ... @@ -655,7 +654,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
655 654 }
656 655  
657 656 $scope.showAnnotation = function (selectedPinData, isCtrlPressed, isPinClicked, isItemSearched) {
658   -
  657 + $scope.clickedPins = [];
659 658 $scope.selectedPin = [];
660 659 var isSameTermWithMultiPin = false;
661 660 var firstPinId = selectedPinData[0]._PinId;
... ... @@ -713,13 +712,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
713 712  
714 713 angular.forEach(pinDataWithFirstTermNumber, function (value, key) {
715 714 $scope.selectedPin.push(value._PinId);
  715 + $scope.clickedPins.push({ 'id': value._PinId });
716 716 var headX = (parseInt(value._HeadX));
717 717 var headY = (parseInt(value._HeadY));
718 718 $scope.createSpeechBubble(parseInt(headX) + 10, parseInt(headY) + 10, value._PinId, isCtrlPressed, isPinClicked, isSameTermWithMultiPin);
719 719 })
720   -
721   -
722   -
  720 +
723 721 }
724 722  
725 723 $rootScope.isLoading = false;
... ... @@ -1360,7 +1358,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1360 1358 }
1361 1359  
1362 1360 $rootScope.hidePins = function () {
1363   -
  1361 + $rootScope.isshowAllPinsBtnAfterHideClicked = false;
1364 1362 $rootScope.isLoading = true;
1365 1363 $('#spinner').css('visibility', 'visible');
1366 1364 $scope.hideSpeechBubble();
... ... @@ -1392,7 +1390,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1392 1390 $rootScope.isLoading = true;
1393 1391 $('#spinner').css('visibility', 'visible');
1394 1392 $scope.isHidePinBtnClicked = false;
1395   -
  1393 + $rootScope.isshowAllPinsBtnAfterHideClicked = true;
1396 1394 if ($scope.selectedSystemName != null && $scope.selectedSystemName != undefined) {
1397 1395  
1398 1396 $scope.showSystemPins($scope.selectedSystemPinData, false);
... ... @@ -1415,6 +1413,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1415 1413  
1416 1414  
1417 1415 $scope.showSelectedPins = function () {
  1416 + $rootScope.isshowAllPinsBtnAfterHideClicked = false;
1418 1417 $rootScope.isLoading = true;
1419 1418 $('#spinner').css('visibility', 'visible');
1420 1419  
... ... @@ -1518,8 +1517,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1518 1517  
1519 1518  
1520 1519 }
1521   -
  1520 + $rootScope.isshowAllPinsBtnAfterHideClicked = true;
1522 1521 $scope.showItemsForSearch = function () {
  1522 + if($rootScope.isshowAllPinsBtnAfterHideClicked == true){
1523 1523 console.log('showItemsForSearch is called');
1524 1524 //this check is for log only because we are writing length so need to check if its not null or undefined
1525 1525  
... ... @@ -1547,7 +1547,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1547 1547 }
1548 1548  
1549 1549 }, 500);
1550   -
  1550 + }
1551 1551 }
1552 1552  
1553 1553  
... ...