diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 92599c1..09bedd3 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -475,8 +475,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l //disable whole div because till now jspanel is not created. enable when jspanel gets disabled because //than jspanel will take care of disabling/enabling ui - document.getElementById('daBodyview').style.pointerEvents = "none"; - document.getElementById('daBodyview').style.opacity = "0.5"; + + if (document.getElementById('daBodyview') != null) { + document.getElementById('daBodyview').style.pointerEvents = "none"; + document.getElementById('daBodyview').style.opacity = "0.5"; + } //Check if browser 'REFRESHED' or 'RELOADED' if ($rootScope.CommonData != null) { @@ -507,7 +510,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $rootScope.loadSearchData(); - console.log('currentBodyViewId pickjed from localStorage: ' + currentBodyViewId); + console.log('currentBodyViewId picked from localStorage: ' + currentBodyViewId); var openViews; if ($rootScope.openViews != null || $rootScope.openViews != undefined) { @@ -584,15 +587,15 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l console.log('html is compiled ' + document.getElementById('daView')) if (document.getElementById('daView') != null) { - - $scope.loadDAView(currentBodyViewId); + $scope.loadDAView(currentBodyViewId); } else { - $compile(daBodyviewElement.contents())($scope); + $("#daImagePanel .jsglyph-remove").click(); + console.log('html is compiled in else ' + document.getElementById('daView')) - $scope.loadDAView(currentBodyViewId); + } @@ -724,7 +727,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l }); } - $(document).on("click", "#daImagePanel .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { + $(document).on("click", "#daImagePanel .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { + $rootScope.selectedBodySystemName = 'All'; $rootScope.selectedBodySystemId = 0; $rootScope.searchSelectedText = '';