Commit 26fc1e9ecc8c97b8c31f49d74d9188dd72d4726e
1 parent
ee3c0e26
DA > Body System state is not maintain in List Manager.
Showing
3 changed files
with
38 additions
and
14 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -7625,7 +7625,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7625 | 7625 | } |
7626 | 7626 | |
7627 | 7627 | |
7628 | - $scope.HighlightBodyOnListManagerSelection = function (actualTermNumber) { | |
7628 | + $scope.HighlightBodyOnListManagerSelection = function (actualTermNumber, isTermListOptionClicked) { | |
7629 | + //$rootScope.SelectedTermList = $("#termList").find("option[id=" + actualTermNumber + "]").val(); | |
7630 | + | |
7631 | + $rootScope.slectedActualTermNumber = actualTermNumber; | |
7632 | + | |
7633 | + if (isTermListOptionClicked == true) { | |
7634 | + $scope.searchFilter = ''; | |
7635 | + } | |
7629 | 7636 | |
7630 | 7637 | console.log('inside HighlightBodyOnListManagerSelection actualTermNumber= ' + actualTermNumber) |
7631 | 7638 | // Terms search in the Search list should be disable in the List Manager and Vice-Versa. |
... | ... | @@ -7919,8 +7926,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7919 | 7926 | return Math.round(iReturnValue / nExistingZoom); |
7920 | 7927 | } |
7921 | 7928 | |
7922 | - $scope.refreshTermListOnSystemSelection = function (bodysystemId) { | |
7923 | - | |
7929 | + $rootScope.refreshTermListOnSystemSelection = function (bodysystemId) { | |
7930 | + $rootScope.selectedBodySystemId = bodysystemId; | |
7931 | + $rootScope.selectedBodySystemName = $('#bodySystems option[id="' + bodysystemId + '"]').val(); | |
7924 | 7932 | $('#termList').empty(); |
7925 | 7933 | // $('#termList').innerHTML = ''; |
7926 | 7934 | |
... | ... | @@ -8304,11 +8312,11 @@ function OnZoom() |
8304 | 8312 | }); |
8305 | 8313 | } |
8306 | 8314 | |
8307 | -function onListManagerTermSelection(id) { | |
8315 | +function onListManagerTermSelection(id, isTermListOptionClicked) { | |
8308 | 8316 | |
8309 | 8317 | var scope = angular.element(document.getElementById("daView")).scope(); |
8310 | 8318 | scope.$apply(function () { |
8311 | - scope.HighlightBodyOnListManagerSelection(id); | |
8319 | + scope.HighlightBodyOnListManagerSelection(id, isTermListOptionClicked); | |
8312 | 8320 | }); |
8313 | 8321 | |
8314 | 8322 | } | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -2224,23 +2224,39 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
2224 | 2224 | $('#listManager').css('display', 'block'); |
2225 | 2225 | $("#listManager").css("visibility", "visible"); |
2226 | 2226 | |
2227 | - // $('#termList option[selected="selected"]').prop("selected", false); | |
2228 | - // $("#termList").find("option[value=" + $rootScope.searchSelectedText + "]").prop("selected", true); | |
2229 | - // $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); | |
2230 | - // $("#termList").find("option[value=" + $rootScope.searchSelectedText + "]").css({ "background-color": "#3399FF", "color": "#ffffff" }); | |
2231 | 2227 | $('#listManager').draggable(); |
2232 | 2228 | |
2233 | 2229 | |
2234 | 2230 | $rootScope.islistManagerEventAlredayDispachted = true; |
2235 | 2231 | |
2236 | 2232 | $rootScope.$broadcast('listManagerEvent', true); |
2233 | + | |
2234 | + if ($rootScope.selectedBodySystemName == undefined && $rootScope.slectedActualTermNumber == undefined) { | |
2235 | + $('#termList option[selected="selected"]').prop("selected", false); | |
2236 | + $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true); | |
2237 | + $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); | |
2238 | + $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); | |
2239 | + } | |
2240 | + else { | |
2237 | 2241 | |
2238 | - $('#termList option[selected="selected"]').prop("selected", false); | |
2239 | - $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true); | |
2240 | - $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); | |
2241 | - $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); | |
2242 | + if ($rootScope.selectedBodySystemId == undefined) { | |
2243 | + $rootScope.selectedBodySystemId = 0; | |
2244 | + $rootScope.refreshTermListOnSystemSelection($rootScope.selectedBodySystemId); | |
2245 | + } | |
2246 | + else { | |
2247 | + $rootScope.refreshTermListOnSystemSelection($rootScope.selectedBodySystemId); | |
2248 | + } | |
2242 | 2249 | |
2250 | + $('#bodySystems option[selected="selected"]').prop("selected", false); | |
2251 | + $('#bodySystems option[value="' + $rootScope.selectedBodySystemName + '"]').prop("selected", true); | |
2252 | + | |
2253 | + // $('#termList option[selected="selected"]').prop("selected", false); | |
2254 | + // $('#termList option[value="' + $rootScope.SelectedTermList + '"]').prop("selected", true); | |
2255 | + //$("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); | |
2256 | + //$('#termList option[value="' + $rootScope.SelectedTermList + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); | |
2243 | 2257 | |
2258 | + | |
2259 | + } | |
2244 | 2260 | } |
2245 | 2261 | |
2246 | 2262 | $rootScope.CloseListManager = function () { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/index.html
... | ... | @@ -812,7 +812,7 @@ |
812 | 812 | |
813 | 813 | <!--DA > List Manager > Multiple structure selection should not be available.--> |
814 | 814 | <div class="form-group"> |
815 | - <select id="termList" class="form-control" size="10" onclick="if (typeof (this.selectedIndex) != 'undefined') onListManagerTermSelection(this.options[this.selectedIndex].id)"></select> | |
815 | + <select id="termList" class="form-control" size="10" onclick="if (typeof (this.selectedIndex) != 'undefined') onListManagerTermSelection(this.options[this.selectedIndex].id, true)"></select> | |
816 | 816 | </div> |
817 | 817 | |
818 | 818 | </div> | ... | ... |