From fa52ae3471f7e2991f89507eb4ffe567c2f80701 Mon Sep 17 00:00:00 2001 From: Mukul Date: Thu, 20 Jul 2017 18:04:36 +0530 Subject: [PATCH] this is for the bug 20273 state maintain with AA --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index 6fb8118..10f3ee4 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -1,7 +1,7 @@ 'use strict'; -AIA.controller("TileViewListController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "BodyRegions", "BodySystems", "ViewOrientations", "ImageTypes", "DataService", "ModuleService", -function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, BodyRegions, BodySystems, ViewOrientations, ImageTypes, DataService, ModuleService) { +AIA.controller("TileViewListController", ["$scope", "$window", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "BodyRegions", "BodySystems", "ViewOrientations", "ImageTypes", "DataService", "ModuleService", +function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, BodyRegions, BodySystems, ViewOrientations, ImageTypes, DataService, ModuleService) { $rootScope.OpenedTileData = []; @@ -33,6 +33,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo selectedorientation: '', selectedimagetype: '', }; + $scope.loadForModuleById = function (moduleId) { $scope.moduleId = moduleId; @@ -57,14 +58,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo console.log(' error: ' + error.statusText); } ) - - + + if (localStorage.getItem('AAGridViewScroll') !== null) { + $('html, body').animate({ scrollTop: localStorage.getItem('AAGridViewScroll') }, 'slow'); + } } $scope.openModuleItemView = function (event) { - + //0. Get selected Image Id var moduleItemDataToBeSaved = event.target.id; @@ -79,7 +82,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.OpenItemImagePath = "../../../content/images/aa/images/" + $rootScope.OpenedTileData[3]; //3. set opened module item title + localStorage.setItem("currentViewTitle", $rootScope.OpenedTileData[6]); + localStorage.setItem("AAGridViewScroll", $($window).scrollTop()); + //3. Navigate to the Module-item-view var u = $location.url(); -- libgit2 0.21.4