From ffd462c00df5d83183c4a2f03b8316f2b5f2dc91 Mon Sep 17 00:00:00 2001 From: Birendra Date: Tue, 29 Jun 2021 13:19:07 +0530 Subject: [PATCH] new modification in AIA --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js | 50 +++++++++++++++++++++++++++++++++++--------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js | 60 ++++++++++++++++++++++++++++++++++++++++++++++-------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js | 2 +- 400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js | 65 ++++++++++++++++++++++++++++++++++++++++++----------------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js | 90 ++++++++++++++++++++++++++++++++++-------------------------------------------------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js | 833 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js | 58 +++++++++++++++++++++++++++++++++++++++++++++------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/MyAnimationController.js | 57 ++++++++++++++++++++++++++++++++++++++++++++------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/MyPictureController.js | 61 ++++++++++++++++++++++++++++++++++++++++++++++++------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js | 61 ++++++++++++++++++++++++++++++++++++++++++------------------- 400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js | 21 ++++++++++++++++++--- 400-SOURCECODE/AIAHTML5.Web/app/services/AuthenticationService.js | 22 ++++++++++------------ 400-SOURCECODE/AIAHTML5.Web/app/services/LabExerciseService.js | 4 ++-- 400-SOURCECODE/AIAHTML5.Web/app/views/3dA/3d-anatomy-details.html | 3 ++- 400-SOURCECODE/AIAHTML5.Web/app/views/Home/printPreview.html | 6 +++--- 400-SOURCECODE/AIAHTML5.Web/app/views/LabExerc/lab-exercise-view.html | 3 ++- 400-SOURCECODE/AIAHTML5.Web/app/views/MyAnimation/MyAnimation.html | 5 ----- 400-SOURCECODE/AIAHTML5.Web/app/views/MyPicture/MyPicture.html | 5 ----- 400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html | 2 +- 400-SOURCECODE/AIAHTML5.Web/app/views/aa/module-item-view.html | 4 +--- 400-SOURCECODE/AIAHTML5.Web/app/views/aa/tile-view.html | 2 +- 400-SOURCECODE/AIAHTML5.Web/app/views/ai/adam-images-detail.html | 6 +----- 400-SOURCECODE/AIAHTML5.Web/app/views/ai/ai-view.html | 2 +- 400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html | 2 +- 400-SOURCECODE/AIAHTML5.Web/app/views/ca/clinical-animations-detail.html | 1 + 400-SOURCECODE/AIAHTML5.Web/app/views/ci/ci-view.html | 2 +- 400-SOURCECODE/AIAHTML5.Web/app/views/ci/clinical-illustrations-detail.html | 5 ++--- 400-SOURCECODE/AIAHTML5.Web/app/views/da/da-body-view.html | 6 ++---- 400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html | 6 ++++++ 400-SOURCECODE/AIAHTML5.Web/index.aspx | 3 ++- 400-SOURCECODE/AIAHTML5.Web/libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.js | 4 ++-- 400-SOURCECODE/AIAHTML5.Web/themes/default/css/bootstrap/3.3.6/main.css | 18 +++++++++++++++++- 34 files changed, 1100 insertions(+), 544 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js index 4eacf2c..0049261 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js @@ -68,15 +68,15 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location } } - $rootScope.Get3DWindowId = function () { - // handle for single window - if ($rootScope.TheeDWindowData.length > 0) { - for (var x = 0 ; x < $rootScope.TheeDWindowData.length; x++) { + // access from home controller + $rootScope.Set3DwindowData=function(windowviewid,keyname,data) { + for(var x=0 ;x < $rootScope.TheeDWindowData.length;x++){ - return $rootScope.TheeDWindowData[x].multiwinid; + if($rootScope.TheeDWindowData[x].multiwinid==windowviewid) + { + $rootScope.TheeDWindowData[x][keyname]=data; } } - else return 0; } $scope.DisableUI = function () { @@ -228,7 +228,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location "mType": 'THREE_D_ANATOMY', "windowTitle": $event.currentTarget.textContent, "size": { height: 600, width: 900 }, - "position": { x: 300, y: 110 } + "position": { x: 10, y: 30 } }; window.parent.AIAModuleOpenResourceInfo(ThreeDopenData); @@ -272,9 +272,10 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location } $rootScope.Open3DModelBodyMain = function () { - $scope.DisableUI(); if ($rootScope.isCallFromOtherModule) { $scope.ThreeDModuleData = ModuleService.getModuleData("THREE_D_ANATOMY"); + if($scope.ThreeDModuleData.length<1) return; + $scope.DisableUI(); $scope.readyToLoad = true; $rootScope.ThreeDWindowLoadComplete = false; $scope.wincount = 1; @@ -312,6 +313,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location } else { + $scope.DisableUI(); $scope.Open3DModelBody(null); } } @@ -412,10 +414,12 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location if ($scope.ThreeDOpenInOtherModules.position.x < 20) $scope.jsPanelLeft = 20; $scope.jsPanelTop = $scope.ThreeDOpenInOtherModules.position.y; - + if ($scope.ThreeDOpenInOtherModules.position.y < 35) + $scope.jsPanelTop = 35; + if($location.url()!= "/curriculum-builder-detail") { - $scope.jsPanelLeft = 1; - $scope.jsPanelTop = $rootScope.cBModulejsPanelTop(); + $scope.jsPanelLeft = 20; + $scope.jsPanelTop = 100; } } @@ -449,6 +453,9 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location height: $scope.jsPanelHeight }, onminimized:function (panel) { + var pnlName=panel[0].id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; var isAutoCalled = $scope.Get3DwindowStoreData(windowviewid, 'minmaxAutoEvent'); if(!isAutoCalled) { @@ -458,6 +465,9 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location $scope.Set3DwindowStoreData(windowviewid, 'maximised',false); }, onmaximized:function (panel) { + var pnlName=panel[0].id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; var isAutoCalled = $scope.Get3DwindowStoreData(windowviewid, 'minmaxAutoEvent'); if(!isAutoCalled) { @@ -467,6 +477,9 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location $scope.Set3DwindowStoreData(windowviewid, 'minimised',false); }, onnormalized:function (panel) { + var pnlName=panel[0].id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; var isAutoCalled = $scope.Get3DwindowStoreData(windowviewid, 'minmaxAutoEvent'); if(!isAutoCalled) { @@ -474,24 +487,31 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location } $scope.Set3DwindowStoreData(windowviewid, 'minimised',false); $scope.Set3DwindowStoreData(windowviewid, 'maximised',false); + $rootScope.resetMenuOptionOnClick(pnlName); }, resizable: { stop: function (event, ui) { - var len = (event.currentTarget.id).split("_").length; - var windowviewid = (event.currentTarget.id).split("_")[len - 1]; + var pnlName=event.currentTarget.id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; $scope.Set3DwindowStoreData(windowviewid, 'width', ui.size.width); $scope.Set3DwindowStoreData(windowviewid, 'height', ui.size.height); + $scope.Set3DwindowStoreData(windowviewid, 'y', ui.position.top); + $scope.Set3DwindowStoreData(windowviewid, 'x', ui.position.left); $rootScope.UnsaveCurriculum = true; + $rootScope.resetMenuOptionOnClick(pnlName); } }, draggable: { stop: function( event, ui ) { - var len = (event.currentTarget.id).split("_").length; - var windowviewid = (event.currentTarget.id).split("_")[len - 1]; + var pnlName=event.currentTarget.id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; $scope.Set3DwindowStoreData(windowviewid, 'y', ui.position.top); $scope.Set3DwindowStoreData(windowviewid, 'x', ui.position.left); $rootScope.UnsaveCurriculum = true; + $rootScope.resetMenuOptionOnClick(pnlName); } }, diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js index a7c1a68..502db51 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js @@ -548,7 +548,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } else { - $('#grid-view').css({"height":"690","overflow":"scroll"}); + $('#grid-view').css({"height":"670","overflow":"scroll"}); $('#ListViewDiv').css({"height":"450","overflow":"scroll"}); } } @@ -689,7 +689,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout localStorage.setItem("SearchText", currentSearchtext); if (currentSearchtext == "undefined" || (currentSearchtext == null || currentSearchtext == "")) { if ($scope.query.SearchText == "undefined" || ($scope.query.SearchText == null || $scope.query.SearchText == "")) { - $rootScope.errorMessage = AIAConstants.PLEASE_ENTER_SEARCH_TEXT; + $('#errorMessage').text(AIAConstants.PLEASE_ENTER_SEARCH_TEXT); $("#messageModal").modal('show'); $scope.EnableUI(); return false; @@ -972,7 +972,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout "mType": 'ADAM_IMAGES', "windowTitle": $rootScope.ViewTitle, "size": { height: 600, width: 900 }, - "position": { x: 300, y: 110 } + "position": { x: 10, y: 30 } }; window.parent.AIAModuleOpenResourceInfo(AIDopenData); @@ -1017,9 +1017,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } $rootScope.OpenAdamImageViewMain = function () { - $scope.DisableUI(); + if ($rootScope.isCallFromOtherModule) { $scope.AIModuleData = ModuleService.getModuleData("ADAM_IMAGES"); + if($scope.AIModuleData.length<1) return; + $scope.DisableUI(); $scope.readyToLoad = true; $rootScope.AIWindowLoadComplete = false; $scope.wincount = 1; @@ -1042,6 +1044,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout if ($scope.wincount == winlen && $rootScope.AIWindowLoadComplete == true) { $scope.stopInterval(); $scope.$emit("LoadModuleComplete", "ADAM_IMAGES"); + } @@ -1057,6 +1060,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } else { + $scope.DisableUI(); $scope.OpenAdamImageView(null); } } @@ -1161,10 +1165,12 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout if ($scope.aiOpenInOtherModules.position.x < 20) $scope.jsPanelLeft = 20; $scope.jsPanelTop = $scope.aiOpenInOtherModules.position.y; + if ($scope.aiOpenInOtherModules.position.y < 35) + $scope.jsPanelTop = 35; if($location.url()!= "/curriculum-builder-detail") { - $scope.jsPanelLeft = 1; - $scope.jsPanelTop = $rootScope.cBModulejsPanelTop(); + $scope.jsPanelLeft = 20; + $scope.jsPanelTop = 100; } } else { @@ -1201,6 +1207,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout height: $scope.jsPanelHeight }, onminimized:function (panel) { + var pnlName=panel[0].id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; var isAutoCalled = $scope.GetAIwindowStoreData(windowviewid, 'minmaxAutoEvent'); if(!isAutoCalled) { @@ -1210,6 +1219,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.SetAIwindowStoreData(windowviewid, 'maximised',false); }, onmaximized:function (panel) { + var pnlName=panel[0].id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; var isAutoCalled = $scope.GetAIwindowStoreData(windowviewid, 'minmaxAutoEvent'); if(!isAutoCalled) { @@ -1219,9 +1231,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.SetAIwindowStoreData(windowviewid, 'minimised',false); var canvasDIvHeight = $('#aiImagePanel_' + windowviewid+ " .jsPanel-content").height(); $('#canvasDivAI_' + windowviewid).css('height', canvasDIvHeight-5); + $rootScope.resetMenuOptionOnClick(pnlName); }, onnormalized:function (panel) { + var pnlName=panel[0].id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; var isAutoCalled = $scope.GetAIwindowStoreData(windowviewid, 'minmaxAutoEvent'); if(!isAutoCalled) { @@ -1231,26 +1247,33 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.SetAIwindowStoreData(windowviewid, 'maximised',false); var canvasDIvHeight = $('#aiImagePanel_' + windowviewid+ " .jsPanel-content").height(); $('#canvasDivAI_' + windowviewid).css('height', canvasDIvHeight-5); + $rootScope.resetMenuOptionOnClick(pnlName); }, resizable: { stop: function (event, ui) { - var len = (event.currentTarget.id).split("_").length; - var windowviewid = (event.currentTarget.id).split("_")[len - 1]; + var pnlName=event.currentTarget.id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; $scope.SetAIwindowStoreData(windowviewid, 'width', ui.size.width); $scope.SetAIwindowStoreData(windowviewid, 'height', ui.size.height); + $scope.SetAIwindowStoreData(windowviewid, 'y', ui.position.top); + $scope.SetAIwindowStoreData(windowviewid, 'x', ui.position.left); $rootScope.UnsaveCurriculum = true; var canvasDIvHeight = $('#aiImagePanel_' + windowviewid+ " .jsPanel-content").height(); $('#canvasDivAI_' + windowviewid).css('height', canvasDIvHeight-5); + $rootScope.resetMenuOptionOnClick(pnlName); } }, draggable: { stop: function( event, ui ) { - var len = (event.currentTarget.id).split("_").length; - var windowviewid = (event.currentTarget.id).split("_")[len - 1]; + var pnlName=event.currentTarget.id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; $scope.SetAIwindowStoreData(windowviewid, 'y', ui.position.top); $scope.SetAIwindowStoreData(windowviewid, 'x', ui.position.left); $rootScope.UnsaveCurriculum = true; + $rootScope.resetMenuOptionOnClick(pnlName); } }, @@ -1289,18 +1312,27 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout var canvas = document.getElementById("canvasAI_" + windowviewid); var canvasPaint = document.getElementById("canvasPaintAI_" + windowviewid); - - canvas.height = canvasDIvHeight-30; - canvasPaint.height = canvasDIvHeight-30; + var $ua = navigator.userAgent; if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { canvas.width = screen.width-20; canvasPaint.width = screen.width-20; + canvas.height = screen.height-130; + canvasPaint.height = screen.height-130; } else - { + { + canvas.height = screen.height-280; + canvasPaint.height = screen.height-280; canvas.width = screen.width-40; canvasPaint.width = screen.width-40; + if($location.url()== "/curriculum-builder-detail") { + canvas.height = screen.height-300; + canvasPaint.height = screen.height-300; + canvas.width = screen.width-370; + canvasPaint.width = screen.width-370; + } + } $scope.SetAIwindowStoreData(windowviewid, 'currentSlug', 'adam-images-detail'); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js index 656e811..83175c2 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js @@ -238,7 +238,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout var $el = $('
' + '
').appendTo('#grid-view'); + + '

'+'ID: '+ value._ImageId + '

' + value._Title + '

').appendTo('#grid-view'); $compile($el)($scope); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js index 997edc0..8556861 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js @@ -114,15 +114,15 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } } - $rootScope.GetCAWindowId = function () { - // handle for single window - if ($rootScope.CAWindowData.length > 0) { - for (var x = 0 ; x < $rootScope.CAWindowData.length; x++) { + // access from home controller + $rootScope.SetCAwindowData=function(windowviewid,keyname,data) { + for(var x=0 ;x < $rootScope.CAWindowData.length;x++){ - return $rootScope.CAWindowData[x].multiwinid; + if($rootScope.CAWindowData[x].multiwinid==windowviewid) + { + $rootScope.CAWindowData[x][keyname]=data; } } - else return 0; } $scope.DisableUI = function () { @@ -695,8 +695,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } else { - $('#grid-view').css({"height":"720","overflow":"scroll"}); - $('#ListViewDiv').css({"height":"480","overflow":"scroll"}); + $('#grid-view').css({"height":"696","overflow":"scroll"}); + $('#ListViewDiv').css({"height":"460","overflow":"scroll"}); } } $scope.scroll = function () { @@ -732,7 +732,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout "textVisible": true, "windowTitle": $rootScope.ViewTitle, "size": { height: 600, width: 900 }, - "position": { x: 300, y: 110 } + "position": { x: 10, y: 30 } }; window.parent.AIAModuleOpenResourceInfo(CADopenData); @@ -783,9 +783,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } $rootScope.openCABodyViewMain = function () { - $scope.DisableUI(); + if ($rootScope.isCallFromOtherModule) { $scope.CAModuleData = ModuleService.getModuleData("CLINICAL_ANIMATIONS"); + if($scope.CAModuleData.length<1) return; + $scope.DisableUI(); $scope.readyToLoad = true; $rootScope.CAWindowLoadComplete = false; $scope.wincount = 1; @@ -823,6 +825,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } else { + $scope.DisableUI(); $scope.openBodyView(null); } } @@ -960,15 +963,17 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout if ($scope.caOpenInOtherModules.size.height < 510) $scope.jsPanelHeight = 510; - $scope.jsPanelLeft = $scope.caOpenInOtherModules.position.x; - if ($scope.caOpenInOtherModules.position.x < 20) - $scope.jsPanelLeft = 20; - $scope.jsPanelTop = $scope.caOpenInOtherModules.position.y; - - if($location.url()!= "/curriculum-builder-detail") { - $scope.jsPanelLeft = 1; - $scope.jsPanelTop = $rootScope.cBModulejsPanelTop(); - } + $scope.jsPanelLeft = $scope.caOpenInOtherModules.position.x; + if ($scope.caOpenInOtherModules.position.x < 20) + $scope.jsPanelLeft = 20; + $scope.jsPanelTop = $scope.caOpenInOtherModules.position.y; + if ($scope.caOpenInOtherModules.position.y < 35) + $scope.jsPanelTop = 35; + + if($location.url()!= "/curriculum-builder-detail") { + $scope.jsPanelLeft = 20; + $scope.jsPanelTop = 100; + } } } @@ -1016,6 +1021,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout height: $scope.jsPanelHeight }, onminimized:function (panel) { + var pnlName=panel[0].id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; var isAutoCalled = $scope.GetCAwindowStoreData(windowviewid, 'minmaxAutoEvent'); if(!isAutoCalled) { @@ -1025,6 +1033,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.SetCAwindowStoreData(windowviewid, 'maximised',false); }, onmaximized:function (panel) { + var pnlName=panel[0].id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; var isAutoCalled = $scope.GetCAwindowStoreData(windowviewid, 'minmaxAutoEvent'); if(!isAutoCalled) { @@ -1034,6 +1045,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.SetCAwindowStoreData(windowviewid, 'minimised',false); var canvasDIvHeight = $('#caImagePanel_' + windowviewid+ " .jsPanel-content").height(); $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-120 ); + $rootScope.resetMenuOptionOnClick(pnlName); }, onnormalized:function (panel) { var isAutoCalled = $scope.GetCAwindowStoreData(windowviewid, 'minmaxAutoEvent'); @@ -1045,26 +1057,33 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.SetCAwindowStoreData(windowviewid, 'maximised',false); var canvasDIvHeight = $('#caImagePanel_' + windowviewid+ " .jsPanel-content").height(); $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-120 ); + $rootScope.resetMenuOptionOnClick(pnlName); }, resizable: { stop: function (event, ui) { - var len = (event.currentTarget.id).split("_").length; - var windowviewid = (event.currentTarget.id).split("_")[len - 1]; + var pnlName=event.currentTarget.id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; $scope.SetCAwindowStoreData(windowviewid, 'width', ui.size.width); $scope.SetCAwindowStoreData(windowviewid, 'height', ui.size.height); + $scope.SetCAwindowStoreData(windowviewid, 'y', ui.position.top); + $scope.SetCAwindowStoreData(windowviewid, 'x', ui.position.left); $rootScope.UnsaveCurriculum = true; var canvasDIvHeight = $('#caImagePanel_' + windowviewid+ " .jsPanel-content").height(); $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-120 ); + $rootScope.resetMenuOptionOnClick(pnlName); } }, draggable: { stop: function( event, ui ) { - var len = (event.currentTarget.id).split("_").length; - var windowviewid = (event.currentTarget.id).split("_")[len - 1]; + var pnlName=event.currentTarget.id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; $scope.SetCAwindowStoreData(windowviewid, 'y', ui.position.top); $scope.SetCAwindowStoreData(windowviewid, 'x', ui.position.left); $rootScope.UnsaveCurriculum = true; + $rootScope.resetMenuOptionOnClick(pnlName); } }, diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js index b712c45..d182d3a 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js @@ -715,7 +715,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } else { - $('#grid-view').css({"height":"720","overflow":"scroll"}); + $('#grid-view').css({"height":"696","overflow":"scroll"}); $('#ListViewDiv').css({"height":"480","overflow":"scroll"}); } } @@ -753,8 +753,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout "mType": 'CLINICAL_ILLUSTRATIONS', "textVisible": true, "windowTitle": $rootScope.ViewTitle, - "size": { height: 500, width: 900 }, - "position": { x: 300, y: 110 } + "size": { height: 600, width: 900 }, + "position": { x: 10, y: 30 } }; window.parent.AIAModuleOpenResourceInfo(CIDopenData); @@ -796,9 +796,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } $rootScope.openCIBodyViewMain = function () { - $scope.DisableUI(); if ($rootScope.isCallFromOtherModule) { $scope.CIModuleData = ModuleService.getModuleData("CLINICAL_ILLUSTRATIONS"); + if($scope.CIModuleData.length<1) return; + $scope.DisableUI(); $scope.readyToLoad = true; $rootScope.CIWindowLoadComplete = false; $scope.wincount = 1; @@ -836,6 +837,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } else { + $scope.DisableUI(); $scope.openBodyView(null); } } @@ -944,15 +946,17 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout if ($scope.ciOpenInOtherModules.size.height < 540) $scope.jsPanelHeight = 540; - $scope.jsPanelLeft = $scope.ciOpenInOtherModules.position.x; - if ($scope.ciOpenInOtherModules.position.x < 20) - $scope.jsPanelLeft = 20; - $scope.jsPanelTop = $scope.ciOpenInOtherModules.position.y; - - if($location.url()!= "/curriculum-builder-detail") { - $scope.jsPanelLeft = 1; - $scope.jsPanelTop = $rootScope.cBModulejsPanelTop(); - } + $scope.jsPanelLeft = $scope.ciOpenInOtherModules.position.x; + if ($scope.ciOpenInOtherModules.position.x < 20) + $scope.jsPanelLeft = 20; + $scope.jsPanelTop = $scope.ciOpenInOtherModules.position.y; + if ($scope.ciOpenInOtherModules.position.y < 35) + $scope.jsPanelTop = 35; + + if($location.url()!= "/curriculum-builder-detail") { + $scope.jsPanelLeft = 20; + $scope.jsPanelTop = 100; + } } else { @@ -974,7 +978,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout '
' + //'
' + '' + - '
' + + '
' + '

' + selectedImageCISummary + '

' + '
' + '
'+ @@ -990,6 +994,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout height: $scope.jsPanelHeight }, onminimized:function (panel) { + var pnlName=panel[0].id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; var isAutoCalled = $scope.GetCIwindowStoreData(windowviewid, 'minmaxAutoEvent'); if(!isAutoCalled) { @@ -999,6 +1006,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.SetCIwindowStoreData(windowviewid, 'maximised',false); }, onmaximized:function (panel) { + var pnlName=panel[0].id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; var isAutoCalled = $scope.GetCIwindowStoreData(windowviewid, 'minmaxAutoEvent'); if(!isAutoCalled) { @@ -1008,8 +1018,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.SetCIwindowStoreData(windowviewid, 'minimised',false); var canvasDIvHeight = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").height(); $('#canvasDivCI_' + windowviewid).css('height', canvasDIvHeight); + $rootScope.resetMenuOptionOnClick(pnlName); + }, onnormalized:function (panel) { + var pnlName=panel[0].id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; var isAutoCalled = $scope.GetCIwindowStoreData(windowviewid, 'minmaxAutoEvent'); if(!isAutoCalled) { @@ -1019,13 +1034,17 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.SetCIwindowStoreData(windowviewid, 'maximised',false); var canvasDIvHeight = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").height(); $('#canvasDivCI_' + windowviewid).css('height', canvasDIvHeight); + $rootScope.resetMenuOptionOnClick(pnlName); }, resizable: { stop: function (event, ui) { - var len = (event.currentTarget.id).split("_").length; - var windowviewid = (event.currentTarget.id).split("_")[len - 1]; + var pnlName=event.currentTarget.id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; $scope.SetCIwindowStoreData(windowviewid, 'width', ui.size.width); $scope.SetCIwindowStoreData(windowviewid, 'height', ui.size.height); + $scope.SetCIwindowStoreData(windowviewid, 'y', ui.position.top); + $scope.SetCIwindowStoreData(windowviewid, 'x', ui.position.left); $rootScope.UnsaveCurriculum = true; var canvasDIvHeight = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").height(); //annotation lost after resize paint canvas @@ -1038,6 +1057,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout // canvasPaint.width = canvasDIvWidth; $('#canvasDivCI_' + windowviewid).css('height', canvasDIvHeight); + $rootScope.resetMenuOptionOnClick(pnlName); } @@ -1045,11 +1065,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout }, draggable: { stop: function( event, ui ) { - var len = (event.currentTarget.id).split("_").length; - var windowviewid = (event.currentTarget.id).split("_")[len - 1]; + var pnlName=event.currentTarget.id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; $scope.SetCIwindowStoreData(windowviewid, 'y', ui.position.top); $scope.SetCIwindowStoreData(windowviewid, 'x', ui.position.left); $rootScope.UnsaveCurriculum = true; + $rootScope.resetMenuOptionOnClick(pnlName); } }, @@ -1075,36 +1097,51 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.SetCIwindowStoreData(windowviewid, 'currentSlug', 'clinical-illustrations-detail'); + var $ua = navigator.userAgent; + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { + $('#summary_' + windowviewid).css("top", screen.height-270); + } + else + { + $('#summary_' + windowviewid).css("top", screen.height-420); + } $timeout(function () { var canvasDIvHeight = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").height(); $('#canvasDivCI_' + windowviewid).css('height', canvasDIvHeight); - if (!$rootScope.isCallFromOtherModule) { - $('#CIView').css("height", $(window).outerHeight() - 65); - $('#CIView').css("width", $(window).outerWidth() - 15); - + if (!$rootScope.isCallFromOtherModule) { + $('#CIView').css("height", $(window).innerHeight()-100); + $('#CIView').css("width",$(window).innerWidth()-100); + } + var canvas = document.getElementById("canvasCI_" + windowviewid); var canvasPaint = document.getElementById("canvasPaintCI_" + windowviewid); - canvas.height = canvasDIvHeight-30; - canvasPaint.height = canvasDIvHeight-30; - + var $ua = navigator.userAgent; if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { canvas.width = screen.width-20; canvasPaint.width = screen.width-20; + canvas.height = screen.height-270; + canvasPaint.height = screen.height-270; } else { canvas.width = screen.width-40; canvasPaint.width = screen.width-40; + canvas.height = screen.height-400; + canvasPaint.height = screen.height-400; + + if($location.url()== "/curriculum-builder-detail") { + canvas.width = screen.width-370; + canvasPaint.width = screen.width-370; + } + } if(screen.height<400) { $('#summary_' + windowviewid).css("bottom", "-220px"); } - - } var openedImage = document.getElementById('ciimage_' + windowviewid ); openedImage.src = selectedCIImage; diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js index 7ca2e04..eeb476f 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js @@ -288,7 +288,6 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ } $rootScope.OpenExistingCurriculum = function (event) { - var fileupload = document.getElementById("openCBJsonFile"); $timeout(function () { $(fileupload).trigger('click'); @@ -299,21 +298,21 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ var extension=''; var fileId, file, objFileRead; if (typeof window.FileReader !== 'function') { - $rootScope.errorMessage = "The file API isn't supported on this browser yet."; + $('#errorMessage').text(AIAConstants.File_API_Not_Supported); $("#messageModal").modal('show'); return; } fileId = document.getElementById('openCBJsonFile'); if (!fileId) { - $rootScope.errorMessage = "File couldn't find the element."; + $('#errorMessage').text(AIAConstants.File_No_Content_Found); $("#messageModal").modal('show'); } else if (!fileId.files) { - $rootScope.errorMessage = "This browser doesn't seem to support the `files` property of file inputs."; + $('#errorMessage').text(AIAConstants.Browser_Not_Supported); $("#messageModal").modal('show'); } else if (!fileId.files[0]) { - $rootScope.errorMessage = "Please select a file before clicking 'Load'."; + $('#errorMessage').text(AIAConstants.Select_File); $("#messageModal").modal('show'); } else @@ -327,7 +326,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ } else { - $rootScope.errorMessage = AIAConstants.CB_FILE_FORMAT_ISSUE; + $('#errorMessage').text(AIAConstants.CB_FILE_FORMAT_ISSUE); $("#messageModal").modal('show'); } @@ -454,21 +453,21 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ var myfileName=''; var fileId, file, objFileRead; if (typeof window.FileReader !== 'function') { - $rootScope.errorMessage = "The file API isn't supported on this browser yet."; + $('#errorMessage').text(AIAConstants.File_API_Not_Supported); $("#messageModal").modal('show'); return; } fileId = document.getElementById('xmltojsonfile'); if (!fileId) { - $rootScope.errorMessage = "File couldn't find the element."; + $('#errorMessage').text(AIAConstants.File_No_Content_Found); $("#messageModal").modal('show'); } else if (!fileId.files) { - $rootScope.errorMessage = "This browser doesn't seem to support the `files` property of file inputs."; + $('#errorMessage').text(AIAConstants.Browser_Not_Supported); $("#messageModal").modal('show'); } else if (!fileId.files[0]) { - $rootScope.errorMessage = "Please select a file before clicking 'Load'."; + $('#errorMessage').text(AIAConstants.Select_File); $("#messageModal").modal('show'); } else @@ -485,7 +484,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ } else { - $rootScope.errorMessage = AIAConstants.CB_FILE_FORMAT_ISSUE;""; + $('#errorMessage').text(AIAConstants.CB_FILE_FORMAT_ISSUE); $("#messageModal").modal('show'); } @@ -525,19 +524,8 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $scope.convertDownLoad = function (curriculumobject,myfileName) { var blob = new Blob([angular.toJson(curriculumobject, true)], { type: 'text/json' }); - - // document.execCommand("SaveAs", true, myfileName); - - // var event = document.createEvent('MouseEvents'), - // saveElement = document.createElement('a'); - // saveElement.download = myfileName; - // saveElement.href = window.URL.createObjectURL(blob); - // saveElement.dataset.downloadurl = ['text/json', saveElement.download, saveElement.href].join(':'); - // event.initEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); - // saveElement.dispatchEvent(event); - //save file saver handle for all browser - saveAs(blob, filename); + saveAs(blob, myfileName); } $scope.checkCompatibility = function (curriculumobject) { @@ -734,7 +722,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ title: $rootScope.cbTreeFirstLabel, position: { - top: 10, + top: 5, left: 10, }, controls: { buttons: 'closeonly' }, @@ -1203,16 +1191,16 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ if (password.trim() == "") { - $('#errorMsg').text('password required!'); + $('#errorMsg').text(AIAConstants.CB_Password_Required); return; } if (confirm_password.trim() == "") { - $('#errorMsg').text('confirm password required!'); + $('#errorMsg').text(AIAConstants.CB_Confirm_Password); return; } if (password != confirm_password) { - $('#errorMsg').text('confirm password not matched!'); + $('#errorMsg').text(AIAConstants.CB_Confirm_Password_Not_Match); return false; } $('#errorMsg').text(''); @@ -1236,10 +1224,9 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $scope.cbUnlockSlide = function () { var nodeid = document.getElementById('cbSelect').value; var password = $('#slidepass').val(); - if (password.trim() == "") { - $rootScope.errorMessage = "Password field is empty.please try again!"; + $('#errorMessage').text(AIAConstants.CB_Password_Empty); $("#messageModal").modal('show'); return; } @@ -1250,7 +1237,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ traverseTreeSelectedSingleObj($rootScope.structureObjForSaveCB, nodeid); if ($scope.selectedNodeSingleObj._isBranch == "false") { if (password != $scope.selectedNodeSingleObj._password) { - $rootScope.errorMessage = "Password is not matched.please try again!"; + $('#errorMessage').text(AIAConstants.CB_Password_Not_Match); $("#messageModal").modal('show'); return false; } @@ -1443,21 +1430,21 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ var extension=''; var fileId, file, objFileRead; if (typeof window.FileReader !== 'function') { - $rootScope.errorMessage = "The file API isn't supported on this browser yet."; + $('#errorMessage').text(AIAConstants.File_API_Not_Supported); $("#messageModal").modal('show'); return; } fileId = document.getElementById('openCBJsonFile'); if (!fileId) { - $rootScope.errorMessage = "File couldn't find the element."; + $('#errorMessage').text(AIAConstants.File_No_Content_Found); $("#messageModal").modal('show'); } else if (!fileId.files) { - $rootScope.errorMessage = "This browser doesn't seem to support the `files` property of file inputs."; + $('#errorMessage').text(AIAConstants.Browser_Not_Supported); $("#messageModal").modal('show'); } else if (!fileId.files[0]) { - $rootScope.errorMessage = "Please select a file before clicking 'Load'."; + $('#errorMessage').text(AIAConstants.Select_File); $("#messageModal").modal('show'); } else { @@ -1472,7 +1459,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ } else { - $rootScope.errorMessage = AIAConstants.CB_FILE_FORMAT_ISSUE; + $('#errorMessage').text(AIAConstants.CB_FILE_FORMAT_ISSUE); $("#messageModal").modal('show'); } @@ -1608,8 +1595,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ } $rootScope.ExportSection = function () { - var currentid = document.getElementById('cbSelect').value; - + var currentid = document.getElementById('cbSelect').value; if ($rootScope.contentNotesForSaveCB.length == 0) { $rootScope.contentNotesForSaveCB = $rootScope.cbDynamicContents; } @@ -1620,7 +1606,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ var strFromParent=$scope.selectedNodeSingleObj['structure']; if(strFromParent.length<=0) { - $rootScope.errorMessage = "Please add slide first to export this section."; + $('#errorMessage').text(AIAConstants.CB_Add_Slide_First); $("#messageModal").modal('show'); return; } @@ -1632,11 +1618,12 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ } $rootScope.ExportCurriculum =function() - { + { + $('#errorMessage').text(""); var filename = document.getElementById("filename").value; if (filename == "" ||filename == " ") { - $rootScope.errorMessage = "Curriculum name is empty!"; + $('#errorMessage').text(AIAConstants.CB_Curriculum_Name_Empty); $("#messageModal").modal('show'); return; } @@ -1713,7 +1700,8 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ } $scope.saveCBwithAnimation=function(downloadtype,filename) - { + { + $('#errorMessage').text(""); if($rootScope.collectAnimationSource.length>0) { $rootScope.loadingAnimationstatus=1; @@ -1757,7 +1745,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $rootScope.dynamicUpdatedJsonForSaveCB = ""; $('#uploading-curriculum').css("display", "none"); $("#filename").val(""); - $rootScope.errorMessage = AIAConstants.SAVE_ANIMATION_ERROR+"\n"+error.ExceptionMessage;; + $('#errorMessage').text(AIAConstants.SAVE_ANIMATION_ERROR+"\n"+error.ExceptionMessage); $("#messageModal").modal('show'); }, function(progress){ @@ -1787,17 +1775,6 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $rootScope.UnsaveCurriculum = false; var blob = new Blob([angular.toJson($rootScope.dynamicUpdatedJsonForSaveCB, true)], { type: 'text/json' }); } - - // document.execCommand("SaveAs", true, filename); - - // var event = document.createEvent('MouseEvents'), - // saveElement = document.createElement('a'); - // saveElement.download = filename; - // saveElement.href = window.URL.createObjectURL(blob); - // saveElement.dataset.downloadurl = ['text/json', saveElement.download, saveElement.href].join(':'); - // event.initEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); - // saveElement.dispatchEvent(event); - //save file saver handle for all browser saveAs(blob, filename); @@ -2224,10 +2201,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ } $rootScope.saveMyCurricullam = function () { + $('#errorMessage').text(""); var filename = document.getElementById("filename").value; if (filename == "" ||filename == " ") { - $rootScope.errorMessage = "Curriculum name is empty!"; + $('#errorMessage').text(AIAConstants.CB_Curriculum_Name_Empty); $("#messageModal").modal('show'); return; } @@ -2404,7 +2382,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $scope.loadContentOfSelectedSlide = function (id) { - console.log("id= " + id) + $('#errorMessage').text(""); if ($rootScope.contentNotesForSaveCB.length == 0) { $rootScope.contentNotesForSaveCB = $rootScope.cbDynamicContents; } @@ -2446,7 +2424,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ if (!annotation.hasOwnProperty(shapeStates) || !annotation.hasOwnProperty(paintCanvasState)) { $rootScope.UnsaveCurriculum = true; - $rootScope.errorMessage =AIAConstants.CB_OLD_SLIDE_ANNOTATION_ISSUE; + $('#errorMessage').text(AIAConstants.CB_OLD_SLIDE_ANNOTATION_ISSUE); $("#messageModal").modal('show'); windowData.annotationData=""; } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 091f2b2..a86a883 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -516,7 +516,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l "windowTitle": $event.currentTarget.textContent, "zoom": 75, "size":{height:600,width:900}, - "position": { x: 300, y: 110 }, + "position": { x: 10, y: 30 }, "mType": 'DISSECTIBLE_ANATOMY', "isModestyOn":userModestysettings, "skinId": userEthnicity, @@ -665,11 +665,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } - $rootScope.openDABodyViewMain = function () { - $scope.ScopeVariablesDeclare(); - $scope.DisableUI(); + $rootScope.openDABodyViewMain = function () { if ($rootScope.isCallFromOtherModule) { $scope.DAModuleData = ModuleService.getModuleData("DISSECTIBLE_ANATOMY"); + if($scope.DAModuleData.length<1) return; + $scope.ScopeVariablesDeclare(); + $scope.DisableUI(); $scope.readyToLoad=true; $rootScope.DAWindowLoadComplete = false; $scope.wincount=1; @@ -712,6 +713,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } else { + $scope.ScopeVariablesDeclare(); + $scope.DisableUI(); $scope.openBodyView(null); } @@ -736,7 +739,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.SetwindowStoreData(windowviewid,'currentViewTitle',$scope.daOpenInOtherModules.windowTitle); localStorage.setItem("currentViewTitle", $scope.daOpenInOtherModules.windowTitle); $scope.jsPanelID = 'daImagePanel' + '_' + windowviewid; - $scope.viewID = 'daViewDA_' + windowviewid; console.log('$location.url = ' + $location.url()) var skinValue=$scope.daOpenInOtherModules.skinId; @@ -838,7 +840,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.SetwindowStoreData(windowviewid, 'voId', $rootScope.getLocalStorageValue("currentBodyViewId")); $scope.jsPanelID = 'daImagePanel' + '_' + windowviewid; - $scope.viewID = 'daViewDA' + '_' + windowviewid; $scope.SetwindowStoreData(windowviewid, 'parentSlugName', 'da-view-list'); $scope.loadTermData(windowviewid); @@ -938,10 +939,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l if ($scope.daOpenInOtherModules.position.x < 20) $scope.jsPanelLeft = 20; $scope.jsPanelTop = $scope.daOpenInOtherModules.position.y; - + if ($scope.daOpenInOtherModules.position.y < 35) + $scope.jsPanelTop = 35; + if($location.url()!= "/curriculum-builder-detail") { - $scope.jsPanelLeft = 1; - $scope.jsPanelTop = $rootScope.cBModulejsPanelTop(); + $scope.jsPanelLeft = 20; + $scope.jsPanelTop = 100; } } @@ -974,6 +977,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l height: $scope.jsPanelHeight }, onminimized:function (panel) { + var pnlName=panel[0].id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; var isAutoCalled = $scope.GetwindowStoreData(windowviewid, 'minmaxAutoEvent'); if(!isAutoCalled) { @@ -983,6 +989,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.SetwindowStoreData(windowviewid, 'maximised',false); }, onmaximized:function (panel) { + var pnlName=panel[0].id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; var isAutoCalled = $scope.GetwindowStoreData(windowviewid, 'minmaxAutoEvent'); if(!isAutoCalled) { @@ -993,39 +1002,57 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-50; $('#canvasDivDA_' + windowviewid).css('height', canvasDIvHeight); + $rootScope.resetMenuOptionOnClick(pnlName); }, onnormalized:function (panel) { - var isAutoCalled = $scope.GetwindowStoreData(windowviewid, 'minmaxAutoEvent'); - if(!isAutoCalled) - { - $rootScope.UnsaveCurriculum = true; - } - $scope.SetwindowStoreData(windowviewid, 'minimised',false); - $scope.SetwindowStoreData(windowviewid, 'maximised',false); - var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-50; - - $('#canvasDivDA_' + windowviewid).css('height', canvasDIvHeight); + var pnlName=panel[0].id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; + var isAutoCalled = $scope.GetwindowStoreData(windowviewid, 'minmaxAutoEvent'); + if(!isAutoCalled) + { + $rootScope.UnsaveCurriculum = true; + } + $scope.SetwindowStoreData(windowviewid, 'minimised',false); + $scope.SetwindowStoreData(windowviewid, 'maximised',false); + var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-50; + + $('#canvasDivDA_' + windowviewid).css('height', canvasDIvHeight); + $rootScope.resetMenuOptionOnClick(pnlName); + }, resizable: { stop: function (event, ui) { - var len = (event.currentTarget.id).split("_").length; - var windowviewid = (event.currentTarget.id).split("_")[len - 1]; + var pnlName=event.currentTarget.id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; $scope.SetwindowStoreData(windowviewid, 'width', ui.size.width); $scope.SetwindowStoreData(windowviewid, 'height', ui.size.height); + $scope.SetwindowStoreData(windowviewid, 'y', ui.position.top); + $scope.SetwindowStoreData(windowviewid, 'x', ui.position.left); $rootScope.UnsaveCurriculum = true; var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-50; $('#canvasDivDA_' + windowviewid).css('height', canvasDIvHeight); + $('#da-input_'+windowviewid).removeClass(); + if(ui.size.width<700) + $('#da-input_'+windowviewid).addClass('input-group col-sm-6 col-xs-7 col-md-5 pull-left'); + else{ + $('#da-input_'+windowviewid).addClass('input-group col-sm-6 col-xs-7 col-md-7 pull-left'); + } + $rootScope.resetMenuOptionOnClick(pnlName); } }, draggable: { stop: function( event, ui ) { - var len = (event.currentTarget.id).split("_").length; - var windowviewid = (event.currentTarget.id).split("_")[len - 1]; + var pnlName=event.currentTarget.id; + var len = (pnlName).split("_").length; + var windowviewid = (pnlName).split("_")[len - 1]; $scope.SetwindowStoreData(windowviewid, 'y', ui.position.top); $scope.SetwindowStoreData(windowviewid, 'x', ui.position.left); $rootScope.UnsaveCurriculum = true; + $rootScope.resetMenuOptionOnClick(pnlName); } }, @@ -1076,7 +1103,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.dropdownMenu4ID = "dropdownMenu4"; $scope.genderChangeID = "genderChangeId"; $scope.structureDropdownID = "structureDropdown"; - $scope.viewID = "daView"; $scope.viewChangeID = "viewChangeID"; $scope.btnStrutureBoxID = "btnStrutureBox"; $scope.typedTermNameID = "typedTermName"; @@ -1320,8 +1346,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.langSearchLoad= function(windowviewid) { - $('#searchlangaugeDiv').empty(); - $('#searchlangaugeDiv').css("display","none"); + $('#searchlangaugeDiv_'+windowviewid).empty(); + $('#searchlangaugeDiv_'+windowviewid).css("display","none"); var languageArray = $rootScope.lexiconLanguageArray; $("#btnDATermSearch_"+windowviewid).parent().css("margin-right", "10px"); @@ -1329,12 +1355,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l if(languageArray.length>1) { $("#btnDATermSearch_"+windowviewid).parent().css("margin-right", "-10px"); - $('#searchlangaugeDiv').css("display","block"); + $('#searchlangaugeDiv_'+windowviewid).css("display","block"); var option=''; for (var i = 0; i <= languageArray.length - 1; i++) { option=option+''; } - var $all = $('#searchlangaugeDiv').append( + var $all = $('#searchlangaugeDiv_'+windowviewid).append( '
'+ '