Commit 4317a65d344d35f202f39e0e1df906ea24cff272

Authored by Nikita Kulshreshtha
1 parent 3aec8ffb

1. after current structire selection, we click on highlight, call should not go …

…on the hoghlightbybodysystemselection.
2. need to check why ishighlight was false on line 3048
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -645,6 +645,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -645,6 +645,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
645 console.log('currentBodyViewId just before sending: ' + currentBodyViewId); 645 console.log('currentBodyViewId just before sending: ' + currentBodyViewId);
646 $scope.loadBodyViewData(currentBodyViewId); 646 $scope.loadBodyViewData(currentBodyViewId);
647 647
  648 +
  649 + $scope.GetBodySystemData(currentBodyViewId);
648 //2. load bodyRegion data 650 //2. load bodyRegion data
649 $rootScope.isLoading = true; 651 $rootScope.isLoading = true;
650 $rootScope.voId = $rootScope.getLocalStorageValue("currentBodyViewId"); 652 $rootScope.voId = $rootScope.getLocalStorageValue("currentBodyViewId");
@@ -3023,17 +3025,27 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -3023,17 +3025,27 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
3023 $scope.DisableUI(); 3025 $scope.DisableUI();
3024 $('.ui-slider').slider('disable'); 3026 $('.ui-slider').slider('disable');
3025 3027
  3028 +
  3029 + if ($scope.isTransparencyActivated) {
  3030 +
  3031 + $scope.layerNumber = $rootScope.currentLayerNumber;
  3032 + }
  3033 + else {
  3034 + $scope.layerNumber = $('#txtlayerNumber').val();
  3035 + $rootScope.currentLayerNumber = $scope.layerNumber;
  3036 + }
  3037 +
3026 $("#btnTranparency").attr('disabled', 'disabled'); 3038 $("#btnTranparency").attr('disabled', 'disabled');
3027 - $rootScope.currentLayerNumber = $scope.layerNumber; 3039 +
3028 3040
3029 - $scope.layerNumber = $('#txtlayerNumber').val(); 3041 +
3030 3042
3031 $rootScope.isLoading = true; 3043 $rootScope.isLoading = true;
3032 $('#spinner').css('visibility', 'visible'); 3044 $('#spinner').css('visibility', 'visible');
3033 3045
3034 3046
3035 if ($rootScope.isHighLight == true) { 3047 if ($rootScope.isHighLight == true) {
3036 - $rootScope.isHighLight = false; 3048 + // $rootScope.isHighLight = false;
3037 $scope.CloseTransparencyBox(); 3049 $scope.CloseTransparencyBox();
3038 } 3050 }
3039 3051
@@ -3059,7 +3071,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -3059,7 +3071,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
3059 //remove existing data and draw fresh data 3071 //remove existing data and draw fresh data
3060 $scope.removeCurrentHighlightedBodySystem(); 3072 $scope.removeCurrentHighlightedBodySystem();
3061 3073
3062 -  
3063 3074
3064 $scope.message = AIAConstants.NO_BODY_SYSTEM_AVAILABLE; 3075 $scope.message = AIAConstants.NO_BODY_SYSTEM_AVAILABLE;
3065 $("#daMessageModal").modal('show'); 3076 $("#daMessageModal").modal('show');
@@ -3292,7 +3303,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -3292,7 +3303,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
3292 3303
3293 }); 3304 });
3294 3305
3295 - // } 3306 +
3296 } 3307 }
3297 3308
3298 3309
@@ -7964,6 +7975,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -7964,6 +7975,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
7964 //5. change the search terms as per the selected bodyview 7975 //5. change the search terms as per the selected bodyview
7965 $rootScope.loadSearchData(); 7976 $rootScope.loadSearchData();
7966 7977
  7978 + $scope.GetBodySystemData(currentBodyViewId);
7967 //6. 7979 //6.
7968 $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = $rootScope.getLocalStorageValue("currentViewTitle").replace('Female', 'Male'); 7980 $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = $rootScope.getLocalStorageValue("currentViewTitle").replace('Female', 'Male');
7969 7981
@@ -7996,6 +8008,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -7996,6 +8008,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
7996 //5. change the search terms as per the selected bodyview 8008 //5. change the search terms as per the selected bodyview
7997 $rootScope.loadSearchData(); 8009 $rootScope.loadSearchData();
7998 8010
  8011 + $scope.GetBodySystemData(currentBodyViewId);
