diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js index b66936a..64b1fd9 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js @@ -2878,7 +2878,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ for (var i = 0; i < $rootScope.DaWindowData.length; i++) { $scope.updatedWindowListForSaveCB.push({ - bodySystemTermList: $rootScope.DaWindowData[i].BodySystemData, + // bodySystemTermList: $rootScope.DaWindowData[i].BodySystemData, isTitleBarVisible: false, //BodySystemData.isTitleBarVisible,//N highlightOptionsSelectedId: 0, selectedStructureID: 0,//N diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 48e6a79..71089db 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -135,8 +135,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l 'minimised': false, 'maximised': false, 'id': 0, - 'moduleName': '', - 'mode': '', + 'moduleName': 'DISSECTIBLE_ANATOMY', + 'mode': 'NORMAL', 'isCBAnnotationActive':false, 'annotationData':{shapeStates:[],paintCanvasState:[]}, 'transparencyBounds': [], @@ -545,94 +545,127 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l //load json data for body view $scope.loadDissectibleAnatomyData = function () { - // clear data set by curriculum builder - $rootScope.isCallFromOtherModule = undefined; - - $rootScope.MULTI_VIEW_ID += 1 - - var windowviewid = $rootScope.MULTI_VIEW_ID; - - if ($rootScope.refreshcheck == null) { - $location.path('/'); - } - $scope.ScopeVariablesDeclare(); - - // store exist module in module service + if($rootScope.cernerIntegrationActive) + { + $rootScope.isCallFromOtherModule = true; + // store exist module in module service var ExistData = ModuleService.getModuleData("DISSECTIBLE_ANATOMY"); if (ExistData != undefined && ExistData.length > 0) { // clear all module data before open new module in cb ModuleService.ClearWinDataByModule(ExistData.mType); } - var newWindowData = { - "mType": 'DISSECTIBLE_ANATOMY', - }; + var newWindowData = JSON.parse(localStorage.getItem("daDataObject")); ModuleService.setModuleData(newWindowData, 0); + // close/remove prev panel when in minimised mode + + if($rootScope.DaWindowData!=undefined) + { + if($rootScope.DaWindowData.length>0) + { + for(var x=0 ;x < $rootScope.DaWindowData.length;x++){ + var winid=$rootScope.DaWindowData[x].multiwinid; + if ($('#daImagePanel_' + winid).html() != undefined) { + $('#daImagePanel_' + winid).remove(); + } + } + $rootScope.DaWindowData=[]; + } + } + $rootScope.ClearIframe(); + $location.url('/da-body-view'); + } + else + { - // close/remove prev panel when in minimised mode - - if($rootScope.DaWindowData!=undefined) - { - if($rootScope.DaWindowData.length>0) - { - for(var x=0 ;x < $rootScope.DaWindowData.length;x++){ - var winid=$rootScope.DaWindowData[x].multiwinid; - if ($('#daImagePanel_' + winid).html() != undefined) { - $('#daImagePanel_' + winid).remove(); - } - } - $rootScope.DaWindowData=[]; - } + // clear data set by curriculum builder + $rootScope.isCallFromOtherModule = undefined; + + $rootScope.MULTI_VIEW_ID += 1 + + var windowviewid = $rootScope.MULTI_VIEW_ID; + + if ($rootScope.refreshcheck == null) { + $location.path('/'); } + $scope.ScopeVariablesDeclare(); - $scope.initializeDAWindowData(windowviewid, true, undefined); + // store exist module in module service + var ExistData = ModuleService.getModuleData("DISSECTIBLE_ANATOMY"); - //get current path - var currentURL = $location.path(); - var selectedModuleName = ''; - angular.forEach($rootScope.userModules, function (value, key) { - if (value.slug === currentURL.replace('/', '')) { - selectedModuleName = value.name; - $rootScope.currentActiveModuleTitle = selectedModuleName; + if (ExistData != undefined && ExistData.length > 0) { + // clear all module data before open new module in cb + ModuleService.ClearWinDataByModule(ExistData.mType); } - }) + var newWindowData = { + "mType": 'DISSECTIBLE_ANATOMY', + }; + ModuleService.setModuleData(newWindowData, 0); + + // close/remove prev panel when in minimised mode + + if($rootScope.DaWindowData!=undefined) + { + if($rootScope.DaWindowData.length>0) + { + for(var x=0 ;x < $rootScope.DaWindowData.length;x++){ + var winid=$rootScope.DaWindowData[x].multiwinid; + if ($('#daImagePanel_' + winid).html() != undefined) { + $('#daImagePanel_' + winid).remove(); + } + } + $rootScope.DaWindowData=[]; + } + } + + $scope.initializeDAWindowData(windowviewid, true, undefined); + //get current path + var currentURL = $location.path(); + var selectedModuleName = ''; + angular.forEach($rootScope.userModules, function (value, key) { + if (value.slug === currentURL.replace('/', '')) { + selectedModuleName = value.name; + $rootScope.currentActiveModuleTitle = selectedModuleName; + } + }) - $rootScope.ClearIframe(); - //load common data - var commondataJsonPath = '~/../content/data/json/da/da_dat_common.json'; + $rootScope.ClearIframe(); - DataService.getAnotherJson(commondataJsonPath) - .then( - function (result) { + //load common data + var commondataJsonPath = '~/../content/data/json/da/da_dat_common.json'; - $rootScope.CommonData = result; - $http({ method: 'GET', url: '~/../content/data/json/da/da_dat_contentlist.json' }).success(function (data) { + DataService.getAnotherJson(commondataJsonPath) + .then( + function (result) { - $rootScope.BodyViewData = data; - $scope.getDAViewList(); + $rootScope.CommonData = result; + $http({ method: 'GET', url: '~/../content/data/json/da/da_dat_contentlist.json' }).success(function (data) { - }) - .error(function (data, status, headers, config) { - console.log(data); - }); + $rootScope.BodyViewData = data; + $scope.getDAViewList(); + }) + .error(function (data, status, headers, config) { + console.log(data); + }); - }, - function (error) { - console.log(error.statusText) - } - ) - // $('#daLoaderLabel').css('visibility', 'hidden') - $rootScope.isLoading = false; + }, + function (error) { + console.log(error.statusText) + } + ) + // $('#daLoaderLabel').css('visibility', 'hidden') + $rootScope.isLoading = false; - //push the details of open module in array $rootScope.openModules - $rootScope.openModules.push({ "ModuleId": 1 }); + //push the details of open module in array $rootScope.openModules + $rootScope.openModules.push({ "ModuleId": 1 }); + } } @@ -864,19 +897,30 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l if ($rootScope.isCallFromOtherModule) { - // open JS panel for curriculum with define cornonate in CB jason - $rootScope.jsPanelWidth = $scope.daOpenInOtherModules.size.width;//1000; - $rootScope.jsPanelHeight = $scope.daOpenInOtherModules.size.height; - if($scope.daOpenInOtherModules.size.height<450) - $rootScope.jsPanelHeight = 450; - - $rootScope.jsPanelLeft = 320; - - $rootScope.jsPanelTop = $rootScope.cBModulejsPanelTop(); - if($location.url()!= "/curriculum-builder-detail") { + if($rootScope.cernerIntegrationActive) + { + $rootScope.jsPanelWidth = $(window).outerWidth() - 20; + $rootScope.jsPanelHeight = $(window).outerHeight() - 110; $rootScope.jsPanelLeft = 1; + $rootScope.jsPanelTop = 70; + $rootScope.cernerIntegrationActive=false; } + else + { + // open JS panel for curriculum with define cornonate in CB jason + $rootScope.jsPanelWidth = $scope.daOpenInOtherModules.size.width;//1000; + $rootScope.jsPanelHeight = $scope.daOpenInOtherModules.size.height; + if($scope.daOpenInOtherModules.size.height<450) + $rootScope.jsPanelHeight = 450; + $rootScope.jsPanelLeft = 320; + + $rootScope.jsPanelTop = $rootScope.cBModulejsPanelTop(); + if($location.url()!= "/curriculum-builder-detail") { + $rootScope.jsPanelLeft = 1; + } + } + } else { $rootScope.jsPanelWidth = $(window).outerWidth() - 20; @@ -1828,8 +1872,26 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $("#btnNormalMode_" + windowviewid).removeClass("btn-primary"); } } + //call time interval function until load Illustration data + var timeintval = null; + timeintval = $interval(function () { + var vocabTermDataArray = $scope.GetwindowStoreData(windowviewid, 'vocabTermDataArray'); + if (vocabTermDataArray!=null) { + $scope.stopVocab(); + $scope.setLayerNumberAndHighlightByTermListforCB(windowviewid); + } + else + { + console.log("waiting for Illustration Data"); + } + }, 100); - $scope.setLayerNumberAndHighlightByTermListforCB(windowviewid); + $scope.stopVocab = function () { + if (angular.isDefined(timeintval)) { + $interval.cancel(timeintval); + timeintval = undefined; + } + }; } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index b315f80..2339e5e 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -452,7 +452,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $scope.loadOpenResourceWindow(newWindowData.mType, '#labBodyview'); } - + }, 500); @@ -922,11 +922,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $location.path('/'); $timeout(function () { - if($rootScope.siteUrlInfo.mtype!=null) - { + //currently open CA $scope.RedirectToModule(); - } + }, 100); } @@ -1074,6 +1073,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data if($rootScope.siteUrlInfo.mtype.toLowerCase()=='ca') $('#clinical-animations').trigger('click'); } + if ((localStorage.getItem("daDataObject")) != '') { + //$rootScope.cernerIntegrationActive=true; + // $('#da-view-list').trigger('click'); + } } $scope.ValidateClientSiteUrl = function () { @@ -7555,6 +7558,70 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $("#exportlogo").remove(); $("#filename").val(""); + if ($rootScope.DaWindowData != undefined && $rootScope.DaWindowData.length > 0) { + for (var i = 0; i < $rootScope.DaWindowData.length; i++) { + $scope.updatedWindowListForSaveCB={ + + // bodySystemTermList: $rootScope.DaWindowData[i].BodySystemData, + isTitleBarVisible: false, + highlightOptionsSelectedId: 0, + selectedStructureID: 0,//N + contentDescriptorId: 0, + callOuts: $rootScope.DaWindowData[i].CurriculumTermData, + + layerNumber: parseInt($rootScope.DaWindowData[i].layerNumber) + 1, + isModestyOn: $rootScope.DaWindowData[i].ModestyValue, + + isTopToolBarVisible: false, + clickedTermList: $rootScope.DaWindowData[i].fullTermlist, + minimised: $rootScope.DaWindowData[i].minimised, + windowTitle: $rootScope.DaWindowData[i].currentViewTitle, + + maximised: $rootScope.DaWindowData[i].maximised, + size: { + width: $rootScope.DaWindowData[i].width, + height: $rootScope.DaWindowData[i].height + }, + id: $rootScope.DaWindowData[i].voId, + + imageId: $rootScope.DaWindowData[i].imageId, + position: { + top: $rootScope.DaWindowData[i].top, + left: $rootScope.DaWindowData[i].left, + }, + mType: $rootScope.DaWindowData[i].moduleName, + containsCapturedContent: true, + + zoom: $rootScope.DaWindowData[i].zoomInOut, + skinId: $rootScope.DaWindowData[i].curentEthnicity, + isResizeLock: false , //N + mode: $rootScope.DaWindowData[i].mode, + windowListId: 0,//N + canvasVScrollX: $rootScope.DaWindowData[i].CanvasDivTopPosition, + canvasHScrollX: $rootScope.DaWindowData[i].CanvasDivLeftPosition, + isCallOutVisible: false, + annotationData:$rootScope.DaWindowData[i].annotationData, + isLeftToolBarVisible: false, + isModuleLoaded: false, + searchSelectedText: $rootScope.DaWindowData[i].searchSelectedText, + prevId: $rootScope.DaWindowData[i].prevId, + + isTransparent: $rootScope.DaWindowData[i].isTransparent, + transparencyBounds: $rootScope.DaWindowData[i].transparencyBounds, + transparencyValue: $rootScope.DaWindowData[i].transNumber, + layerNumberTransparency: $rootScope.DaWindowData[i].layerNumberTransparency, + transparencyX: $rootScope.DaWindowData[i].transparencyX, + transparencyY: $rootScope.DaWindowData[i].transparencyY, + layerNumberBeforeTBDraw: $rootScope.DaWindowData[i].layerNumberBeforeTBDraw, + showHideAnnotations: $rootScope.DaWindowData[i].showHideAnnotations + + + } + } + + } + + localStorage.setItem("daDataObject",JSON.stringify($scope.updatedWindowListForSaveCB) ); if(result!=null && result!="ADMIN" ) { var userid= $rootScope.userData.Id; diff --git a/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js b/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js index e9c6be6..f4e82a4 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js @@ -335,7 +335,7 @@ AIA.service('ModuleService', function ($http, DataService) { mode: windowData.mode, isLeftToolBarVisible: windowData.isLeftToolBarVisible, contentDescriptorId: windowData.contentDescriptorId, - bodySystemTermList: windowData.bodySystemTermList, + // bodySystemTermList: windowData.bodySystemTermList, isTransparent: windowData.isTransparent, windowListId: windowData.windowListId, canvasVScrollX: windowData.canvasVScrollX,