diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index 544d9e4..20b5bf5 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -422,6 +422,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//0.1
var currentBodyViewId = localStorage.getItem("currentBodyViewId");
+ $scope.loadSearchDataForBodyView();
+
+
console.log('currentBodyViewId pickjed from localStorage: ' + currentBodyViewId);
var openViews;
@@ -499,7 +502,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//1. load navigator man first
$scope.LoadBodyViewNavigatorImage();
- $scope.loadSearchDataForBodyView();
+ //$scope.loadSearchDataForBodyView();
$scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
@@ -7348,11 +7351,21 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$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
+ if ($scope.VocabTermTxt != null || $scope.VocabTermTxt != undefined)
+ console.log('$scope.VocabTermTxt.length= ' + $scope.VocabTermTxt.length)
$timeout(function () {
- $scope.IsSearchVisible = true;
-
- document.getElementById("termlistfilter").style.display = "block";
+ if (($scope.VocabTermTxt!=null|| $scope.VocabTermTxt!=undefined) && ($scope.VocabTermTxt.length > 0)) {
+ $scope.IsSearchVisible = true;
+ document.getElementById("termlistfilter").style.display = "block";
+ }
+ else {
+ $scope.loadSearchDataForBodyView();
+ if ($scope.VocabTermTxt.length > 0) {
+ $scope.ShowSearch();
+ }
+ }
}, 500);
//$scope.IsSearchVisible = true;