Commit 886da8e67dead0e90bbf024324f15de729ca7f2e

Authored by Amrita Vishnoi
2 parents c81a82e5 41f3cfcc

Merge branch 'Develop' into QA

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -555,40 +555,25 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
555 555 //0.3
556 556 var daBodyviewElement = angular.element(document.getElementById("daBodyview"));
557 557  
558   - $timeout(function () {
  558 + $timeout(function ()
  559 + {
559 560 $compile(daBodyviewElement.contents())($scope);
560 561  
561   - console.log('html is compiled' + document.getElementById('daView'))
562   - if (document.getElementById('daView') != null) {
563   -
564   - //0.4 added some stylesheets
565   - $('#daBodyview').css("height", (parseInt($(window).outerHeight())-62-20));
566   -
567   - $('#daBodyview').css("width", $(window).outerWidth());
568   -
569   - //1. load navigator man first
570   - console.log('before LoadBodyViewNavigatorImage call')
571   - $scope.LoadBodyViewNavigatorImage();
572   -
573   - //$rootScope.loadSearchData();
574   -
575   - $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle");
576   -
577   - $scope.layerNumber = 0;
  562 + console.log('html is compiled ' + document.getElementById('daView'))
578 563  
579   - //2.
580   -
581   -
582   - console.log('currentBodyViewId just before sending: ' + currentBodyViewId);
583   - $scope.loadBodyViewData(currentBodyViewId);
  564 + if (document.getElementById('daView') != null) {
584 565  
585   - //2. load bodyRegion data
586   - $rootScope.isLoading = true;
587   - $rootScope.voId = $rootScope.getLocalStorageValue("currentBodyViewId");
  566 + $scope.loadDAView(currentBodyViewId);
588 567 }
589   - //$('#daBodyview').css("height", $(window).outerHeight());
  568 + else
  569 + {
  570 + $compile(daBodyviewElement.contents())($scope);
  571 + console.log('html is compiled in else ' + document.getElementById('daView'))
590 572  
591   - //$('#daBodyview').css("width", $(window).outerWidth());
  573 + $scope.loadDAView(currentBodyViewId);
  574 +
  575 + }
  576 +
592 577  
593 578 if ($('#daImagePanel').offset().top == 0)
594 579 $('#daImagePanel').css("top", '70px');
... ... @@ -605,16 +590,35 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
605 590  
606 591 $location.path('/');
607 592  
608   - /*relaoding unavailable data for resolving refesh issue*/
609   - /* console.log('Reloading json data for body view => BROWSER REFRESH ISSUE...');
610   - $scope.loadDissectibleAnatomyData();
611   -
612   - if ((typeof($rootScope.MenuModuleName) == "undefined") || $rootScope.MenuModuleName == null) {
613   - $rootScope.MenuModuleName = "DA";
614   - }*/
  593 +
  594 + }
  595 + }
615 596  
  597 + $scope.loadDAView = function (currentBodyViewId)
  598 + {
  599 +
  600 + //0.4 added some stylesheets
  601 + $('#daBodyview').css("height", (parseInt($(window).outerHeight()) - 62 - 20));
  602 +
  603 + $('#daBodyview').css("width", $(window).outerWidth());
  604 +
  605 + //1. load navigator man first
  606 + console.log('before LoadBodyViewNavigatorImage call')
  607 + $scope.LoadBodyViewNavigatorImage();
  608 +
  609 +
  610 + $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle");
  611 +
  612 + $scope.layerNumber = 0;
  613 +
  614 + //2.
  615 + console.log('currentBodyViewId just before sending: ' + currentBodyViewId);
  616 + $scope.loadBodyViewData(currentBodyViewId);
  617 +
  618 + //2. load bodyRegion data
  619 + $rootScope.isLoading = true;
  620 + $rootScope.voId = $rootScope.getLocalStorageValue("currentBodyViewId");
616 621  
617   - }
618 622 }
619 623  
620 624 angular.element(document).ready(function (e) {
... ... @@ -1831,6 +1835,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
1831 1835 $scope.DisableUI();
1832 1836 $scope.highLightBody();
1833 1837 }
  1838 + else {
  1839 + $rootScope.isLoading = false;
  1840 + $('#spinner').css('visibility', 'hidden');
  1841 + //debugger;
  1842 + $scope.EnableUI();
  1843 + }
1834 1844 }
1835 1845 else {
1836 1846 $rootScope.isLoading = false;
... ...