Commit 443aed6df23031b4fcdec7bb4831b9bb1586b14a

Authored by Amrita Vishnoi
2 parents 7702bf14 1b05f59f

Merge branch 'Bug#13573_2' into Develop-IPAD-MAC

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) {
... ... @@ -7510,7 +7516,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
7510 7516 $scope.isLoading = true;
7511 7517 $('#spinner').css('visibility', 'visible');
7512 7518  
7513   - $scope.HighlightBodyByTermList($scope.AllTerms)
  7519 + if ($scope.AllTerms != undefined && $scope.AllTerms.length > 0) {
  7520 + $scope.HighlightBodyByTermList($scope.AllTerms);
  7521 + }
  7522 + else {
  7523 + $scope.EnableUI();
  7524 + }
7514 7525 }, 800);
7515 7526  
7516 7527 }
... ... @@ -8027,8 +8038,21 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
8027 8038 else if ($rootScope.previousHighlightList != null && $rootScope.previousHighlightList.length > 0 &&
8028 8039 ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true)) {
8029 8040  
8030   - $rootScope.isHighLight = true
8031   - $scope.setLayerNumberAndHighlightByTermList();
  8041 + $scope.AllTerms = [];
  8042 + $rootScope.isHighLight = true;
  8043 +
  8044 + if ($rootScope.TermNumberData != undefined) {
  8045 + $scope.TermList = $scope.getTermNumberList($rootScope.actualTermNumber);
  8046 + if ($scope.TermList != null && $scope.TermList.length>0) {
  8047 + $scope.setLayerNumberAndHighlightByTermList();
  8048 + }
  8049 + else {
  8050 + //actual term number is not found in thsi view menas previously selected body part does not exist in this view
  8051 + // $scope.EnableUI();
  8052 + $scope.CalculateImageCordinates($rootScope.viewOrientationId)
  8053 + }
  8054 + }
  8055 +
8032 8056 }
8033 8057  
8034 8058 else {
... ... @@ -9158,7 +9182,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
9158 9182 //7.get termList
9159 9183 $scope.fullTermlist = [];
9160 9184 $scope.AllTerms = [];
9161   -
  9185 + console.log("initialised");
9162 9186 if (termNo != DA[0].figLeafTermId) {
9163 9187  
9164 9188 $scope.getChildTermList(termNo);
... ... @@ -9244,6 +9268,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
9244 9268 var isFound = jQuery.inArray(serachTerm, $scope.fullTermlist)
9245 9269 if (isFound == -1) {
9246 9270 $scope.fullTermlist.push(serachTerm);
  9271 + console.log("psudhed in getChildTermList")
9247 9272 $scope.AllTerms.push({ '_TermNumber': serachTerm })
9248 9273 $scope.getChildTermList(serachTerm);
9249 9274 }
... ... @@ -9271,6 +9296,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
9271 9296 if ((data2 != null || data2 != undefined) && (data2.length > 0)) {
9272 9297 for (var i = 0; i < data2.length; i++) {
9273 9298 $scope.fullTermlist.push(data2[i]._TermNumber);
  9299 + console.log("psudhed in getSiblings")
  9300 +
9274 9301 $scope.AllTerms.push({ '_TermNumber': data2[i]._TermNumber })
9275 9302 $scope.getChildTermList(data2[i]._TermNumber);
9276 9303 }
... ...