From f5705ac0d128efe31aa29774c8877d837175fbad Mon Sep 17 00:00:00 2001 From: Utkarsh Singh Date: Wed, 1 Mar 2017 16:57:01 +0530 Subject: [PATCH] Committed code refs: #12113 --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js index 90d48e1..f73c972 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js @@ -1,6 +1,6 @@ AIA.controller("CIController", ["$scope", "$window", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "pages", "BodyRegions", "BodySystems", "ViewOrientations", "ImageTypes", "MedicalSpecialties", "DataService", function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout, pages, BodyRegions, BodySystems, ViewOrientations, ImageTypes, MedicalSpecialties, DataService) { - // $rootScope.currentActiveModuleTitle = pages[3].name; + // $rootScope.currentActiveModuleTitle = pages[3].name; $scope.showme = true; $scope.IllustrationData; $scope.CIAllBodyRegion = []; @@ -76,9 +76,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout else { $scope.setActiveTab(1); $scope.reRunSearchOnLoad(); + if (localStorage.getItem('CIGridViewScroll') !== null) { + $('html, body').animate({ scrollTop: localStorage.getItem('CIGridViewScroll') }); + } } - }); @@ -167,7 +169,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout .orderBy([{ field: '_Title', sort: 'asc' }]) .select(); - // console.log($scope.selectedCIListViewData); + // console.log($scope.selectedCIListViewData); $('#grid-view').empty(); angular.forEach($scope.selectedCIListViewData, function (value, key) { $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; @@ -294,7 +296,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout localStorage.setItem("CICurBodyRegion", ''); } - if (typeof (query.selectedbodysystem) !== "undefined" && (query.selectedbodysystem !== null && query.selectedbodysystem !=="")) { + if (typeof (query.selectedbodysystem) !== "undefined" && (query.selectedbodysystem !== null && query.selectedbodysystem !== "")) { filtercount = filtercount + 1; localStorage.setItem("CICurBodySystem", query.selectedbodysystem); } @@ -461,7 +463,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } ); - + } @@ -469,7 +471,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $("html,body").scrollTop(0); } - + $scope.openView = function ($event) { $rootScope.MenuModuleName = "CI"; @@ -483,8 +485,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout .where('_id = ' + $event.currentTarget.id) .select('_Title'); - // console.log(CITitle); - // console.log($scope.selectedCIListViewData); + // console.log(CITitle); + // console.log($scope.selectedCIListViewData); $rootScope.ViewTitle = CITitle[0]._Title; } @@ -492,20 +494,23 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $rootScope.ViewTitle = $event.currentTarget.textContent; } - + localStorage.setItem("currentViewTitleFromJson", $rootScope.ViewTitle); localStorage.setItem("currentBodyViewId", $event.currentTarget.id); + //Set the vertical scroll value of the Grid-View. + var y = $($window).scrollTop(); + localStorage.setItem("CIGridViewScroll", y); var u = $location.url(); $location.url('/clinical-illustrations-detail'); - // console.log($location.url('/clinical-illustrations-detail')); + // console.log($location.url('/clinical-illustrations-detail')); } $scope.openBodyView = function () { - + $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); $scope.voId = localStorage.getItem("currentBodyViewId"); @@ -514,7 +519,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout //once you get id in scope push detail in jspanel content - + var openViews; if ($rootScope.openViews.length > 0) { openViews = new jinqJs() @@ -615,13 +620,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout ); - // console.log($rootScope.openViews); + // console.log($rootScope.openViews); $('#CIView').css("height", $(window).outerHeight()); $('#CIView').css("width", $(window).outerWidth()); } - + $scope.$on('annotationToolEvent', function (event, data) { $('#editstylebackgroundcolor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(255,255,255)") @@ -631,7 +636,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $("#canvas").css("display", "block"); $("#canvasPaint").css("display", "block"); - + $rootScope.onDrawingCanvasClick(); $rootScope.FreeStylePaint(); }); -- libgit2 0.21.4