diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 92599c1..8cc6b48 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,16 @@ 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); + // this is a work around solution for a bug where DA does not load for long and user need to close the DA partially opened + // view, now we are programmatically closing the hung view and when user will reopen the DA view from tile then it will + // open without any issue. + $("#daImagePanel .jsglyph-remove").click(); + console.log('html is compiled in else ' + document.getElementById('daView')) - - $scope.loadDAView(currentBodyViewId); } @@ -724,7 +728,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 = '';