Commit 93fa6f7dfbed7d007d2c025fdc2e30c8a6feeb3c
1 parent
bd17f603
24067 : Atlas Anatomy > List Manager > Structures are not appearing in the alpha…
…betical order when select the body system.
Showing
1 changed file
with
30 additions
and
3 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... | ... | @@ -1301,7 +1301,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1301 | 1301 | var imageId = $rootScope.imageId; |
1302 | 1302 | $scope.pinDataUrl = "aa_dat_pinterm_" + imageId; |
1303 | 1303 | $rootScope.bodySystemTermArray = []; |
1304 | - | |
1304 | + $rootScope.sortedListArray = []; | |
1305 | 1305 | $.ajax({ |
1306 | 1306 | url: '~/../content/data/json/aa/aa_pinterm/' + $scope.pinDataUrl + '.json', |
1307 | 1307 | type: 'GET', |
... | ... | @@ -1317,13 +1317,40 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1317 | 1317 | if ($scope.aaPinData[i]._TermId == $rootScope.bodySystemTermArray[j].termNumbr) { |
1318 | 1318 | if ($rootScope.bodySystemTermArray[j].language == "1") { |
1319 | 1319 | console.log($rootScope.bodySystemTermArray[j].text); |
1320 | - var $selectedOptions = $('<option title= "' + $rootScope.bodySystemTermArray[j].text + '" id= "' + $rootScope.bodySystemTermArray[j].termNumbr + '" >' + $rootScope.bodySystemTermArray[j].text + '</option>').appendTo("#termList") | |
1321 | - $compile($selectedOptions)($scope); | |
1320 | + $rootScope.sortedListArray.push({ "title": $rootScope.bodySystemTermArray[j].text, "id": $rootScope.bodySystemTermArray[j].termNumbr }); | |
1321 | + | |
1322 | 1322 | } |
1323 | 1323 | } |
1324 | 1324 | } |
1325 | 1325 | } |
1326 | 1326 | } |
1327 | + | |
1328 | + | |
1329 | + //for (var i = 0; i <= $rootScope.sortedListArray.length - 1; i++) { | |
1330 | + | |
1331 | + // for (j = i + 1; j <= $rootScope.sortedListArray.length - 1; j++) { | |
1332 | + | |
1333 | + // if ($rootScope.sortedListArray[i].title.substr(0, 1) > $rootScope.sortedListArray[j].title.substr(0, 1)) { | |
1334 | + | |
1335 | + // var termText = $rootScope.sortedListArray[i].title; | |
1336 | + // var termNumbr = $rootScope.sortedListArray[i].termNumbr; | |
1337 | + // var termLanguage = $rootScope.sortedListArray[i].language; | |
1338 | + | |
1339 | + // $rootScope.sortedListArray[i].title = $rootScope.sortedListArray[j].title; | |
1340 | + // $rootScope.sortedListArray[i].termNumbr = $rootScope.sortedListArray[j].termNumbr; | |
1341 | + // $rootScope.sortedListArray[i].language = $rootScope.sortedListArray[j].language; | |
1342 | + | |
1343 | + // $rootScope.sortedListArray[j].title = termText; | |
1344 | + // $rootScope.sortedListArray[j].termNumbr = termNumbr; | |
1345 | + // $rootScope.sortedListArray[j].language = termLanguage; | |
1346 | + // } | |
1347 | + // } | |
1348 | + //} | |
1349 | + | |
1350 | + for (var j = 0; j <= $rootScope.sortedListArray.length - 1; j++) { | |
1351 | + var $selectedOptions = $('<option title= "' + $rootScope.sortedListArray[j].title + '" id= "' + $rootScope.sortedListArray[j].id + '" >' + $rootScope.sortedListArray[j].title + '</option>').appendTo("#termList") | |
1352 | + $compile($selectedOptions)($scope); | |
1353 | + } | |
1327 | 1354 | } |
1328 | 1355 | }); |
1329 | 1356 | $("#totalTerms").empty(); | ... | ... |