diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index 5ce919f..2a61166 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -767,6 +767,31 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
' ').appendTo('#searchListDiv')
$compile($e2)($scope);
+ $rootScope.isSearchInputClicked = true;
+
+ console.log("INSIDE WATCH. LIST IS CREATED");
+ $scope.isSearchDataLoaded = true;
+
+ if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) {
+
+ if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) {
+ $rootScope.isLoading = false;
+ $('#spinner').css('visibility', 'hidden');
+ }
+ else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.ColoredImageSRC.length == 5)) {
+ $rootScope.isLoading = false;
+ $('#spinner').css('visibility', 'hidden');
+ }
+ else if (($rootScope.viewOrientationId == '5') && ($scope.ColoredImageSRC.length == 4)) {
+ $rootScope.isLoading = false;
+ $('#spinner').css('visibility', 'hidden');
+ }
+ else if (($rootScope.viewOrientationId == '6') && ($scope.ColoredImageSRC.length == 1)) {
+ $rootScope.isLoading = false;
+ $('#spinner').css('visibility', 'hidden');
+ }
+ }
+
}, 500);
}, true);
@@ -1777,6 +1802,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
if ($scope.isEligibleForHighlight == true) {
+
+ if ($scope.isSearchDataLoaded) {
+ $rootScope.isLoading = false;
+ $('#spinner').css('visibility', 'hidden');
+ }
+
if ($scope.isExtract == true) {
$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
@@ -2184,6 +2215,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
if ($scope.isEligibleForHighlight == true) {
+ if ($scope.isSearchDataLoaded) {
+ $rootScope.isLoading = false;
+ $('#spinner').css('visibility', 'hidden');
+ }
+
if ($scope.isExtract == true) {
$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
@@ -7389,17 +7425,30 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
$scope.getTermNumberList = function (actualTermNo) {
- $scope.termList = new jinqJs()
- .from($rootScope.TermNumberData.TermData.Term)
- .where('_ActualTermNumber == ' + actualTermNo)
- .select();
- if ($scope.termList != null || $scope.termList != undefined) {
- return $scope.termList;
+
+ if ($rootScope.TermNumberData != null) {
+
+ $scope.termList = new jinqJs()
+ .from($rootScope.TermNumberData.TermData.Term)
+ .where('_ActualTermNumber == ' + actualTermNo)
+ .select();
+ if ($scope.termList != null || $scope.termList != undefined) {
+ return $scope.termList;
+ }
+ else {
+ return null;
+ }
}
else {
- return null;
+ var currentBodyViewId = $rootScope.voId;
+ var termJsonPath = '~/../content/data/json/da/body-views/' + currentBodyViewId + '/da_dat_tm_sg_' + currentBodyViewId + '.json';
+ DataService.getAnotherJson(termJsonPath)
+ .then(
+ function (result) {
+ $rootScope.TermNumberData = result;
+ $scope.getTermNumberList(actualTermNo);
+ })
}
-
}
@@ -8288,7 +8337,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
}
- $rootScope.isSearchInputClicked = true;
+
$scope.ShowSearch = function () {
console.log('ShowSearch is called');
//this check is for log only because we are writing length so need to check if its not null or undefined
@@ -8668,12 +8717,28 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.getChildTermList(termNo);
// $timeout(function () { $scope.getSiblings(termNo) }, 50);
- $scope.getSiblings(termNo)
+ $scope.getSiblings(termNo);
}
}
}
}
+ else {
+ var currentBodyViewId = $rootScope.voId;
+ var termJsonPath = '~/../content/data/json/da/body-views/' + currentBodyViewId + '/da_dat_tm_sg_' + currentBodyViewId + '.json';
+ DataService.getAnotherJson(termJsonPath)
+ .then(
+ function (result) {
+ $rootScope.TermNumberData = result;
+ $scope.TermList = $scope.getTermNumberList($rootScope.actualTermNumber);
+
+ if (($scope.TermList != null || $scope.TermList != undefined) && $scope.TermList.length > 0) {
+
+ $scope.setLayerNumberAndHighlightByTermList();
+ }
+ })
+ }
+
$('#txtlayerNumber').val((parseInt($scope.layerNumber)));
$('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber));