Commit 0585407ef828a0a4bac993de999a80b0faadc0e4

Authored by Nikita Kulshreshtha
2 parents 2d959528 5cd97326

Merge branch 'AIA_BUGS_update' into Develop

400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js
... ... @@ -325,12 +325,15 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
325 325 $scope.Reset = function (query) {
326 326 $('ul li span').removeAttr("style");
327 327 query.SearchText = "";
  328 + $scope.idSelected = '';
328 329 //set localstorage values
329 330 localStorage.setItem("SearchText", '');
330 331 localStorage.setItem("SearchByAlphabet", '');
331 332 localStorage.setItem("AIListViewScroll", '');
332 333 var ImageCount = $rootScope.getLocalStorageValue("ImageCount");
333   - if ($('.selected').hasClass("selected")) { $('.selected').removeClass("selected"); }
  334 + if ($('.selected').hasClass("selected")) {
  335 + $('.selected').removeClass("selected");
  336 + }
334 337  
335 338 $('#ListViewDiv').scrollTop(0);
336 339  
... ... @@ -345,6 +348,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
345 348  
346 349 $scope.ApplySearch = function (query) {
347 350 $('ul li span').removeAttr("style");
  351 + $scope.idSelected = '';
  352 + $scope.hiderow = false;
348 353 var currentSearchtext = $rootScope.getLocalStorageValue("SearchText");
349 354 localStorage.setItem("SearchText", '');
350 355 if (currentSearchtext == "undefined" || (currentSearchtext == null || currentSearchtext == "")) {
... ... @@ -354,11 +359,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
354 359 return false;
355 360 }
356 361 }
  362 +
357 363  
  364 + //$scope.filterstring = false;
358 365 while ($scope.searchAIListViewData.length) {
359 366 $scope.searchAIListViewData.pop();
360 367 }
361   -
  368 +
362 369 $rootScope.isLoading = true;
363 370 $('#aiSpinner').css('visibility', 'visible');
364 371 $scope.DisableUI();
... ... @@ -455,13 +462,20 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
455 462 }
456 463 $scope.counter = 1;
457 464 $scope.ApplySearchByAlphabet = function (SearchTextByAlphabet) {
458   - $rootScope.SearchTextByAlphabet = SearchTextByAlphabet
  465 + $rootScope.SearchTextByAlphabet = SearchTextByAlphabet;
  466 + localStorage.setItem("SearchByAlphabet", '');
459 467 $rootScope.isLoading = true;
  468 + $scope.idSelected = '';
  469 + $scope.hiderow = false;
460 470 $('#aiSpinner').css('visibility', 'visible');
461 471 $scope.DisableUI();
462 472 $('ul li span').removeAttr("style");
463 473 $('#' + $rootScope.SearchTextByAlphabet).css({ "color": "white", "background-color": "#1B92D0" });
464 474 $scope.filterstring = true;
  475 + while ($scope.searchAIListViewData.length) {
  476 + $scope.searchAIListViewData.pop();
  477 + }
  478 +
465 479 if (typeof (SearchTextByAlphabet) !== "undefined" && (SearchTextByAlphabet !== null && SearchTextByAlphabet !== "")) {
466 480 localStorage.setItem("SearchByAlphabet", SearchTextByAlphabet);
467 481 }
... ... @@ -510,6 +524,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
510 524 "_contentImage": value._contentImage,
511 525 "_ThumbnailImage": value._ThumbnailImage,
512 526 });
  527 +
513 528 }
514 529  
515 530 });
... ... @@ -523,7 +538,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
523 538 $('#ListViewDiv').append('<tr id="searchItem"><td colspan="6"><strong style="color:black;">No illustration found for the selected search criteria!</strong></td></tr>');
524 539 }
525 540 $rootScope.isLoading = false;
526   -
  541 +
527 542 setTimeout(function () {
528 543 $scope.EnableUI();
529 544 }, 10);
... ... @@ -531,10 +546,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
531 546 function (error) {
532 547 console.log(' $scope.IllustrationData = ' + error.statusText);
533 548 }
534   -
535 549 );
536   -
537   -
538 550 }
539 551  
540 552  
... ... @@ -645,10 +657,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
645 657 $("#aiImagePanel .img-thumbnail").css("min-height", $("#aiImagePanel .jsPanel-content").height());
646 658 $('.jsPanel-content .jsPanel-theme-success').css('overflow-y', 'auto !important')
647 659 var jspContentHeight = $('.jsPanel-content').height();
648   -
649   -
650   -
651   -
652 660 }
653 661 },
654 662 function (error) {
... ...