diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js index 63cba73..ce4cbf3 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js @@ -290,41 +290,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.setActiveTab(1, inderectCall); $scope.reRunSearchOnLoad(); } - - //setTimeout(function () { - // $scope.setImgPosition(); - //}, 100); - - //setTimeout(function () { - // if ($('#grid-view').css("display") == "block") { - // if ($rootScope.getLocalStorageValue('AIGridViewHighlightThumbnail') !== null) { - // $('#' + $rootScope.getLocalStorageValue("AIGridViewHighlightThumbnail")).find('.thumbnail').addClass('HightLightThumbnail'); - // } - // if ($rootScope.getLocalStorageValue('AIGridViewScroll') !== null && $location.url() == "/tile-view-list") { - - // $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('AIGridViewScroll') }, 'slow'); - - // } - // } - // if ($('#list-view').css("display") == "block") { - // var AIListViewScroll = $rootScope.getLocalStorageValue("AIListViewScroll"); - // if (typeof (AIListViewScroll) !== "undefined" && AIListViewScroll !== null && AIListViewScroll !== '' && $location.url() == "/tile-view-list") { - // if (typeof InstallTrigger !== 'undefined') { - - // $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue('AIListViewScroll') }, 'slow'); - // } - // else { - - // $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue('AIListViewScroll') }, 'slow'); - // } - // $("#list-view table tbody tr").removeClass("active"); - // $("#list-view table tbody #" + $rootScope.getLocalStorageValue("listViewSelectedID")).addClass("active"); - // } - // } - //}, 100); - - //$('#list-view').css('display', 'none'); } $scope.reRunSearchOnLoad = function () { @@ -612,12 +578,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout }, 10); $rootScope.isLoading = false; - $('#aiSpinner').css('visibility', 'hidden'); - - //Added code by sandeep for fixed bug-40273 - //setTimeout(function () { - // $scope.setImgPosition(); - //}, 10); + $('#aiSpinner').css('visibility', 'hidden'); }, @@ -630,10 +591,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout //Added method by sandeep for fixed Bug-57978 to selected Image $scope.setImgPosition = function () { - var _currentImgId = $rootScope.getLocalStorageValue("currentAIImageId"); + var _currentImgId = $rootScope.getLocalStorageValue("currentAIImageId"); + var aISelectedRowId = $rootScope.getLocalStorageValue("AISelectedRowId"); if (_currentImgId != "null" && _currentImgId != null) { - $('#' + _currentImgId).find('.thumbnail').addClass('HightLightThumbnail'); - //$('html, body').animate({ scrollTop: $('#' + _currentImgId).position().top }, 100); + $('#' + _currentImgId).find('.thumbnail').addClass('HightLightThumbnail'); $scope.hiderow = true; } if ($('#grid-view').css("display") == "block") { @@ -651,11 +612,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout if (AIListViewScroll !== null && $location.url() == "/ADAM-images" && AIListViewScroll != "0") { $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue('AIListViewScrollPosition') }, 'slow'); } - else if (_currentImgId != "null" && _currentImgId != null) { - $('html, body').animate({ scrollTop: $('#' + _currentImgId).position().top }, 100); - } - //$("#list-view table tbody tr").removeClass("active"); - //$("#list-view table tbody #" + $rootScope.getLocalStorageValue("listViewSelectedID")).addClass("active"); + else if (aISelectedRowId != "null" && aISelectedRowId != null) { + $('html, body').animate({ scrollTop: $('#' + aISelectedRowId).position().top }, 100); + } } } @@ -758,11 +717,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout }, 10); $rootScope.isLoading = false; - $('#aiSpinner').css('visibility', 'hidden'); - //Added code by sandeep for fixed bug-40273 - //setTimeout(function () { - // $scope.setImgPosition(); - //}, 10); + $('#aiSpinner').css('visibility', 'hidden'); }, function (error) { console.log(' $scope.IllustrationData = ' + error.statusText); @@ -810,122 +765,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout localStorage.setItem("AIGridViewHighlightThumbnail", $(event.target).parent().parent().parent().attr('id')); var u = $location.url(); $location.url('/adam-images-detail'); - } - - //$scope.OpenAdamImageView = function () { - - // // $rootScope.currentActiveModuleTitle = "A.D.A.M. Images"; - - // if ($rootScope.refreshcheck == null) { - // $location.path('/'); - // } - // $rootScope.isLoading = true; - // $('#aiSpinner').css('visibility', 'visible'); - // //$scope.DisableUI(); - // $scope.voId = $rootScope.getLocalStorageValue("currentAIImageId"); - - // var counter = 1; - // var tittle = $rootScope.getLocalStorageValue("currentImageTitleFromJson"); - // localStorage.setItem("currentViewTitle", tittle); - - // var promise = DataService.getJson('~/../content/data/json/ai/ai_dat_contentlist.json') - // promise.then( - // function (result) { - // $scope.AIllustrationData = result; - // $scope.AIlistViewData = $scope.AIllustrationData.root.AIData; - - // var clickedAIImage = []; - // clickedAIImage = new jinqJs() - // .from($scope.AIlistViewData) - // .where('_id == ' + $scope.voId) - // .select('_contentImage'); - - // $scope.clickedAIImage = "~/../content/images/ai/images/" + clickedAIImage[0]._contentImage; - - // // store image for export - // var tittle = $rootScope.getLocalStorageValue("currentViewTitle"); - // $rootScope.StoreTitleName(tittle); - // $rootScope.StoreOrgImageName(clickedAIImage[0]._contentImage); - - // if (clickedAIImage.length > 0) { - - // $.jsPanel({ - // id: 'aiImagePanel', - // selector: '.aiView', - // theme: 'success', - // currentController: 'AIController', - // parentSlug: 'ADAM-images', - // content: '