Commit 481837ee20f71f306cbb3dbc0e3bf6dead4fbe12
1 parent
448af4dd
Commit Changes
Showing
1 changed file
with
14 additions
and
8 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -1173,8 +1173,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | @@ -1173,8 +1173,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | ||
1173 | }); | 1173 | }); |
1174 | 1174 | ||
1175 | $rootScope.loadSearchData = function () { | 1175 | $rootScope.loadSearchData = function () { |
1176 | - | ||
1177 | - | 1176 | + //$("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); |
1178 | var imageId = $rootScope.imageId; | 1177 | var imageId = $rootScope.imageId; |
1179 | var promise = ModuleService.getTermTextDataForAAImage(imageId) | 1178 | var promise = ModuleService.getTermTextDataForAAImage(imageId) |
1180 | .then( | 1179 | .then( |
@@ -1197,7 +1196,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | @@ -1197,7 +1196,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | ||
1197 | } | 1196 | } |
1198 | $scope.$watch('$scope.pinTermData', function (newValue, oldValue, scope) { | 1197 | $scope.$watch('$scope.pinTermData', function (newValue, oldValue, scope) { |
1199 | if ($('#termlistfilter').html() != "") | 1198 | if ($('#termlistfilter').html() != "") |
1200 | - $('#termList').empty(); | 1199 | + // $('#termList').empty(); |
1201 | $('#termlistfilter').empty() | 1200 | $('#termlistfilter').empty() |
1202 | if ($scope.pinTermData.length > 0) { | 1201 | if ($scope.pinTermData.length > 0) { |
1203 | $timeout(function () { | 1202 | $timeout(function () { |
@@ -1211,7 +1210,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | @@ -1211,7 +1210,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | ||
1211 | $("#bodySystems").css("display","none"); | 1210 | $("#bodySystems").css("display","none"); |
1212 | $("#AABodySystems").css("display","block"); | 1211 | $("#AABodySystems").css("display","block"); |
1213 | $("#bodySystemList li a").each(function (key, value) { | 1212 | $("#bodySystemList li a").each(function (key, value) { |
1214 | - var $systemOptions = $('<option id=' + $(this).attr('id') + ' onclick="refreshTermListOnSystemSel(this.id)">' + $(this).text() + '</option>').appendTo("#AABodySystems") | 1213 | + var $systemOptions = $('<option id=' + $(this).attr('id') + ' >' + $(this).text() + '</option>').appendTo("#AABodySystems") |
1215 | $compile($systemOptions)($scope); | 1214 | $compile($systemOptions)($scope); |
1216 | }); | 1215 | }); |
1217 | } | 1216 | } |
@@ -1232,16 +1231,23 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | @@ -1232,16 +1231,23 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | ||
1232 | $scope.$on('listManagerEvent', function (event, data) { | 1231 | $scope.$on('listManagerEvent', function (event, data) { |
1233 | $("#viewName").empty(); | 1232 | $("#viewName").empty(); |
1234 | $("#viewName").append("<option>" + $rootScope.listArray[0].text + "</option>"); | 1233 | $("#viewName").append("<option>" + $rootScope.listArray[0].text + "</option>"); |
1235 | - | ||
1236 | $rootScope.isLoading = false; | 1234 | $rootScope.isLoading = false; |
1237 | $('#spinner').css('visibility', 'hidden'); | 1235 | $('#spinner').css('visibility', 'hidden'); |
1238 | - | 1236 | + |
1237 | + if ($rootScope.bodySystemSeletedId == null) { | ||
1238 | + $rootScope.loadSearchData(); | ||
1239 | + } | ||
1240 | + else | ||
1241 | + { | ||
1242 | + $scope.refreshTermListOnAASystemSelection($rootScope.bodySystemSeletedId); | ||
1243 | + } | ||
1244 | + | ||
1239 | }); | 1245 | }); |
1240 | 1246 | ||
1241 | 1247 | ||
1242 | 1248 | ||
1243 | $scope.refreshTermListOnAASystemSelection = function (bodySystemId) { | 1249 | $scope.refreshTermListOnAASystemSelection = function (bodySystemId) { |
1244 | - | 1250 | + $rootScope.bodySystemSeletedId = bodySystemId; |
1245 | var bodySystemName = $("#AABodySystems #" + bodySystemId).val(); | 1251 | var bodySystemName = $("#AABodySystems #" + bodySystemId).val(); |
1246 | if (bodySystemName == "All") { | 1252 | if (bodySystemName == "All") { |
1247 | for (var j = 0; j <= $scope.pinTermData.length - 1; j++) { | 1253 | for (var j = 0; j <= $scope.pinTermData.length - 1; j++) { |
@@ -1496,7 +1502,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | @@ -1496,7 +1502,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | ||
1496 | } | 1502 | } |
1497 | 1503 | ||
1498 | $scope.highlightPinBasedOnSerachItem = function (event) { | 1504 | $scope.highlightPinBasedOnSerachItem = function (event) { |
1499 | - | 1505 | + |
1500 | $scope.searchItemId = event.currentTarget.id; | 1506 | $scope.searchItemId = event.currentTarget.id; |
1501 | $scope.searchItemText = event.currentTarget.innerHTML; | 1507 | $scope.searchItemText = event.currentTarget.innerHTML; |
1502 | $rootScope.searchSelectedText = $("#" + event.currentTarget.id).text(); | 1508 | $rootScope.searchSelectedText = $("#" + event.currentTarget.id).text(); |