7999 //6. 8012 //6.
8000 $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = $rootScope.getLocalStorageValue("currentViewTitle").replace('Male', 'Female'); 8013 $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = $rootScope.getLocalStorageValue("currentViewTitle").replace('Male', 'Female');
8001 8014
@@ -8241,6 +8254,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -8241,6 +8254,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
8241 //4. change the search terms as per the selected bodyview 8254 //4. change the search terms as per the selected bodyview
8242 $rootScope.loadSearchData(); 8255 $rootScope.loadSearchData();
8243 8256
  8257 + $scope.GetBodySystemData($rootScope.voId);
  8258 +
8244 //5.Change the popup title next to search 8259 //5.Change the popup title next to search
8245 $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle"); 8260 $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle");
8246 8261
@@ -8487,7 +8502,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -8487,7 +8502,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
8487 8502
8488 //body highlight options functinality 8503 //body highlight options functinality
8489 $scope.LoadBodySystemData = function (event) { 8504 $scope.LoadBodySystemData = function (event) {
8490 - event.stopPropagation(); 8505 + event.stopPropagation();
8491 $("#structureDropdown").toggle(); 8506 $("#structureDropdown").toggle();
8492 $("#genderChangeId").css("display", "none"); 8507 $("#genderChangeId").css("display", "none");
8493 $("#viewID").css("display", "none"); 8508 $("#viewID").css("display", "none");
@@ -8507,6 +8522,24 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -8507,6 +8522,24 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
8507 systemListHtml = systemListHtml + '</ul>'; 8522 systemListHtml = systemListHtml + '</ul>';
8508 $('#bodySystem').append(systemListHtml); 8523 $('#bodySystem').append(systemListHtml);
8509 8524
  8525 +
  8526 + // var bodySystemDataPath = '~/../content/data/json/da/body-views/' + currentBodyViewId + '/da_dat_body_system_term_' + currentBodyViewId + '.json';
  8527 + // DataService.getJson(bodySystemDataPath)
  8528 + //.then(
  8529 + // function (result) {
  8530 +
  8531 + // $rootScope.BodySystemData = result;
  8532 +
  8533 + // },
  8534 + // function (error) {
  8535 + // console.log(error.statusText)
  8536 + // }
  8537 + // )
  8538 +
  8539 + }
  8540 +
  8541 + $scope.GetBodySystemData = function (currentBodyViewId) {
  8542 + //var currentBodyViewId = $rootScope.voId;
8510 var bodySystemDataPath = '~/../content/data/json/da/body-views/' + currentBodyViewId + '/da_dat_body_system_term_' + currentBodyViewId + '.json'; 8543 var bodySystemDataPath = '~/../content/data/json/da/body-views/' + currentBodyViewId + '/da_dat_body_system_term_' + currentBodyViewId + '.json';
8511 DataService.getJson(bodySystemDataPath) 8544 DataService.getJson(bodySystemDataPath)
8512 .then( 8545 .then(
@@ -8519,7 +8552,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -8519,7 +8552,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8519 console.log(error.statusText) 8552 console.log(error.statusText)
8520 } 8553 }
8521 ) 8554 )
8522 -  
8523 } 8555 }
8524 8556
8525 angular.element(document).click(function () { 8557 angular.element(document).click(function () {
@@ -8547,11 +8579,13 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -8547,11 +8579,13 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8547 8579
8548 $rootScope.systemNumber = event.currentTarget.id; 8580 $rootScope.systemNumber = event.currentTarget.id;
8549 8581
  8582 +
8550 if ($rootScope.systemNumber == 0) { 8583 if ($rootScope.systemNumber == 0) {
8551 8584
8552 console.log("inside HighlightBodyByBodySystem ..came inside current structure"); 8585 console.log("inside HighlightBodyByBodySystem ..came inside current structure");
8553 //clear highlighted system 8586 //clear highlighted system
8554 $scope.removeCurrentHighlightedBodySystem(); 8587 $scope.removeCurrentHighlightedBodySystem();
  8588 + $rootScope.isHighlightBodyByBodySystem = false;
8555 $scope.EnableUI(); 8589 $scope.EnableUI();
8556 } 8590 }
8557 8591