Commit e73fcf99469f4a5f7ecfadc8934f5c12c370a1cb
1 parent
332eda0a
26604 : Atlas Anatomy > List Manager > Variation in the number of structure.
Showing
1 changed file
with
12 additions
and
5 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -1305,6 +1305,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | @@ -1305,6 +1305,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | ||
1305 | $scope.pinDataUrl = "aa_dat_pinterm_" + imageId; | 1305 | $scope.pinDataUrl = "aa_dat_pinterm_" + imageId; |
1306 | $rootScope.bodySystemTermArray = []; | 1306 | $rootScope.bodySystemTermArray = []; |
1307 | $rootScope.sortedListArray = []; | 1307 | $rootScope.sortedListArray = []; |
1308 | + $rootScope.duplicateListArray = []; | ||
1308 | $.ajax({ | 1309 | $.ajax({ |
1309 | url: '~/../content/data/json/aa/aa_pinterm/' + $scope.pinDataUrl + '.json', | 1310 | url: '~/../content/data/json/aa/aa_pinterm/' + $scope.pinDataUrl + '.json', |
1310 | type: 'GET', | 1311 | type: 'GET', |
@@ -1318,16 +1319,22 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | @@ -1318,16 +1319,22 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | ||
1318 | if ($scope.aaPinData[i]._BodySystemName.toLowerCase() == bodySystemName.toLowerCase()) { | 1319 | if ($scope.aaPinData[i]._BodySystemName.toLowerCase() == bodySystemName.toLowerCase()) { |
1319 | for (var j = 0 ; j <= $rootScope.bodySystemTermArray.length - 1; j++) { | 1320 | for (var j = 0 ; j <= $rootScope.bodySystemTermArray.length - 1; j++) { |
1320 | if ($scope.aaPinData[i]._TermId == $rootScope.bodySystemTermArray[j].termNumbr) { | 1321 | if ($scope.aaPinData[i]._TermId == $rootScope.bodySystemTermArray[j].termNumbr) { |
1321 | - if ($rootScope.bodySystemTermArray[j].language == "1") { | 1322 | + if ($rootScope.bodySystemTermArray[j].language == $rootScope.lexiconLanguageArray[0].id) { |
1322 | console.log($rootScope.bodySystemTermArray[j].text); | 1323 | console.log($rootScope.bodySystemTermArray[j].text); |
1323 | - $rootScope.sortedListArray.push({ "title": $rootScope.bodySystemTermArray[j].text, "id": $rootScope.bodySystemTermArray[j].termNumbr }); | ||
1324 | - | 1324 | + $rootScope.duplicateListArray.push({ "title": $rootScope.bodySystemTermArray[j].text, "id": $rootScope.bodySystemTermArray[j].termNumbr }); |
1325 | } | 1325 | } |
1326 | } | 1326 | } |
1327 | } | 1327 | } |
1328 | } | 1328 | } |
1329 | } | 1329 | } |
1330 | - | 1330 | + var temp = []; |
1331 | + for (var i = 0; i <= $rootScope.duplicateListArray.length - 1; i++) { | ||
1332 | + var termID = $rootScope.duplicateListArray[i].id; | ||
1333 | + if ($.inArray(termID, temp) == -1) { | ||
1334 | + temp.push(termID); | ||
1335 | + $rootScope.sortedListArray.push({ "title": $rotScope.duplicateListArray[i].title, "id": termID }); | ||
1336 | + } | ||
1337 | + } | ||
1331 | 1338 | ||
1332 | for (var i = 0; i <= $rootScope.sortedListArray.length - 1; i++) { | 1339 | for (var i = 0; i <= $rootScope.sortedListArray.length - 1; i++) { |
1333 | 1340 | ||
@@ -1360,7 +1367,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | @@ -1360,7 +1367,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | ||
1360 | $("#totalTerms").html("<span class='pull-left marginTop5'>" + $("#termList option").length + " Structures</span>"); | 1367 | $("#totalTerms").html("<span class='pull-left marginTop5'>" + $("#termList option").length + " Structures</span>"); |
1361 | } | 1368 | } |
1362 | } | 1369 | } |
1363 | - $scope.GetAnnotationBasedOnActualTermNo = function (actualTermNo) { | 1370 | + $scope.GetAnnotationBasedOnActualTermNo = function (actualTermNo) { |
1364 | 1371 | ||
1365 | 1372 | ||
1366 | var languageArray = $rootScope.lexiconLanguageArray; | 1373 | var languageArray = $rootScope.lexiconLanguageArray; |