diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index d8a3ffb..5a5383c 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -1173,8 +1173,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou }); $rootScope.loadSearchData = function () { - - + //$("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); var imageId = $rootScope.imageId; var promise = ModuleService.getTermTextDataForAAImage(imageId) .then( @@ -1197,7 +1196,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } $scope.$watch('$scope.pinTermData', function (newValue, oldValue, scope) { if ($('#termlistfilter').html() != "") - $('#termList').empty(); + // $('#termList').empty(); $('#termlistfilter').empty() if ($scope.pinTermData.length > 0) { $timeout(function () { @@ -1211,7 +1210,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $("#bodySystems").css("display","none"); $("#AABodySystems").css("display","block"); $("#bodySystemList li a").each(function (key, value) { - var $systemOptions = $('').appendTo("#AABodySystems") + var $systemOptions = $('').appendTo("#AABodySystems") $compile($systemOptions)($scope); }); } @@ -1232,16 +1231,23 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.$on('listManagerEvent', function (event, data) { $("#viewName").empty(); $("#viewName").append(""); - $rootScope.isLoading = false; $('#spinner').css('visibility', 'hidden'); - + + if ($rootScope.bodySystemSeletedId == null) { + $rootScope.loadSearchData(); + } + else + { + $scope.refreshTermListOnAASystemSelection($rootScope.bodySystemSeletedId); + } + }); $scope.refreshTermListOnAASystemSelection = function (bodySystemId) { - + $rootScope.bodySystemSeletedId = bodySystemId; var bodySystemName = $("#AABodySystems #" + bodySystemId).val(); if (bodySystemName == "All") { for (var j = 0; j <= $scope.pinTermData.length - 1; j++) { @@ -1496,7 +1502,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } $scope.highlightPinBasedOnSerachItem = function (event) { - + $scope.searchItemId = event.currentTarget.id; $scope.searchItemText = event.currentTarget.innerHTML; $rootScope.searchSelectedText = $("#" + event.currentTarget.id).text();