Commit 1b05f59f424eb340b44708e771c9841e9c3cc834

Authored by Nikita Kulshreshtha
1 parent 920c00e0

the highlighted term may not exist in the changed view so fixed the code as required

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -290,6 +290,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
290 290 }
291 291 //to disbale layer change slider
292 292 $('.ui-slider').slider('disable');
  293 +
  294 + $scope.isLoading = true;
  295 + $('#spinner').css('visibility', 'visible');
293 296 }
294 297  
295 298 $scope.EnableUI = function () {
... ... @@ -302,6 +305,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
302 305 //to enable layer change slider
303 306 $('.ui-slider').slider('enable');
304 307  
  308 + $scope.isLoading = false;
  309 +
  310 + $('#spinner').css('visibility', 'hidden');
305 311 }
306 312  
307 313 $scope.openView = function ($event) {
... ... @@ -7500,7 +7506,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
7500 7506 $scope.isLoading = true;
7501 7507 $('#spinner').css('visibility', 'visible');
7502 7508  
7503   - $scope.HighlightBodyByTermList($scope.AllTerms)
  7509 + if ($scope.AllTerms != undefined && $scope.AllTerms.length > 0) {
  7510 + $scope.HighlightBodyByTermList($scope.AllTerms);
  7511 + }
  7512 + else {
  7513 + $scope.EnableUI();
  7514 + }
7504 7515 }, 800);
7505 7516  
7506 7517 }
... ... @@ -8012,15 +8023,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
8012 8023 else if ($rootScope.previousHighlightList != null && $rootScope.previousHighlightList.length > 0 &&
8013 8024 ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true)) {
8014 8025  
  8026 + $scope.AllTerms = [];
8015 8027 $rootScope.isHighLight = true;
8016   - if ($rootScope.TermNumberData != undefined && $rootScope.TermNumberData.length > 0) {
  8028 +
  8029 + if ($rootScope.TermNumberData != undefined) {
8017 8030 $scope.TermList = $scope.getTermNumberList($rootScope.actualTermNumber);
8018   - if ($scope.TermList != null) {
  8031 + if ($scope.TermList != null && $scope.TermList.length>0) {
8019 8032 $scope.setLayerNumberAndHighlightByTermList();
8020 8033 }
8021 8034 else {
8022 8035 //actual term number is not found in thsi view menas previously selected body part does not exist in this view
8023   - $scope.EnableUI();
  8036 + // $scope.EnableUI();
  8037 + $scope.CalculateImageCordinates($rootScope.viewOrientationId)
8024 8038 }
8025 8039 }
8026 8040  
... ... @@ -9139,7 +9153,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
9139 9153 //7.get termList
9140 9154 $scope.fullTermlist = [];
9141 9155 $scope.AllTerms = [];
9142   -
  9156 + console.log("initialised");
9143 9157 if (termNo != DA[0].figLeafTermId) {
9144 9158  
9145 9159 $scope.getChildTermList(termNo);
... ... @@ -9225,6 +9239,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
9225 9239 var isFound = jQuery.inArray(serachTerm, $scope.fullTermlist)
9226 9240 if (isFound == -1) {
9227 9241 $scope.fullTermlist.push(serachTerm);
  9242 + console.log("psudhed in getChildTermList")
9228 9243 $scope.AllTerms.push({ '_TermNumber': serachTerm })
9229 9244 $scope.getChildTermList(serachTerm);
9230 9245 }
... ... @@ -9252,6 +9267,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
9252 9267 if ((data2 != null || data2 != undefined) && (data2.length > 0)) {
9253 9268 for (var i = 0; i < data2.length; i++) {
9254 9269 $scope.fullTermlist.push(data2[i]._TermNumber);
  9270 + console.log("psudhed in getSiblings")
  9271 +
9255 9272 $scope.AllTerms.push({ '_TermNumber': data2[i]._TermNumber })
9256 9273 $scope.getChildTermList(data2[i]._TermNumber);
9257 9274 }
... ...