diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index 71eebf5..e338e97 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -8357,59 +8357,64 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var vocabTermTxt = [];
+ if ($rootScope.TermNumberData != null || $rootScope.TermNumberData != undefined && $rootScope.TermNumberData.length > 0) {
+ angular.forEach($rootScope.TermNumberData.TermData.Term, function (value1, key1) {
- angular.forEach($rootScope.TermNumberData.TermData.Term, function (value1, key1) {
+ angular.forEach($rootScope.vocabTermDataArray[0].VocabTermData.VocabTerms.Term, function (value2, key2) {
- angular.forEach($rootScope.vocabTermDataArray[0].VocabTermData.VocabTerms.Term, function (value2, key2) {
+ if (value1._ActualTermNumber === value2._ActualTermNumber) {
+ vocabTermTxt.push(
- if (value1._ActualTermNumber === value2._ActualTermNumber) {
- vocabTermTxt.push(
+ {
- {
+ "_ActualTermNumber": value2._ActualTermNumber,
+ "_TermText": value2._TermText,
+ "_cdId": value2._cdId
- "_ActualTermNumber": value2._ActualTermNumber,
- "_TermText": value2._TermText,
- "_cdId": value2._cdId
+ }
- }
-
- );
+ );
- }
+ }
- })
+ })
- })
+ })
- $scope.VocabTermTxt = new jinqJs()
- .from(vocabTermTxt)
- .distinct('_TermText', '_ActualTermNumber')
- .orderBy([{ field: '_TermText', sort: 'asc' }])
- .select('_ActualTermNumber', '_TermText', '_cdId');
+ $scope.VocabTermTxt = new jinqJs()
+ .from(vocabTermTxt)
+ .distinct('_TermText', '_ActualTermNumber')
+ .orderBy([{ field: '_TermText', sort: 'asc' }])
+ .select('_ActualTermNumber', '_TermText', '_cdId');
- if ($scope.VocabTermTxt != null || $scope.VocabTermTxt != undefined) {
+ if ($scope.VocabTermTxt != null || $scope.VocabTermTxt != undefined) {
- for (var j = 0; j < $scope.VocabTermTxt.length; j++) {
- var $el = $('').appendTo('#termList')
- $compile($el)($scope);
+ for (var j = 0; j < $scope.VocabTermTxt.length; j++) {
+ var $el = $('').appendTo('#termList')
+ $compile($el)($scope);
- }
+ }
- $rootScope.isLoading = false;
- $('#spinner').css('visibility', 'hidden');
+ $rootScope.isLoading = false;
+ $('#spinner').css('visibility', 'hidden');
- var termsTotal = '' + $scope.VocabTermTxt.length + ' Structures';
- $("#totalTerms").empty();
- $('#totalTerms').append(termsTotal);
+ var termsTotal = '' + $scope.VocabTermTxt.length + ' Structures';
+ $("#totalTerms").empty();
+ $('#totalTerms').append(termsTotal);
+ }
+ }
+ else {
+ $scope.loadSearchData();
+ $scope.loadListManger();
}
}