diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index bcd6958..ec9be74 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -1411,7 +1411,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if (evt.ctrlKey) { $rootScope.multiAnnotationIsON = true; - document.getElementById("btnZoom").setAttribute('disabled', 'disabled'); + //document.getElementById("btnZoom").setAttribute('disabled', 'disabled'); } else { if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && ($rootScope.previousHighlightList.length > 0)) { @@ -1420,7 +1420,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.multiAnnotationIsON = false; - document.getElementById("btnZoom").disabled = false; + // document.getElementById("btnZoom").disabled = false; } //get mouse coordinate of mirror image click @@ -1790,7 +1790,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.multiAnnotationIsON = true; //$("#btnZoom").addClass('disabled'); - document.getElementById("btnZoom").setAttribute('disabled', 'disabled'); + // document.getElementById("btnZoom").setAttribute('disabled', 'disabled'); //$('#btnZoom').click(function (event) { event.preventDefault(); }); console.log('CTRL ON') @@ -1804,7 +1804,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo console.log('multiAnnotationIsON: ' + $rootScope.multiAnnotationIsON); // document.getElementById("btnZoom").setAttribute('enabled', 'enabled'); - document.getElementById("btnZoom").disabled = false; + // document.getElementById("btnZoom").disabled = false; } var annotationText; @@ -2659,26 +2659,32 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var multiTermList = []; - angular.forEach($rootScope.previousHighlightList, function (value, key) { - var ActualTermNo = $scope.getActualTermNumber(value); - if (ActualTermNo != null) { - var TermList = $scope.getTermNumberList(ActualTermNo); - if (TermList != null) { - for (var i = 0; i < TermList.length; i++) { - - multiTermList.push(TermList[i]); + + angular.forEach($rootScope.previousHighlightList, function (value, key) { + var ActualTermNo = $scope.getActualTermNumber(value); + if (ActualTermNo != null && ActualTermNo != undefined) { + var TermList = $scope.getTermNumberList(ActualTermNo); + if (TermList != null) { + for (var i = 0; i < TermList.length; i++) { + + multiTermList.push(TermList[i]); + } } } - } - - }); + }); + console.log('createTermListByPreviousTermsAndHighlight is called'); - if ((multiTermList != undefined || multiTermList != null) && multiTermList.length > 0) { + if ((multiTermList != undefined && multiTermList != null) && multiTermList.length > 0) { $timeout(function () { $scope.HighlightBodyByTermList(multiTermList); }, 50); } + else { + $rootScope.isLoading = false; + + $('#spinner').css('visibility', 'hidden'); + } } @@ -5933,8 +5939,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $("#btnTranparency").removeClass("disabled"); $rootScope.isTransparencyBoxActivated = false; $rootScope.isNormalMode = false; - - + $rootScope.isGenderChnage = false; + $rootScope.isViewChange = false; //if listanager is visisble then close it $rootScope.CloseListManager(); @@ -6797,7 +6803,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo .from($rootScope.TermNumberData.TermData.Term) .where('_TermNumber == ' + iColor) .select('_ActualTermNumber'); - if ($scope.actualTermNo != null || actualTermNo != undefined) { + if ($scope.actualTermNo != null && $scope.actualTermNo != undefined && $scope.actualTermNo.length>0) { return $scope.actualTermNo[0]._ActualTermNumber; } @@ -8455,8 +8461,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo // added the timeout to delay the compile of ul li $scope.IsSearchVisible = true; var isValueMatchedWithTerm = false; - for (var i = 0; i <= $rootScope.searchListArray.length - 1; i++) - { + for (var i = 0; i <= $rootScope.searchListArray.length - 1; i++) { var searchFieldVal = $("#typedTermName").val(); if (searchFieldVal.length > 0) { for (var j = 0; j <= searchFieldVal.length - 1; j++) { @@ -8473,7 +8478,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } } if (isValueMatchedWithTerm == true) { - $rootScope.ModifiedsearchListArray.push({ "name": $rootScope.searchListArray[i].name, "id": $rootScope.searchListArray[i].id}); + $rootScope.ModifiedsearchListArray.push({ "name": $rootScope.searchListArray[i].name, "id": $rootScope.searchListArray[i].id }); } } } @@ -8486,8 +8491,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo termListFilterHtml += ''; $('#searchListDiv').append(termListFilterHtml); } - else - { + else { for (var i = 0; i <= $rootScope.searchListArray.length - 1; i++) { termListFilterHtml += '