diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index 4f32134..9b21bee 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -55,6 +55,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou }; $scope.loadForModuleById = function (moduleId) { + $rootScope.openModules.push({ "ModuleId": 2 }); if ($rootScope.refreshcheck == null) { $location.path('/'); @@ -75,12 +76,35 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.moduleLandingData = result; // setTimeout(function () { $('#' + $rootScope.highlightid).find('.thumbnail').addClass('hightlightstate'); }, 100); setTimeout(function () { + + if (localStorage.getItem("CurrentBodyRegion") != '') { + $("#region option[value='"+localStorage.getItem('CurrentBodyRegion')+"']").prop('selected', true); + } + if (localStorage.getItem("CurrentBodySystem") != '') { + $("#system option[value='"+localStorage.getItem('CurrentBodySystem')+"']").prop('selected', true); + } + if (localStorage.getItem("CurrentOrientation") != '') { + $("#orientation option[value='"+localStorage.getItem('CurrentOrientation')+"']").prop('selected', true); + } + if (localStorage.getItem("CurrentImageType") != '') { + $("#Type option[value='"+localStorage.getItem('CurrentImageType')+"']").prop('selected', true); + } + $scope.query.selectedbodyregion = localStorage.getItem('CurrentBodyRegion'); + $scope.query.selectedbodysystem = localStorage.getItem('CurrentBodySystem'); + $scope.query.selectedorientation = localStorage.getItem('CurrentOrientation'); + $scope.query.selectedimagetype = localStorage.getItem('CurrentImageType'); + + $scope.FilterByImage(1, $scope.query); + setTimeout(function () { if ($rootScope.getLocalStorageValue('AAGridViewHighlightThumbnail') !== null) { $('#' + $rootScope.getLocalStorageValue("AAGridViewHighlightThumbnail")).find('.thumbnail').addClass('HightLightThumbnail'); } if ($rootScope.getLocalStorageValue('AAGridViewScroll') !== null && $location.url() == "/tile-view-list") { $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('AAGridViewScroll') }, 'slow'); } + }, 100); + + }, 100); //console.log(JSON.stringify(result, null, 4)); }, @@ -135,7 +159,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou localStorage.setItem("currentViewTitle", $rootScope.OpenedTileData[6]); localStorage.setItem("AAGridViewScroll", $($window).scrollTop()); localStorage.setItem("AAGridViewHighlightThumbnail", $(event.target).parent().parent().parent().attr('id')); - + //3. Navigate to the Module-item-view var u = $location.url(); $location.url('/module-item-view'); @@ -479,6 +503,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.FilterByImage = function (moduleId, query) { + debugger; + console.log(query); $scope.moduleId = moduleId; $scope.filterstring = true; @@ -595,9 +621,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.imagePath = "../content/images/aa/thumbnails/" + value._TileImageName; - var $el = $('
' + var $el = $('
' + '
').appendTo('#grid-view'); @@ -648,7 +674,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } $scope.Reset = function (moduleId, query) { - + debugger; query.selectedbodyregion = ""; query.selectedbodysystem = ""; query.selectedorientation = "";