Commit c98dcf1c3dca914e006155a2728baa5e568bfe23
1 parent
a2a28071
fixed list manager for mutiple DA panel
Showing
8 changed files
with
173 additions
and
41 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js
@@ -494,6 +494,11 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location | @@ -494,6 +494,11 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location | ||
494 | } | 494 | } |
495 | 495 | ||
496 | $scope.JsPanelMouseEnter = function (windowviewid) { | 496 | $scope.JsPanelMouseEnter = function (windowviewid) { |
497 | + | ||
498 | + //reset option list manager and annotation | ||
499 | + //call when module loaded | ||
500 | + $rootScope.resetMenuOption(); | ||
501 | + | ||
497 | // call from while open module in CB | 502 | // call from while open module in CB |
498 | 503 | ||
499 | //click event not work on object-tag document | 504 | //click event not work on object-tag document |
@@ -504,6 +509,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location | @@ -504,6 +509,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location | ||
504 | // var pnlName = event.currentTarget.id; | 509 | // var pnlName = event.currentTarget.id; |
505 | //console.log('Mouse enter fired: ' + event.currentTarget.id); | 510 | //console.log('Mouse enter fired: ' + event.currentTarget.id); |
506 | $scope.$emit("cBEnableDisableMenuOption", ""); | 511 | $scope.$emit("cBEnableDisableMenuOption", ""); |
512 | + $rootScope.resetMenuOptionOnClick(""); | ||
507 | 513 | ||
508 | }); | 514 | }); |
509 | 515 |
400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js
@@ -1205,10 +1205,16 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | @@ -1205,10 +1205,16 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | ||
1205 | } | 1205 | } |
1206 | 1206 | ||
1207 | $scope.JsPanelclick = function (windowviewid) { | 1207 | $scope.JsPanelclick = function (windowviewid) { |
1208 | + | ||
1209 | + //reset option list manager and annotation | ||
1210 | + //call when module loaded | ||
1211 | + $rootScope.resetMenuOption(); | ||
1212 | + | ||
1208 | // call from while open module in CB | 1213 | // call from while open module in CB |
1209 | $("#aiImagePanel_" + windowviewid).on('click', function (event) { | 1214 | $("#aiImagePanel_" + windowviewid).on('click', function (event) { |
1210 | 1215 | ||
1211 | var pnlName = event.currentTarget.id; | 1216 | var pnlName = event.currentTarget.id; |
1217 | + $rootScope.resetMenuOptionOnClick(pnlName); | ||
1212 | $scope.$emit("cBEnableDisableMenuOption", pnlName); | 1218 | $scope.$emit("cBEnableDisableMenuOption", pnlName); |
1213 | 1219 | ||
1214 | // store image for export while click on panel | 1220 | // store image for export while click on panel |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
@@ -959,9 +959,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | @@ -959,9 +959,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | ||
959 | } | 959 | } |
960 | 960 | ||
961 | $scope.JsPanelclick = function (windowviewid) { | 961 | $scope.JsPanelclick = function (windowviewid) { |
962 | + | ||
963 | + //reset option list manager and annotation | ||
964 | + //call when module loaded | ||
965 | + $rootScope.resetMenuOption(); | ||
962 | // call from while open module in CB | 966 | // call from while open module in CB |
963 | $("#caImagePanel_" + windowviewid).on('click', function (event) { | 967 | $("#caImagePanel_" + windowviewid).on('click', function (event) { |
964 | - | 968 | + $rootScope.resetMenuOptionOnClick(""); |
965 | // var pnlName = event.currentTarget.id; | 969 | // var pnlName = event.currentTarget.id; |
966 | $scope.$emit("cBEnableDisableMenuOption", ""); | 970 | $scope.$emit("cBEnableDisableMenuOption", ""); |
967 | 971 |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
@@ -1021,10 +1021,15 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | @@ -1021,10 +1021,15 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | ||
1021 | } | 1021 | } |
1022 | 1022 | ||
1023 | $scope.JsPanelclick = function (windowviewid) { | 1023 | $scope.JsPanelclick = function (windowviewid) { |
1024 | + //reset option list manager and annotation | ||
1025 | + //call when module loaded | ||
1026 | + $rootScope.resetMenuOption(); | ||
1027 | + | ||
1024 | // call from while open module in CB | 1028 | // call from while open module in CB |
1025 | $("#ciImagePanel_" + windowviewid).on('click', function (event) { | 1029 | $("#ciImagePanel_" + windowviewid).on('click', function (event) { |
1026 | 1030 | ||
1027 | var pnlName = event.currentTarget.id; | 1031 | var pnlName = event.currentTarget.id; |
1032 | + $rootScope.resetMenuOptionOnClick(pnlName); | ||
1028 | $scope.$emit("cBEnableDisableMenuOption", pnlName); | 1033 | $scope.$emit("cBEnableDisableMenuOption", pnlName); |
1029 | 1034 | ||
1030 | // store image for export while click on panel | 1035 | // store image for export while click on panel |
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -1040,9 +1040,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | @@ -1040,9 +1040,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | ||
1040 | } | 1040 | } |
1041 | 1041 | ||
1042 | $scope.JsPanelclick = function (windowviewid) { | 1042 | $scope.JsPanelclick = function (windowviewid) { |
1043 | + //reset option list manager and annotation | ||
1044 | + //call when module loaded | ||
1045 | + $rootScope.resetMenuOption(); | ||
1043 | $("#daImagePanel_" + windowviewid).on('click', function (event) { | 1046 | $("#daImagePanel_" + windowviewid).on('click', function (event) { |
1044 | 1047 | ||
1045 | var pnlName=event.currentTarget.id; | 1048 | var pnlName=event.currentTarget.id; |
1049 | + $rootScope.resetMenuOptionOnClick(pnlName); | ||
1046 | $scope.$emit("cBEnableDisableMenuOption",pnlName); | 1050 | $scope.$emit("cBEnableDisableMenuOption",pnlName); |
1047 | 1051 | ||
1048 | // store image for export while click on panel | 1052 | // store image for export while click on panel |
@@ -1406,6 +1410,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | @@ -1406,6 +1410,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | ||
1406 | $(this).attr("selected", true); | 1410 | $(this).attr("selected", true); |
1407 | }); | 1411 | }); |
1408 | 1412 | ||
1413 | + $("#termList").unbind('keyup'); | ||
1414 | + $("#termList").on('keyup', function (event) { | ||
1415 | + $('#termList option[selected="selected"]').attr("selected", false); | ||
1416 | + $(this.selectedOptions[0]).attr("selected", true); | ||
1417 | + }); | ||
1418 | + | ||
1409 | $(document).keypress(function (e) { | 1419 | $(document).keypress(function (e) { |
1410 | if ($('#termList option[selected="selected"]').attr("id") == "undefined") { | 1420 | if ($('#termList option[selected="selected"]').attr("id") == "undefined") { |
1411 | return false; | 1421 | return false; |
@@ -9135,14 +9145,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | @@ -9135,14 +9145,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | ||
9135 | } | 9145 | } |
9136 | 9146 | ||
9137 | //clsoe worker process | 9147 | //clsoe worker process |
9138 | - $scope.$on('jsPanelCloseEvent', function (event, data) { | ||
9139 | - console.log('terminate worker process') | ||
9140 | - //terminate previous running workers to create space for new workers | ||
9141 | - $rootScope.isLoading = false; | ||
9142 | - $('#spinner').css('visibility', 'hidden'); | 9148 | + // $scope.$on('jsPanelCloseEvent', function (event, data) { |
9149 | + // console.log('terminate worker process') | ||
9150 | + // //terminate previous running workers to create space for new workers | ||
9151 | + // $rootScope.isLoading = false; | ||
9152 | + // $('#spinner').css('visibility', 'hidden'); | ||
9143 | 9153 | ||
9144 | - $rootScope.CloseListManager(); | ||
9145 | - }) | 9154 | + // $rootScope.CloseListManager(); |
9155 | + // }) | ||
9146 | 9156 | ||
9147 | $scope.loadSelectedBodyView = function (currentBodyViewId, windowviewid) { | 9157 | $scope.loadSelectedBodyView = function (currentBodyViewId, windowviewid) { |
9148 | var previousHighlightList=$scope.GetwindowStoreData(windowviewid,'previousHighlightList'); | 9158 | var previousHighlightList=$scope.GetwindowStoreData(windowviewid,'previousHighlightList'); |
@@ -9910,6 +9920,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | @@ -9910,6 +9920,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | ||
9910 | 9920 | ||
9911 | $timeout(function () { | 9921 | $timeout(function () { |
9912 | $("#termlistfilter_" + windowviewid).css("display", "none"); | 9922 | $("#termlistfilter_" + windowviewid).css("display", "none"); |
9923 | + if ($('#searchListDiv_' + windowviewid).html() != "") { | ||
9924 | + $('#searchListDiv_' + windowviewid).empty(); | ||
9925 | + } | ||
9913 | 9926 | ||
9914 | }, 500); | 9927 | }, 500); |
9915 | 9928 | ||
@@ -9926,8 +9939,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | @@ -9926,8 +9939,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | ||
9926 | $rootScope.searchSelectedText =currenttermidTxt; //using at home controller | 9939 | $rootScope.searchSelectedText =currenttermidTxt; //using at home controller |
9927 | 9940 | ||
9928 | $scope.SetwindowStoreData(windowviewid,'searchSelectedText',currenttermidTxt); | 9941 | $scope.SetwindowStoreData(windowviewid,'searchSelectedText',currenttermidTxt); |
9929 | - $('#termList option[selected="selected"]').prop("selected", false); | ||
9930 | - $('#termList option[value="' + currenttermidTxt + '"]').prop("selected", true); | 9942 | + $('#termList option[selected="selected"]').attr("selected", false); |
9943 | + $('#termList option[value="' + currenttermidTxt + '"]').attr("selected", true); | ||
9931 | $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); | 9944 | $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); |
9932 | $('#termList option[value="' + currenttermidTxt + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); | 9945 | $('#termList option[value="' + currenttermidTxt + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); |
9933 | 9946 | ||
@@ -10109,7 +10122,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | @@ -10109,7 +10122,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | ||
10109 | var $el = $('<option title ="' + VocabTermTxtfilter[j]._TermText + '" id=' + VocabTermTxtfilter[j]._ActualTermNumber +'_' +windowviewid+ '>' + VocabTermTxtfilter[j]._TermText + '</option>').appendTo('#termList') | 10122 | var $el = $('<option title ="' + VocabTermTxtfilter[j]._TermText + '" id=' + VocabTermTxtfilter[j]._ActualTermNumber +'_' +windowviewid+ '>' + VocabTermTxtfilter[j]._TermText + '</option>').appendTo('#termList') |
10110 | $compile($el)($scope); | 10123 | $compile($el)($scope); |
10111 | 10124 | ||
10112 | - } | 10125 | + } |
10113 | 10126 | ||
10114 | $rootScope.isLoading = false; | 10127 | $rootScope.isLoading = false; |
10115 | $('#spinner').css('visibility', 'hidden'); | 10128 | $('#spinner').css('visibility', 'hidden'); |
@@ -10118,8 +10131,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | @@ -10118,8 +10131,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | ||
10118 | $("#totalTerms").empty(); | 10131 | $("#totalTerms").empty(); |
10119 | $('#totalTerms').append(termsTotal); | 10132 | $('#totalTerms').append(termsTotal); |
10120 | 10133 | ||
10121 | - | ||
10122 | - | ||
10123 | } | 10134 | } |
10124 | } | 10135 | } |
10125 | else { | 10136 | else { |
@@ -10601,6 +10612,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | @@ -10601,6 +10612,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | ||
10601 | $('#totalTerms').append(termsTotal); | 10612 | $('#totalTerms').append(termsTotal); |
10602 | $rootScope.isLoading = false; | 10613 | $rootScope.isLoading = false; |
10603 | $('#spinner').css('visibility', 'hidden'); | 10614 | $('#spinner').css('visibility', 'hidden'); |
10615 | + | ||
10604 | } | 10616 | } |
10605 | }) | 10617 | }) |
10606 | 10618 | ||
@@ -10830,6 +10842,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | @@ -10830,6 +10842,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | ||
10830 | $('#searchedTermListPopUp_' + windowviewid).css('display', 'none'); | 10842 | $('#searchedTermListPopUp_' + windowviewid).css('display', 'none'); |
10831 | $('#searchedTermListPopUp_' + windowviewid).css("visibility", "hidden"); | 10843 | $('#searchedTermListPopUp_' + windowviewid).css("visibility", "hidden"); |
10832 | 10844 | ||
10845 | + if ($('#searchTermListUl_' + windowviewid).html() != "") { | ||
10846 | + $('#searchTermListUl_' + windowviewid).empty(); | ||
10847 | + } | ||
10848 | + | ||
10833 | } | 10849 | } |
10834 | 10850 | ||
10835 | 10851 |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -120,15 +120,16 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | @@ -120,15 +120,16 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | ||
120 | 120 | ||
121 | $rootScope.CloseListManager(); | 121 | $rootScope.CloseListManager(); |
122 | $rootScope.CloseAnnotationTool(); | 122 | $rootScope.CloseAnnotationTool(); |
123 | - | ||
124 | - // close list opened in DA | ||
125 | - // var searchedTermListPopUp = $("#HomeContainerDiv").find("div[id*='searchedTermListPopUp']"); | ||
126 | - // | ||
127 | - // for (var i = 0 ; i < searchedTermListPopUp.length; i++) { | ||
128 | - // // var windowviewid = (searchedTermListPopUp[i].id).split('_')[1]; | ||
129 | - // // $('#searchedTermListPopUp_' + windowviewid).css('display', 'none'); | ||
130 | - // // $('#searchedTermListPopUp_' + windowviewid).css("visibility", "hidden"); | ||
131 | - // } | 123 | + |
124 | + // close list if opened in DA | ||
125 | + var searchedTermListPopUp = $("#HomeContainerDiv").find("div[id*='searchedTermListPopUp']"); | ||
126 | + | ||
127 | + for (var i = 0 ; i < searchedTermListPopUp.length; i++) { | ||
128 | + var windowviewid = (searchedTermListPopUp[i].id).split('_')[1]; | ||
129 | + $('#searchedTermListPopUp_' + windowviewid).css('display', 'none'); | ||
130 | + $('#searchedTermListPopUp_' + windowviewid).css("visibility", "hidden"); | ||
131 | + $('#searchTermListUl_' + windowviewid).empty(); | ||
132 | + } | ||
132 | 133 | ||
133 | sessionStorage.setItem('isModuleOpenByOpenResource', 'true'); | 134 | sessionStorage.setItem('isModuleOpenByOpenResource', 'true'); |
134 | 135 | ||
@@ -1648,7 +1649,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | @@ -1648,7 +1649,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | ||
1648 | return moduleUrl === currentRoute ? 'active' : ''; | 1649 | return moduleUrl === currentRoute ? 'active' : ''; |
1649 | } | 1650 | } |
1650 | $("#annotationToolBarOptions").removeClass("disableMenuoption"); | 1651 | $("#annotationToolBarOptions").removeClass("disableMenuoption"); |
1651 | - $("#optionsListManagerTab").removeClass("disableMenuoption"); | 1652 | + $("#optionsListManagerTab").removeClass("disableSubMenu"); |
1652 | $("#optiontSetting").removeClass("disableSubMenu"); | 1653 | $("#optiontSetting").removeClass("disableSubMenu"); |
1653 | 1654 | ||
1654 | var userInformation = $rootScope.userData; | 1655 | var userInformation = $rootScope.userData; |
@@ -1867,6 +1868,57 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | @@ -1867,6 +1868,57 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | ||
1867 | 1868 | ||
1868 | return paneltopPosition; | 1869 | return paneltopPosition; |
1869 | } | 1870 | } |
1871 | +//reset option list manager and annotation when load | ||
1872 | +//call also when close module | ||
1873 | + $rootScope.resetMenuOption = function () { | ||
1874 | + $timeout(function () { | ||
1875 | + var islistManagerActive=false; | ||
1876 | + if ($location.url() != "/curriculum-builder-detail") { | ||
1877 | + var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']"); | ||
1878 | + if (modulePanel != undefined && modulePanel.length>0) { | ||
1879 | + for (var i = 0 ; i < modulePanel.length; i++) { | ||
1880 | + var paneld = modulePanel[i].id; | ||
1881 | + if(paneld.match('daImagePanel')||paneld.match('AAImagePanel')) | ||
1882 | + { | ||
1883 | + islistManagerActive=true; | ||
1884 | + } | ||
1885 | + } | ||
1886 | + } | ||
1887 | + if(islistManagerActive==true) | ||
1888 | + { | ||
1889 | + $("#optionsListManagerTab").removeClass("disableSubMenu"); | ||
1890 | + } | ||
1891 | + else | ||
1892 | + { | ||
1893 | + $("#optionsListManagerTab").addClass("disableSubMenu"); | ||
1894 | + } | ||
1895 | + } | ||
1896 | + }, 500); | ||
1897 | + } | ||
1898 | + | ||
1899 | + // enable/disable list manager option and annotation Panel click | ||
1900 | +$rootScope.resetMenuOptionOnClick = function (moduleName) { | ||
1901 | + if ($location.url() != "/curriculum-builder-detail") { | ||
1902 | + if (moduleName != "") { | ||
1903 | + if(moduleName.match('daImagePanel')||moduleName.match('AAImagePanel')) | ||
1904 | + { | ||
1905 | + $("#optionsListManagerTab").removeClass("disableSubMenu"); | ||
1906 | + } | ||
1907 | + else | ||
1908 | + { | ||
1909 | + $("#optionsListManagerTab").addClass("disableSubMenu"); | ||
1910 | + } | ||
1911 | + } | ||
1912 | + else | ||
1913 | + { | ||
1914 | + $("#optionsListManagerTab").addClass("disableSubMenu"); | ||
1915 | + } | ||
1916 | + | ||
1917 | + $scope.ListManagerViewDisableEnable(moduleName); | ||
1918 | + } | ||
1919 | + | ||
1920 | +} | ||
1921 | + | ||
1870 | // CB: reset panel top position when if any module closed | 1922 | // CB: reset panel top position when if any module closed |
1871 | $rootScope.resetjsPanelTop = function () { | 1923 | $rootScope.resetjsPanelTop = function () { |
1872 | 1924 | ||
@@ -1876,7 +1928,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | @@ -1876,7 +1928,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | ||
1876 | 1928 | ||
1877 | firsttopPosition = 680; | 1929 | firsttopPosition = 680; |
1878 | } | 1930 | } |
1879 | - | 1931 | + var islistManagerActive=false; |
1880 | var moduleImagePanel = $("div[id*='ImagePanel']"); | 1932 | var moduleImagePanel = $("div[id*='ImagePanel']"); |
1881 | 1933 | ||
1882 | if (moduleImagePanel.length > 0) { | 1934 | if (moduleImagePanel.length > 0) { |
@@ -1896,11 +1948,35 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | @@ -1896,11 +1948,35 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | ||
1896 | $("#" + lastpanel.id).css("top", lastTop + 'px'); | 1948 | $("#" + lastpanel.id).css("top", lastTop + 'px'); |
1897 | } | 1949 | } |
1898 | 1950 | ||
1951 | + //Reset menu option like list manager,annotation when close module | ||
1952 | + | ||
1953 | + if ($location.url() != "/curriculum-builder-detail") { | ||
1954 | + var paneld = moduleImagePanel[index].id; | ||
1955 | + if(paneld.match('daImagePanel')||paneld.match('AAImagePanel')) | ||
1956 | + { | ||
1957 | + islistManagerActive=true; | ||
1958 | + } | ||
1959 | + } | ||
1960 | + | ||
1899 | } | 1961 | } |
1900 | } | 1962 | } |
1901 | 1963 | ||
1902 | - }, 500); | 1964 | + if ($location.url() != "/curriculum-builder-detail") { |
1965 | + if(islistManagerActive==true) | ||
1966 | + { | ||
1967 | + $("#optionsListManagerTab").removeClass("disableSubMenu"); | ||
1968 | + | ||
1969 | + } | ||
1970 | + else | ||
1971 | + { | ||
1972 | + $("#optionsListManagerTab").addClass("disableSubMenu"); | ||
1973 | + | ||
1974 | + } | ||
1975 | + // list manger already open then refresh it or close | ||
1976 | + $scope.updateListManagerView(); | ||
1977 | + } | ||
1903 | 1978 | ||
1979 | + }, 500); | ||
1904 | 1980 | ||
1905 | } | 1981 | } |
1906 | 1982 | ||
@@ -1933,10 +2009,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | @@ -1933,10 +2009,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | ||
1933 | $('#printAVAnchor').parent().addClass('PrintViewer'); | 2009 | $('#printAVAnchor').parent().addClass('PrintViewer'); |
1934 | $('#printAllAVAnchor').parent().addClass('PrintViewer'); | 2010 | $('#printAllAVAnchor').parent().addClass('PrintViewer'); |
1935 | $('#printPreviewAnchor').parent().addClass('PrintPreview'); | 2011 | $('#printPreviewAnchor').parent().addClass('PrintPreview'); |
1936 | - | ||
1937 | } | 2012 | } |
1938 | 2013 | ||
1939 | - | ||
1940 | }); | 2014 | }); |
1941 | 2015 | ||
1942 | 2016 | ||
@@ -1977,7 +2051,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | @@ -1977,7 +2051,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | ||
1977 | 2051 | ||
1978 | $location.url('/' + slug); | 2052 | $location.url('/' + slug); |
1979 | 2053 | ||
1980 | - $rootScope.$broadcast('jsPanelCloseEvent', true); | 2054 | + // $rootScope.$broadcast('jsPanelCloseEvent', true); |
1981 | } | 2055 | } |
1982 | } | 2056 | } |
1983 | 2057 | ||
@@ -5709,26 +5783,40 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | @@ -5709,26 +5783,40 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | ||
5709 | } | 5783 | } |
5710 | 5784 | ||
5711 | //list manager function | 5785 | //list manager function |
5712 | - | ||
5713 | - //list manager function | 5786 | + $scope.ListManagerViewDisableEnable = function (moduleName) { |
5787 | + if(moduleName.match('daImagePanel')||moduleName.match('AAImagePanel')) | ||
5788 | + { | ||
5789 | + $("#listManagerBody *").prop('disabled',false); | ||
5790 | + } | ||
5791 | + else | ||
5792 | + { | ||
5793 | + $("#listManagerBody *").prop('disabled',true); | ||
5794 | + } | ||
5795 | + | ||
5796 | + } | ||
5714 | 5797 | ||
5715 | $scope.updateListManagerView = function () { | 5798 | $scope.updateListManagerView = function () { |
5716 | 5799 | ||
5717 | - $("#listManagerBody *").prop('disabled',true); | 5800 | + $("#listManagerBody *").prop('disabled',false); |
5801 | + $("#listManagerContent *").prop('disabled',true); | ||
5718 | $('#AABodySystems').empty(); | 5802 | $('#AABodySystems').empty(); |
5719 | $('#bodySystems').empty(); | 5803 | $('#bodySystems').empty(); |
5720 | $('#termList').empty(); | 5804 | $('#termList').empty(); |
5721 | $('#viewName').empty(); | 5805 | $('#viewName').empty(); |
5722 | $('#viewName').append('<option selected value="0"> Select Panel </option>'); | 5806 | $('#viewName').append('<option selected value="0"> Select Panel </option>'); |
5723 | - | 5807 | + |
5724 | var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']").not("div[id*='caImagePanel']").not("div[id*='ThreeDImagePanel']").not("div[id*='ciImagePanel']").not("div[id*='aiImagePanel']").not("div[id*='labImagePanel']"); | 5808 | var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']").not("div[id*='caImagePanel']").not("div[id*='ThreeDImagePanel']").not("div[id*='ciImagePanel']").not("div[id*='aiImagePanel']").not("div[id*='labImagePanel']"); |
5725 | - if (modulePanel != undefined && modulePanel != null) { | 5809 | + if (modulePanel != undefined && modulePanel.length>0) { |
5726 | for (var i = 0 ; i < modulePanel.length; i++) { | 5810 | for (var i = 0 ; i < modulePanel.length; i++) { |
5727 | var paneld = modulePanel[i].id; | 5811 | var paneld = modulePanel[i].id; |
5728 | var panelTitle = document.getElementById(paneld).childNodes[0].innerText; | 5812 | var panelTitle = document.getElementById(paneld).childNodes[0].innerText; |
5729 | $('#viewName').append('<option value="' + paneld + '">' + panelTitle + '</option>'); | 5813 | $('#viewName').append('<option value="' + paneld + '">' + panelTitle + '</option>'); |
5730 | } | 5814 | } |
5731 | } | 5815 | } |
5816 | + else | ||
5817 | + { | ||
5818 | + $rootScope.CloseListManager(); | ||
5819 | + } | ||
5732 | 5820 | ||
5733 | } | 5821 | } |
5734 | 5822 | ||
@@ -5744,7 +5832,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | @@ -5744,7 +5832,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | ||
5744 | $('#viewName').append('<option selected value="0"> Select Panel </option>'); | 5832 | $('#viewName').append('<option selected value="0"> Select Panel </option>'); |
5745 | 5833 | ||
5746 | var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']").not("div[id*='caImagePanel']").not("div[id*='ThreeDImagePanel']").not("div[id*='ciImagePanel']").not("div[id*='aiImagePanel']").not("div[id*='labImagePanel']"); | 5834 | var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']").not("div[id*='caImagePanel']").not("div[id*='ThreeDImagePanel']").not("div[id*='ciImagePanel']").not("div[id*='aiImagePanel']").not("div[id*='labImagePanel']"); |
5747 | - if (modulePanel != undefined && modulePanel != null) { | 5835 | + if (modulePanel != undefined && modulePanel.length>0) { |
5748 | for (var i = 0 ; i < modulePanel.length; i++) { | 5836 | for (var i = 0 ; i < modulePanel.length; i++) { |
5749 | var paneld = modulePanel[i].id; | 5837 | var paneld = modulePanel[i].id; |
5750 | var panelTitle = document.getElementById(paneld).childNodes[0].innerText; | 5838 | var panelTitle = document.getElementById(paneld).childNodes[0].innerText; |
@@ -5801,11 +5889,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | @@ -5801,11 +5889,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | ||
5801 | $rootScope.islistManagerEventAlredayDispachted = true; | 5889 | $rootScope.islistManagerEventAlredayDispachted = true; |
5802 | 5890 | ||
5803 | $rootScope.$broadcast('listManagerEvent', windowviewid); | 5891 | $rootScope.$broadcast('listManagerEvent', windowviewid); |
5804 | - | 5892 | + |
5805 | if ($rootScope.selectedBodySystemName == undefined && $rootScope.slectedActualTermNumber == undefined) { | 5893 | if ($rootScope.selectedBodySystemName == undefined && $rootScope.slectedActualTermNumber == undefined) { |
5806 | if ($location.path() == "/module-item-view") { | 5894 | if ($location.path() == "/module-item-view") { |
5807 | $timeout(function () { | 5895 | $timeout(function () { |
5808 | - $('#termList option[selected="selected"]').prop("selected", false); | 5896 | + // $('#termList option[selected="selected"]').prop("selected", false); |
5809 | $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true); | 5897 | $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true); |
5810 | $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); | 5898 | $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); |
5811 | $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); | 5899 | $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); |
@@ -5857,7 +5945,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | @@ -5857,7 +5945,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | ||
5857 | // | 5945 | // |
5858 | // }, 500); | 5946 | // }, 500); |
5859 | } | 5947 | } |
5860 | - $("#optionsListManagerTab").addClass("active"); | 5948 | + // $("#optionsListManagerTab").addClass("active"); |
5861 | // var viewNameAftrSplit; | 5949 | // var viewNameAftrSplit; |
5862 | //if ($("#viewName").val() !== null) { | 5950 | //if ($("#viewName").val() !== null) { |
5863 | // viewNameAftrSplit = $("#viewName").val().split(" "); | 5951 | // viewNameAftrSplit = $("#viewName").val().split(" "); |
@@ -5895,7 +5983,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | @@ -5895,7 +5983,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | ||
5895 | var canvasPaintId = canvasPaintElement.id; | 5983 | var canvasPaintId = canvasPaintElement.id; |
5896 | 5984 | ||
5897 | 5985 | ||
5898 | - $("#optionsListManagerTab").removeClass("active"); | 5986 | + // $("#optionsListManagerTab").removeClass("active"); |
5899 | $rootScope.isListManagerMenuSelected = false; | 5987 | $rootScope.isListManagerMenuSelected = false; |
5900 | console.log('listManager closed'); | 5988 | console.log('listManager closed'); |
5901 | $rootScope.disableAnnotationtoolOnListManager = false; | 5989 | $rootScope.disableAnnotationtoolOnListManager = false; |
@@ -6547,7 +6635,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | @@ -6547,7 +6635,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | ||
6547 | $rootScope.CloseAnnotationTool(); | 6635 | $rootScope.CloseAnnotationTool(); |
6548 | $("#annotationButton").parent().addClass("disableMenuannotation"); | 6636 | $("#annotationButton").parent().addClass("disableMenuannotation"); |
6549 | $("#annotationToolBarOptions").addClass("disableMenuoption"); | 6637 | $("#annotationToolBarOptions").addClass("disableMenuoption"); |
6550 | - $("#optionsListManagerTab").addClass("disableMenuoption"); | 6638 | + // $("#optionsListManagerTab").addClass("disableSubMenu"); |
6551 | $('#dvPrintPreview').css('display', 'block'); | 6639 | $('#dvPrintPreview').css('display', 'block'); |
6552 | html2canvas($("#" + canvasDivId), { | 6640 | html2canvas($("#" + canvasDivId), { |
6553 | onrendered: function (canvas) { | 6641 | onrendered: function (canvas) { |
@@ -6920,7 +7008,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | @@ -6920,7 +7008,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data | ||
6920 | } | 7008 | } |
6921 | 7009 | ||
6922 | $("#annotationToolBarOptions").removeClass("disableMenuoption"); | 7010 | $("#annotationToolBarOptions").removeClass("disableMenuoption"); |
6923 | - $("#optionsListManagerTab").removeClass("disableMenuoption"); | 7011 | + // $("#optionsListManagerTab").removeClass("disableSubMenu"); |
6924 | $('#fileMenuAnchor').parent().removeClass('disableFileMenu'); | 7012 | $('#fileMenuAnchor').parent().removeClass('disableFileMenu'); |
6925 | 7013 | ||
6926 | 7014 |
400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
@@ -455,9 +455,12 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, | @@ -455,9 +455,12 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, | ||
455 | } | 455 | } |
456 | 456 | ||
457 | $scope.JsPanelclick = function (windowviewid) { | 457 | $scope.JsPanelclick = function (windowviewid) { |
458 | + //reset option list manager and annotation | ||
459 | + //call when module loaded | ||
460 | + $rootScope.resetMenuOption(); | ||
458 | // call from while open module in CB | 461 | // call from while open module in CB |
459 | $("#labImagePanel_" + windowviewid).on('click', function (event) { | 462 | $("#labImagePanel_" + windowviewid).on('click', function (event) { |
460 | - | 463 | + $rootScope.resetMenuOptionOnClick(""); |
461 | // var pnlName = event.currentTarget.id; | 464 | // var pnlName = event.currentTarget.id; |
462 | $scope.$emit("cBEnableDisableMenuOption", ""); | 465 | $scope.$emit("cBEnableDisableMenuOption", ""); |
463 | 466 |
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -870,10 +870,14 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | @@ -870,10 +870,14 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | ||
870 | } | 870 | } |
871 | 871 | ||
872 | $scope.JsPanelclick = function (windowviewid) { | 872 | $scope.JsPanelclick = function (windowviewid) { |
873 | + //reset option list manager and annotation | ||
874 | + //call when module loaded | ||
875 | + $rootScope.resetMenuOption(); | ||
873 | // call from while open module in CB | 876 | // call from while open module in CB |
874 | $("#AAImagePanel_" + windowviewid).on('click', function (event) { | 877 | $("#AAImagePanel_" + windowviewid).on('click', function (event) { |
875 | 878 | ||
876 | var pnlName=event.currentTarget.id; | 879 | var pnlName=event.currentTarget.id; |
880 | + $rootScope.resetMenuOptionOnClick(pnlName); | ||
877 | $scope.$emit("cBEnableDisableMenuOption", pnlName); | 881 | $scope.$emit("cBEnableDisableMenuOption", pnlName); |
878 | var titlt = $("#AAImagePanel_" + windowviewid).childNodes; | 882 | var titlt = $("#AAImagePanel_" + windowviewid).childNodes; |
879 | 883 |