diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index 861f275..297fc5b 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -1651,7 +1651,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
annotationText = $scope.GetAnnotationText(parseInt(RGBColor));
}
else {
- $scope.loadSearchData();
+ $rootScope.loadSearchData();
annotationText = $scope.GetAnnotationText(parseInt(RGBColor));
}
@@ -2026,7 +2026,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
else {
- $scope.loadSearchData();
+ $rootScope.loadSearchData();
annotationText = $scope.GetAnnotationText(parseInt(RGBColor));
}
@@ -8739,76 +8739,84 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.loadListManger = function () {
var primaryLexiconIndex;
- for (var i = 0; i <= $rootScope.vocabTermDataArray.length - 1; i++) {
- if ($rootScope.vocabTermDataArray[i].language == $rootScope.lexiconLanguageArray[0].language) {
- primaryLexiconIndex = i;
+ if ($rootScope.vocabTermDataArray != null && $rootScope.vocabTermDataArray != undefined && $rootScope.vocabTermDataArray.length > 0) {
+
+ for (var i = 0; i <= $rootScope.vocabTermDataArray.length - 1; i++) {
+ if ($rootScope.vocabTermDataArray[i].language == $rootScope.lexiconLanguageArray[0].language) {
+ primaryLexiconIndex = i;
+ }
}
- }
- console.log($rootScope.vocabTermDataArray[primaryLexiconIndex].language);
- $rootScope.isListManagerMenuSelected = true;
+ console.log($rootScope.vocabTermDataArray[primaryLexiconIndex].language);
+ $rootScope.isListManagerMenuSelected = true;
- var vocabTermTxt = [];
- if ($rootScope.TermNumberData != null || $rootScope.TermNumberData != undefined && $rootScope.TermNumberData.length > 0) {
- angular.forEach($rootScope.TermNumberData.TermData.Term, function (value1, key1) {
+ 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.vocabTermDataArray[primaryLexiconIndex].VocabTermData.VocabTerms.Term, function (value2, key2) {
+ angular.forEach($rootScope.vocabTermDataArray[primaryLexiconIndex].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 {
+ console.log("$rootScope.TermNumberData NOT FOUND");
+ $rootScope.loadSearchData();
+
}
}
else {
- console.log("$rootScope.TermNumberData NOT FOUND");
- $scope.loadSearchData();
+ $rootScope.loadSearchData();
}
}
+
$scope.HighlightBodyOnListManagerSelection = function (actualTermNumber, isTermListOptionClicked) {