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 | 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 | 7 | $rootScope.OpenedTileData = []; |
... | ... | @@ -33,6 +33,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
33 | 33 | selectedorientation: '', |
34 | 34 | selectedimagetype: '', |
35 | 35 | }; |
36 | + | |
36 | 37 | $scope.loadForModuleById = function (moduleId) { |
37 | 38 | |
38 | 39 | $scope.moduleId = moduleId; |
... | ... | @@ -57,14 +58,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
57 | 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 | 69 | $scope.openModuleItemView = function (event) { |
67 | - | |
70 | + | |
68 | 71 | //0. Get selected Image Id |
69 | 72 | var moduleItemDataToBeSaved = event.target.id; |
70 | 73 | |
... | ... | @@ -79,7 +82,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
79 | 82 | $scope.OpenItemImagePath = "../../../content/images/aa/images/" + $rootScope.OpenedTileData[3]; |
80 | 83 | |
81 | 84 | //3. set opened module item title |
85 | + | |
82 | 86 | localStorage.setItem("currentViewTitle", $rootScope.OpenedTileData[6]); |
87 | + localStorage.setItem("AAGridViewScroll", $($window).scrollTop()); | |
88 | + | |
83 | 89 | |
84 | 90 | //3. Navigate to the Module-item-view |
85 | 91 | var u = $location.url(); | ... | ... |