diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js index d5d747d..2bb7e4a 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js @@ -506,10 +506,10 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location $("#ThreeDImagePanel_" + windowviewid).unbind('mouseenter');// remove prev event $("#ThreeDImagePanel_" + windowviewid).on('mouseenter', function (event) { - // var pnlName = event.currentTarget.id; + var pnlName = event.currentTarget.id; //console.log('Mouse enter fired: ' + event.currentTarget.id); $scope.$emit("cBEnableDisableMenuOption", ""); - $rootScope.resetMenuOptionOnClick(""); + $rootScope.resetMenuOptionOnClick(pnlName); }); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js index e34714a..339368a 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js @@ -785,13 +785,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $location.path('/'); } - if ($rootScope.disableAnnotationTB == true) - { - $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').attr('disabled', 'disabled'); - $('#slider-range-min-2').slider('disable'); - $("#annotationpaintbrushsize").attr('disabled', 'disabled'); - //$("#annotationpaintbrushsize").attr("href", "#"); - } $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -965,8 +958,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $rootScope.resetMenuOption(); // call from while open module in CB $("#caImagePanel_" + windowviewid).on('click', function (event) { - $rootScope.resetMenuOptionOnClick(""); - // var pnlName = event.currentTarget.id; + var pnlName = event.currentTarget.id; + $rootScope.resetMenuOptionOnClick(pnlName); $scope.$emit("cBEnableDisableMenuOption", ""); }); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 4bce46b..63b7456 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -53,8 +53,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.isModestyOn; $rootScope.isModestyOff; $rootScope.SetSettingActiveTab; - $rootScope.disableMenuannotation = "disableMenuannotation"; - $rootScope.disableMenuoption = "disableMenuoption"; + $("#annotationButton").addClass("disableMenuoption"); + $("#Menuoptionid").addClass("disableMenuoption"); $rootScope.menuLabExer; $rootScope.menuLabExer = 0; @@ -1649,18 +1649,19 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data var currentRoute = $location.path().substring(1); return moduleUrl === currentRoute ? 'active' : ''; } - $("#annotationToolBarOptions").removeClass("disableMenuoption"); + $("#annotationToolBarOptions").removeClass("disableSubMenu"); $("#optionsListManagerTab").removeClass("disableSubMenu"); $("#optiontSetting").removeClass("disableSubMenu"); var userInformation = $rootScope.userData; if (($location.url() == "/da-body-view")) { - $rootScope.disableMenuannotation = " "; - $rootScope.disableMenuoption = " "; - $rootScope.disableSubMenu = "disableSubMenu"; + $("#annotationButton").removeClass("disableMenuoption"); + $("#Menuoptionid").removeClass("disableMenuoption"); + $("#labExPdfOption").addClass("disableSubMenu"); $rootScope.disableFileMenu = " "; $rootScope.openResources = ""; $rootScope.OpenPitures = "OpenPitures"; + $rootScope.disableMenuoption = "disableMenuoption"; $rootScope.newCurriculum = "newCurriculum"; $rootScope.openCurriculum = "openCurriculum"; $rootScope.saveCurriculam = "saveCurriculam"; @@ -1671,15 +1672,16 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data } else if ($location.url() == "/clinical-illustrations-detail") { - $rootScope.disableMenuannotation = " "; - $rootScope.disableMenuoption = " "; - $rootScope.disableSubMenu = "disableSubMenu"; + $("#annotationButton").removeClass("disableMenuoption"); + $("#Menuoptionid").removeClass("disableMenuoption"); + $("#labExPdfOption").addClass("disableSubMenu"); $("#annotationToolBarOptions").removeClass("disableSubMenu"); $("#optionsListManagerTab").addClass("disableSubMenu"); $("#optiontSetting").addClass("disableSubMenu"); $rootScope.disableFileMenu = " "; $rootScope.openResources = ""; $rootScope.OpenPitures = "OpenPitures"; + $rootScope.disableMenuoption = "disableMenuoption"; $rootScope.newCurriculum = "newCurriculum"; $rootScope.openCurriculum = "openCurriculum"; $rootScope.saveCurriculam = "saveCurriculam"; @@ -1689,14 +1691,15 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $scope.EnableDisableExportImage(); } else if ($location.url() == "/module-item-view") { - $rootScope.disableMenuannotation = " "; - $rootScope.disableMenuoption = " "; + $("#annotationButton").removeClass("disableMenuoption"); + $("#Menuoptionid").removeClass("disableMenuoption"); $("#optiontSetting").addClass("disableSubMenu"); - $rootScope.disableSubMenu = "disableSubMenu"; + $("#labExPdfOption").addClass("disableSubMenu"); $("#annotationToolBarOptions").removeClass("disableSubMenu"); $rootScope.disableFileMenu = " "; $rootScope.openResources = ""; $rootScope.OpenPitures = "OpenPitures"; + $rootScope.disableMenuoption = "disableMenuoption"; $rootScope.newCurriculum = "newCurriculum"; $rootScope.openCurriculum = "openCurriculum"; $rootScope.saveCurriculam = "saveCurriculam"; @@ -1707,14 +1710,15 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data } else if ($location.url() == "/clinical-animations-detail") { - $rootScope.disableMenuannotation = "disableMenuannotation"; - $rootScope.disableMenuoption = "disableMenuoption"; - $rootScope.disableSubMenu = "disableSubMenu"; + $("#annotationButton").addClass("disableMenuoption"); + $("#Menuoptionid").addClass("disableMenuoption"); + $("#labExPdfOption").addClass("disableSubMenu"); $("#annotationToolBarOptions").addClass("disableSubMenu"); $("#optionsListManagerTab").addClass("disableSubMenu"); $rootScope.disableFileMenu = " "; $rootScope.openResources = ""; $rootScope.OpenPitures = "OpenPitures"; + $rootScope.disableMenuoption = "disableMenuoption"; $rootScope.newCurriculum = "newCurriculum"; $rootScope.openCurriculum = "openCurriculum"; $rootScope.saveCurriculam = "saveCurriculam"; @@ -1726,8 +1730,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.openResources = "openResources"; - $rootScope.disableMenuannotation = "disableMenuannotation"; - $rootScope.disableMenuoption = "disableMenuoption"; + $("#annotationButton").addClass("disableMenuoption"); + $("#Menuoptionid").addClass("disableMenuoption"); $rootScope.PrintPreview = "PrintPreview"; $rootScope.PrintViewer = "PrintViewer"; @@ -1735,32 +1739,36 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.openCurriculum = ""; $rootScope.saveCurriculam = "saveCurriculam"; - $rootScope.disableSubMenu = "disableSubMenu"; + $("#labExPdfOption").addClass("disableSubMenu"); $rootScope.OpenPitures = "OpenPitures"; + $rootScope.disableMenuoption = "disableMenuoption"; $rootScope.disableFileMenu = ""; $rootScope.exportImage = "exportImage"; } else if ($location.url() == "/curriculum-builder-detail") { $rootScope.disableFileMenu = ""; - $rootScope.disableMenuoption = "disableMenuoption"; + $("#Menuoptionid").addClass("disableMenuoption"); $rootScope.PrintPreview = "PrintPreview"; $rootScope.PrintViewer = "PrintViewer"; $rootScope.newCurriculum = ""; $rootScope.openCurriculum = ""; $rootScope.saveCurriculam = ""; $rootScope.openResources = ""; + $rootScope.OpenPitures = "OpenPitures"; + $rootScope.disableMenuoption = "disableMenuoption"; $rootScope.exportImage = "exportImage"; } else if ($location.url() == "/adam-images-detail") { - $rootScope.disableMenuannotation = " "; - $rootScope.disableMenuoption = " "; - $rootScope.disableSubMenu = "disableSubMenu"; + $("#annotationButton").removeClass("disableMenuoption"); + $("#Menuoptionid").removeClass("disableMenuoption"); + $("#labExPdfOption").addClass("disableSubMenu"); $("#annotationToolBarOptions").removeClass("disableSubMenu"); $("#optionsListManagerTab").addClass("disableSubMenu"); $("#optiontSetting").addClass("disableSubMenu"); $rootScope.disableFileMenu = " "; $rootScope.openResources = ""; $rootScope.OpenPitures = "OpenPitures"; + $rootScope.disableMenuoption = "disableMenuoption"; $rootScope.newCurriculum = "newCurriculum"; $rootScope.openCurriculum = "openCurriculum"; $rootScope.saveCurriculam = "saveCurriculam"; @@ -1770,14 +1778,15 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $scope.EnableDisableExportImage(); } else if ($location.url() == "/3d-anatomy-details") { - $rootScope.disableMenuannotation = "disableMenuannotation"; - $rootScope.disableMenuoption = "disableMenuoption"; - $rootScope.disableSubMenu = "disableSubMenu"; + $("#annotationButton").addClass("disableMenuoption"); + $("#Menuoptionid").addClass("disableMenuoption"); + $("#labExPdfOption").addClass("disableSubMenu"); $("#annotationToolBarOptions").addClass("disableSubMenu"); $("#optionsListManagerTab").addClass("disableSubMenu"); $rootScope.disableFileMenu = " "; $rootScope.openResources = ""; $rootScope.OpenPitures = "OpenPitures"; + $rootScope.disableMenuoption = "disableMenuoption"; $rootScope.newCurriculum = "newCurriculum"; $rootScope.openCurriculum = "openCurriculum"; $rootScope.saveCurriculam = "saveCurriculam"; @@ -1786,14 +1795,15 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.exportImage = "exportImage"; } else if ($location.url() == "/lab-exercise-view") { - $rootScope.disableMenuannotation = "disableMenuannotation"; - $rootScope.disableMenuoption = "disableMenuoption"; - $rootScope.disableSubMenu = "disableSubMenu"; + $("#annotationButton").addClass("disableMenuoption"); + $("#Menuoptionid").removeClass("disableMenuoption"); + $("#labExPdfOption").removeClass("disableSubMenu"); $("#annotationToolBarOptions").addClass("disableSubMenu"); $("#optionsListManagerTab").addClass("disableSubMenu"); $rootScope.disableFileMenu = " "; $rootScope.openResources = ""; $rootScope.OpenPitures = "OpenPitures"; + $rootScope.disableMenuoption = "disableMenuoption"; $rootScope.newCurriculum = "newCurriculum"; $rootScope.openCurriculum = "openCurriculum"; $rootScope.saveCurriculam = "saveCurriculam"; @@ -1804,9 +1814,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data else { $("#annotationToolBarOptions").removeClass("disableSubMenu"); $("#optionsListManagerTab").removeClass("disableSubMenu"); - $rootScope.disableMenuannotation = "disableMenuannotation"; - $rootScope.disableMenuoption = "disableMenuoption"; - $rootScope.disableSubMenu = ""; + $("#annotationButton").addClass("disableMenuoption"); + $("#Menuoptionid").addClass("disableMenuoption"); + $("#labExPdfOption").removeClass("disableSubMenu"); $rootScope.CloseAnnotationTool(); $rootScope.CloseListManager(); angular.element('#modal-settings').css('display', 'none'); @@ -1815,7 +1825,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.menuLabExer = 0; } if ($rootScope.menuLabExer == 1) { - $rootScope.disableMenuoption = " "; + $("#Menuoptionid").removeClass("disableMenuoption"); $("#annotationToolBarOptions").addClass("disableSubMenu"); $("#optionsListManagerTab").addClass("disableSubMenu"); $("#optionsCurriculum").addClass("disableSubMenu"); @@ -1869,56 +1879,94 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data return paneltopPosition; } -//reset option list manager and annotation when load -//call also when close module + $scope.disableTopMenuOption=function() + { + $("#annotationButton").addClass("disableMenuoption"); + $("#Menuoptionid").addClass("disableMenuoption"); + $("#optionsListManagerTab").addClass("disableSubMenu"); + $("#annotationToolBarOptions").addClass("disableSubMenu"); + $("#optionsCurriculum").addClass("disableSubMenu"); + $("#optiontSetting").addClass("disableSubMenu"); + $("#labExPdfOption").addClass("disableSubMenu"); + + //disble option popup + + $("#listManagerBody *").prop('disabled',true); + + } + $scope.enableTopMenuOption=function(paneld) + { + if(paneld.match('daImagePanel')) + { + $("#optionsListManagerTab").removeClass("disableSubMenu"); + $("#annotationButton").removeClass("disableMenuoption"); + $("#Menuoptionid").removeClass("disableMenuoption"); + $("#annotationToolBarOptions").removeClass("disableSubMenu"); + $("#optiontSetting").removeClass("disableSubMenu"); + + $("#listManagerBody *").prop('disabled',false); + } + else if(paneld.match('AAImagePanel')) + { + $("#optionsListManagerTab").removeClass("disableSubMenu"); + $("#annotationButton").removeClass("disableMenuoption"); + $("#Menuoptionid").removeClass("disableMenuoption"); + $("#annotationToolBarOptions").removeClass("disableSubMenu"); + + $("#listManagerBody *").prop('disabled',false); + } + else if(paneld.match('aiImagePanel')) + { + $("#annotationButton").removeClass("disableMenuoption"); + $("#Menuoptionid").removeClass("disableMenuoption"); + $("#annotationToolBarOptions").removeClass("disableSubMenu"); + } + else if(paneld.match('ciImagePanel')) + { + $("#annotationButton").removeClass("disableMenuoption"); + $("#Menuoptionid").removeClass("disableMenuoption"); + $("#annotationToolBarOptions").removeClass("disableSubMenu"); + } + else if(paneld.match('caImagePanel')) + { + //disable all option + } + + else if(paneld.match('labImagePanel')) + { + $("#Menuoptionid").removeClass("disableMenuoption"); + $("#labExPdfOption").removeClass("disableSubMenu"); + } + else if(paneld.match('ThreeDImagePanel')) + { + //disable all option + } + } + +//reset option when load $rootScope.resetMenuOption = function () { $timeout(function () { - var islistManagerActive=false; + $scope.disableTopMenuOption(); if ($location.url() != "/curriculum-builder-detail") { var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']"); if (modulePanel != undefined && modulePanel.length>0) { for (var i = 0 ; i < modulePanel.length; i++) { var paneld = modulePanel[i].id; - if(paneld.match('daImagePanel')||paneld.match('AAImagePanel')) - { - islistManagerActive=true; - } + $scope.enableTopMenuOption(paneld); } - } - if(islistManagerActive==true) - { - $("#optionsListManagerTab").removeClass("disableSubMenu"); - } - else - { - $("#optionsListManagerTab").addClass("disableSubMenu"); - } + } } }, 500); } - // enable/disable list manager option and annotation Panel click -$rootScope.resetMenuOptionOnClick = function (moduleName) { - if ($location.url() != "/curriculum-builder-detail") { - if (moduleName != "") { - if(moduleName.match('daImagePanel')||moduleName.match('AAImagePanel')) - { - $("#optionsListManagerTab").removeClass("disableSubMenu"); - } - else - { - $("#optionsListManagerTab").addClass("disableSubMenu"); - } - } - else - { - $("#optionsListManagerTab").addClass("disableSubMenu"); - } + // enable/disable option Panel click + $rootScope.resetMenuOptionOnClick = function (moduleName) { + if ($location.url() != "/curriculum-builder-detail") { + $scope.disableTopMenuOption(); + $scope.enableTopMenuOption(moduleName); + } - $scope.ListManagerViewDisableEnable(moduleName); - } - -} + } // CB: reset panel top position when if any module closed $rootScope.resetjsPanelTop = function () { @@ -1929,7 +1977,10 @@ $rootScope.resetMenuOptionOnClick = function (moduleName) { firsttopPosition = 680; } - var islistManagerActive=false; + if ($location.url() != "/curriculum-builder-detail") { + $scope.disableTopMenuOption(); + } + var moduleImagePanel = $("div[id*='ImagePanel']"); if (moduleImagePanel.length > 0) { @@ -1952,35 +2003,22 @@ $rootScope.resetMenuOptionOnClick = function (moduleName) { //Reset menu option like list manager,annotation when close module if ($location.url() != "/curriculum-builder-detail") { - var paneld = moduleImagePanel[index].id; - if(paneld.match('daImagePanel')||paneld.match('AAImagePanel')) - { - islistManagerActive=true; - } + var moduleName = moduleImagePanel[index].id; + $scope.enableTopMenuOption(moduleName); } } } - if ($location.url() != "/curriculum-builder-detail") { - if(islistManagerActive==true) - { - $("#optionsListManagerTab").removeClass("disableSubMenu"); - - } - else - { - $("#optionsListManagerTab").addClass("disableSubMenu"); - - } + if ($location.url() != "/curriculum-builder-detail") { // list manger already open then refresh it or close $scope.updateListManagerView(); - } + } }, 500); } - + //file menu option $scope.$on("cBEnableDisableMenuOption", function (evt, name) { @@ -2116,7 +2154,7 @@ $rootScope.resetMenuOptionOnClick = function (moduleName) { $rootScope.isAnnotatiomToolBarPopupActive = true; $rootScope.isAnnotatiomToolBarPopupClosed = false; $rootScope.isAnnotaionToolBarDrawingModeActive = false; - if ($rootScope.MenuModuleName == "DA" || $rootScope.MenuModuleName == "CI" || $rootScope.MenuModuleName == "AA") { + if ($rootScope.MenuModuleName == "DA" || $rootScope.MenuModuleName == "CI" || $rootScope.MenuModuleName == "AA" || $rootScope.MenuModuleName == "AI") { if ($rootScope.disableAnnotationtoolOnListManager == true) { $('#AnnotaionPopupDiv').find('a,input, textarea, button, select,img,div').attr('disabled', 'disabled'); $('#slider-range-min-2').slider('disable'); @@ -2145,9 +2183,7 @@ $rootScope.resetMenuOptionOnClick = function (moduleName) { // $("#annotationpainteraser").css('pointer-events', 'auto'); } $("#OnIdentify").addClass("annotationtoolbartab"); - $("#annotationToolBarOptions").addClass("active"); - $("#annotationButton").addClass("active"); - + $rootScope.isAnnotationWindowOpen = true; $(".annotationTollbar").css("display", "block"); $rootScope.$broadcast('annotationToolEvent', true); @@ -2215,11 +2251,7 @@ $rootScope.resetMenuOptionOnClick = function (moduleName) { $("#OnIdentify").removeClass("annotationtoolbartab"); $("#DrawMode").removeClass("annotationtoolbartab"); $('.btnCursor').removeClass('activebtncolor'); - $("#annotationButton").removeClass("active"); - $("#annotationButton").blur(); - $("#annotationToolBarOptions").removeClass("active"); - - + $(".annotationTollbar").css("display", "none"); $rootScope.isAnnotationWindowClose = true; $('.btnCursor').removeClass('activebtncolor'); @@ -5783,19 +5815,6 @@ $rootScope.resetMenuOptionOnClick = function (moduleName) { $rootScope.disableAnnotationTB = true; } - //list manager function - $scope.ListManagerViewDisableEnable = function (moduleName) { - if(moduleName.match('daImagePanel')||moduleName.match('AAImagePanel')) - { - $("#listManagerBody *").prop('disabled',false); - } - else - { - $("#listManagerBody *").prop('disabled',true); - } - - } - $scope.updateListManagerView = function () { $("#listManagerBody *").prop('disabled',false); @@ -5954,8 +5973,6 @@ $rootScope.resetMenuOptionOnClick = function (moduleName) { if (canvasPaintElement == null) return; var canvasPaintId = canvasPaintElement.id; - - // $("#optionsListManagerTab").removeClass("active"); $rootScope.isListManagerMenuSelected = false; console.log('listManager closed'); $rootScope.disableAnnotationtoolOnListManager = false; @@ -6586,9 +6603,8 @@ $rootScope.resetMenuOptionOnClick = function (moduleName) { $(".tools").css("z-index", "1029"); $rootScope.CloseListManager(); $rootScope.CloseAnnotationTool(); - $("#annotationButton").parent().addClass("disableMenuannotation"); - $("#annotationToolBarOptions").addClass("disableMenuoption"); - // $("#optionsListManagerTab").addClass("disableSubMenu"); + $("#annotationButton").addClass("disableMenuoption"); + $("#annotationToolBarOptions").addClass("disableSubMenu"); $('#dvPrintPreview').css('display', 'block'); html2canvas($("#" + canvasDivId), { onrendered: function (canvas) { @@ -6957,11 +6973,10 @@ $rootScope.resetMenuOptionOnClick = function (moduleName) { } if ($location.url() != "/curriculum-builder-detail") { - $("#annotationButton").parent().removeClass("disableMenuannotation"); + $("#annotationButton").removeClass("disableMenuoption"); } - $("#annotationToolBarOptions").removeClass("disableMenuoption"); - // $("#optionsListManagerTab").removeClass("disableSubMenu"); + $("#annotationToolBarOptions").removeClass("disableSubMenu"); $('#fileMenuAnchor').parent().removeClass('disableFileMenu'); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js index 21de0f0..5e495e5 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js @@ -459,9 +459,9 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, //call when module loaded $rootScope.resetMenuOption(); // call from while open module in CB - $("#labImagePanel_" + windowviewid).on('click', function (event) { - $rootScope.resetMenuOptionOnClick(""); - // var pnlName = event.currentTarget.id; + $("#labImagePanel_" + windowviewid).on('click', function (event) { + var pnlName = event.currentTarget.id; + $rootScope.resetMenuOptionOnClick(pnlName); $scope.$emit("cBEnableDisableMenuOption", ""); }); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html b/400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html index d17cc4b..7d1b1ca 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html @@ -5,11 +5,11 @@
-