From 1b05f59f424eb340b44708e771c9841e9c3cc834 Mon Sep 17 00:00:00 2001 From: nikita Date: Thu, 14 Dec 2017 14:55:56 +0530 Subject: [PATCH] the highlighted term may not exist in the changed view so fixed the code as required --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index dcf92ce..1505b94 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -290,6 +290,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } //to disbale layer change slider $('.ui-slider').slider('disable'); + + $scope.isLoading = true; + $('#spinner').css('visibility', 'visible'); } $scope.EnableUI = function () { @@ -302,6 +305,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l //to enable layer change slider $('.ui-slider').slider('enable'); + $scope.isLoading = false; + + $('#spinner').css('visibility', 'hidden'); } $scope.openView = function ($event) { @@ -7500,7 +7506,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.isLoading = true; $('#spinner').css('visibility', 'visible'); - $scope.HighlightBodyByTermList($scope.AllTerms) + if ($scope.AllTerms != undefined && $scope.AllTerms.length > 0) { + $scope.HighlightBodyByTermList($scope.AllTerms); + } + else { + $scope.EnableUI(); + } }, 800); } @@ -8012,15 +8023,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l else if ($rootScope.previousHighlightList != null && $rootScope.previousHighlightList.length > 0 && ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true)) { + $scope.AllTerms = []; $rootScope.isHighLight = true; - if ($rootScope.TermNumberData != undefined && $rootScope.TermNumberData.length > 0) { + + if ($rootScope.TermNumberData != undefined) { $scope.TermList = $scope.getTermNumberList($rootScope.actualTermNumber); - if ($scope.TermList != null) { + if ($scope.TermList != null && $scope.TermList.length>0) { $scope.setLayerNumberAndHighlightByTermList(); } else { //actual term number is not found in thsi view menas previously selected body part does not exist in this view - $scope.EnableUI(); + // $scope.EnableUI(); + $scope.CalculateImageCordinates($rootScope.viewOrientationId) } } @@ -9139,7 +9153,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l //7.get termList $scope.fullTermlist = []; $scope.AllTerms = []; - + console.log("initialised"); if (termNo != DA[0].figLeafTermId) { $scope.getChildTermList(termNo); @@ -9225,6 +9239,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var isFound = jQuery.inArray(serachTerm, $scope.fullTermlist) if (isFound == -1) { $scope.fullTermlist.push(serachTerm); + console.log("psudhed in getChildTermList") $scope.AllTerms.push({ '_TermNumber': serachTerm }) $scope.getChildTermList(serachTerm); } @@ -9252,6 +9267,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l if ((data2 != null || data2 != undefined) && (data2.length > 0)) { for (var i = 0; i < data2.length; i++) { $scope.fullTermlist.push(data2[i]._TermNumber); + console.log("psudhed in getSiblings") + $scope.AllTerms.push({ '_TermNumber': data2[i]._TermNumber }) $scope.getChildTermList(data2[i]._TermNumber); } -- libgit2 0.21.4