Commit a75229ef20e7e930c33572d11f8df75b743aa2fc
Merge branch 'CALandscapeIssue' into Develop-IPAD-MAC
Showing
1 changed file
with
12 additions
and
5 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... | ... | @@ -1411,6 +1411,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1411 | 1411 | $scope.pinDataUrl = "aa_dat_pinterm_" + imageId; |
1412 | 1412 | $rootScope.bodySystemTermArray = []; |
1413 | 1413 | $rootScope.sortedListArray = []; |
1414 | + $rootScope.duplicateListArray = []; | |
1414 | 1415 | $.ajax({ |
1415 | 1416 | url: '~/../content/data/json/aa/aa_pinterm/' + $scope.pinDataUrl + '.json', |
1416 | 1417 | type: 'GET', |
... | ... | @@ -1424,16 +1425,22 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1424 | 1425 | if ($scope.aaPinData[i]._BodySystemName.toLowerCase() == bodySystemName.toLowerCase()) { |
1425 | 1426 | for (var j = 0 ; j <= $rootScope.bodySystemTermArray.length - 1; j++) { |
1426 | 1427 | if ($scope.aaPinData[i]._TermId == $rootScope.bodySystemTermArray[j].termNumbr) { |
1427 | - if ($rootScope.bodySystemTermArray[j].language == "1") { | |
1428 | + if ($rootScope.bodySystemTermArray[j].language == $rootScope.lexiconLanguageArray[0].id) { | |
1428 | 1429 | console.log($rootScope.bodySystemTermArray[j].text); |
1429 | - $rootScope.sortedListArray.push({ "title": $rootScope.bodySystemTermArray[j].text, "id": $rootScope.bodySystemTermArray[j].termNumbr }); | |
1430 | - | |
1430 | + $rootScope.duplicateListArray.push({ "title": $rootScope.bodySystemTermArray[j].text, "id": $rootScope.bodySystemTermArray[j].termNumbr }); | |
1431 | 1431 | } |
1432 | 1432 | } |
1433 | 1433 | } |
1434 | 1434 | } |
1435 | 1435 | } |
1436 | - | |
1436 | + var temp = []; | |
1437 | + for (var i = 0; i <= $rootScope.duplicateListArray.length - 1; i++) { | |
1438 | + var termID = $rootScope.duplicateListArray[i].id; | |
1439 | + if ($.inArray(termID, temp) == -1) { | |
1440 | + temp.push(termID); | |
1441 | + $rootScope.sortedListArray.push({ "title": $rotScope.duplicateListArray[i].title, "id": termID }); | |
1442 | + } | |
1443 | + } | |
1437 | 1444 | |
1438 | 1445 | for (var i = 0; i <= $rootScope.sortedListArray.length - 1; i++) { |
1439 | 1446 | |
... | ... | @@ -1466,7 +1473,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1466 | 1473 | $("#totalTerms").html("<span class='pull-left marginTop5'>" + $("#termList option").length + " Structures</span>"); |
1467 | 1474 | } |
1468 | 1475 | } |
1469 | - $scope.GetAnnotationBasedOnActualTermNo = function (actualTermNo) { | |
1476 | + $scope.GetAnnotationBasedOnActualTermNo = function (actualTermNo) { | |
1470 | 1477 | |
1471 | 1478 | |
1472 | 1479 | var languageArray = $rootScope.lexiconLanguageArray; | ... | ... |