Commit fa52ae3471f7e2991f89507eb4ffe567c2f80701
1 parent
2ca490b1
this is for the bug 20273 state maintain with AA
Showing
1 changed file
with
11 additions
and
5 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | -AIA.controller("TileViewListController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "BodyRegions", "BodySystems", "ViewOrientations", "ImageTypes", "DataService", "ModuleService", | ||
4 | -function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, BodyRegions, BodySystems, ViewOrientations, ImageTypes, DataService, ModuleService) { | 3 | +AIA.controller("TileViewListController", ["$scope", "$window", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "BodyRegions", "BodySystems", "ViewOrientations", "ImageTypes", "DataService", "ModuleService", |
4 | +function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, BodyRegions, BodySystems, ViewOrientations, ImageTypes, DataService, ModuleService) { | ||
5 | 5 | ||
6 | 6 | ||
7 | $rootScope.OpenedTileData = []; | 7 | $rootScope.OpenedTileData = []; |
@@ -33,6 +33,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -33,6 +33,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
33 | selectedorientation: '', | 33 | selectedorientation: '', |
34 | selectedimagetype: '', | 34 | selectedimagetype: '', |
35 | }; | 35 | }; |
36 | + | ||
36 | $scope.loadForModuleById = function (moduleId) { | 37 | $scope.loadForModuleById = function (moduleId) { |
37 | 38 | ||
38 | $scope.moduleId = moduleId; | 39 | $scope.moduleId = moduleId; |
@@ -57,14 +58,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -57,14 +58,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
57 | console.log(' error: ' + error.statusText); | 58 | console.log(' error: ' + error.statusText); |
58 | } | 59 | } |
59 | ) | 60 | ) |
60 | - | ||
61 | - | 61 | + |
62 | + if (localStorage.getItem('AAGridViewScroll') !== null) { | ||
63 | + $('html, body').animate({ scrollTop: localStorage.getItem('AAGridViewScroll') }, 'slow'); | ||
64 | + } | ||
62 | 65 | ||
63 | 66 | ||
64 | } | 67 | } |
65 | 68 | ||
66 | $scope.openModuleItemView = function (event) { | 69 | $scope.openModuleItemView = function (event) { |
67 | - | 70 | + |
68 | //0. Get selected Image Id | 71 | //0. Get selected Image Id |
69 | var moduleItemDataToBeSaved = event.target.id; | 72 | var moduleItemDataToBeSaved = event.target.id; |
70 | 73 | ||
@@ -79,7 +82,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -79,7 +82,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
79 | $scope.OpenItemImagePath = "../../../content/images/aa/images/" + $rootScope.OpenedTileData[3]; | 82 | $scope.OpenItemImagePath = "../../../content/images/aa/images/" + $rootScope.OpenedTileData[3]; |
80 | 83 | ||
81 | //3. set opened module item title | 84 | //3. set opened module item title |
85 | + | ||
82 | localStorage.setItem("currentViewTitle", $rootScope.OpenedTileData[6]); | 86 | localStorage.setItem("currentViewTitle", $rootScope.OpenedTileData[6]); |
87 | + localStorage.setItem("AAGridViewScroll", $($window).scrollTop()); | ||
88 | + | ||
83 | 89 | ||
84 | //3. Navigate to the Module-item-view | 90 | //3. Navigate to the Module-item-view |
85 | var u = $location.url(); | 91 | var u = $location.url(); |