Commit 01314f9c14089fea7ce8575320adab0d6d28f6e5

Authored by Sandeep Kumar
1 parent 5c0dae58

Fixed bugs-57854 of ADAM Images

400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js
... ... @@ -112,10 +112,15 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
112 112 $scope.setImgPosition();
113 113 }, 100);
114 114  
115   - };
116   -
  115 + };
  116 +
117 117 $scope.loadAIModuleById = function (moduleId) {
118   -
  118 +
  119 + if ($rootScope.checkRefreshButtonClick == 1) {
  120 + var query = $scope.query;
  121 + $scope.Reset(query);
  122 + $rootScope.checkRefreshButtonClick = 0;
  123 + }
119 124 var ImageCount = $rootScope.getLocalStorageValue("ImageCount");
120 125  
121 126 if ($rootScope.refreshcheck == null) {
... ... @@ -180,10 +185,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
180 185 $scope.query.SearchTextByAlphabet = "";
181 186 }
182 187  
183   - if ($scope.query.SearchText == "" && $scope.query.SearchTextByAlphabet == "") {
  188 + //if ($scope.query.SearchText == "" && $scope.query.SearchTextByAlphabet == "") {
184 189  
185   - $scope.loadAllAI(ImageCount);
186   - }
  190 + // $scope.loadAllAI(ImageCount);
  191 + //}
187 192  
188 193 }
189 194  
... ... @@ -309,14 +314,27 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
309 314 }
310 315 };
311 316  
  317 + //Code changes by Sandeep for fixed bug-57854
312 318 $scope.Reset = function (query) {
313 319 $('ul li span').removeAttr("style");
314 320 query.SearchText = "";
315 321 $scope.idSelected = '';
  322 + $scope.hideListViewDiv();
316 323 //set localstorage values
317 324 localStorage.setItem("SearchText", '');
318 325 localStorage.setItem("SearchByAlphabet", '');
319 326 localStorage.setItem("AIListViewScroll", '');
  327 + localStorage.setItem("AIGridViewScroll", '');
  328 + localStorage.setItem("currentAITabView", '');
  329 + localStorage.setItem("AIListViewScrollPosition", '');
  330 + localStorage.setItem("AISelectedRowId", '');
  331 + localStorage.setItem("currentAIImageId", '');
  332 + localStorage.setItem("listViewSelectedID", '');
  333 + localStorage.setItem("AIGridViewHighlightThumbnail", '');
  334 + localStorage.setItem("currentViewTitle", '');
  335 + localStorage.setItem("currentImageTitleFromJson", '');
  336 + //localStorage.setItem("", '');
  337 + //localStorage.setItem("", '');
320 338 var ImageCount = $rootScope.getLocalStorageValue("ImageCount");
321 339 if ($('.selected').hasClass("selected")) {
322 340 $('.selected').removeClass("selected");
... ... @@ -324,13 +342,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
324 342  
325 343 $('#ListViewDiv').scrollTop(0);
326 344  
327   - $scope.hideListViewDiv();
  345 + //$scope.hideListViewDiv();
328 346  
329 347 $scope.filterstring = false;
330 348 while ($scope.searchAIListViewData.length) {
331 349 $scope.searchAIListViewData.pop();
332 350 }
333   - $scope.loadAllAI(ImageCount);
  351 + //$scope.loadAllAI(ImageCount);
334 352 }
335 353  
336 354 $scope.ApplySearch = function (query) {
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -147,9 +147,12 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
147 147 $("#messageModal").modal('show');
148 148  
149 149 }
150   -
  150 +
151 151  
152 152 $rootScope.initializeAIA = function () {
  153 +
  154 + $rootScope.checkRefreshButtonClick = 1;
  155 +
153 156 if (params != null && params != undefined && params != "") {
154 157  
155 158 $scope.ValidateClientSiteUrl();
... ... @@ -1380,9 +1383,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
1380 1383 $rootScope.PrintPreview = "PrintPreview";
1381 1384 $rootScope.exportImage = "exportImage";
1382 1385 $rootScope.PrintViewer = "PrintViewer";
1383   - $rootScope.newCurriculum = "newCurriculum";
1384   - $rootScope.openCurriculum = "openCurriculum";
1385   - $rootScope.saveCurriculam = "saveCurriculam";
  1386 + $rootScope.newCurriculum = "";
  1387 + $rootScope.openCurriculum = "";
  1388 + $rootScope.saveCurriculam = "";
1386 1389  
1387 1390 }
1388 1391 else if ($location.url() == "/adam-images-detail") {
... ...