Commit d0c99d3c489169d397488e2a105d664d10c3c8c8
Merge branch 'cacheclearnewagain' into Develop
Showing
7 changed files
with
122 additions
and
108 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js
... | ... | @@ -97,8 +97,8 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location |
97 | 97 | } |
98 | 98 | $rootScope.isLoading = true; |
99 | 99 | $('#spinner').css('visibility', 'visible'); |
100 | - //alert(localStorage.getItem("currentBodyViewId")); | |
101 | - $scope.voId3D = localStorage.getItem("currentBodyViewId"); | |
100 | + //alert($rootScope.getLocalStorageValue("currentBodyViewId")); | |
101 | + $scope.voId3D = $rootScope.getLocalStorageValue("currentBodyViewId"); | |
102 | 102 | |
103 | 103 | //alert($scope.voId3D); |
104 | 104 | |
... | ... | @@ -113,13 +113,13 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location |
113 | 113 | .select(); |
114 | 114 | } |
115 | 115 | var counter = 1; |
116 | - var tittle = localStorage.getItem("currentViewTitleFromJson"); | |
116 | + var tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson"); | |
117 | 117 | |
118 | 118 | if (openViews != null && openViews.length > 0) { |
119 | 119 | angular.forEach(openViews, function (value, key) { |
120 | 120 | |
121 | 121 | if (value.body - views == tittle) { |
122 | - tittle = localStorage.getItem("currentViewTitleFromJson") + counter++; | |
122 | + tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson") + counter++; | |
123 | 123 | $rootScope.currentActiveViewTitle = tittle; |
124 | 124 | localStorage.setItem("currentViewTitle", tittle); |
125 | 125 | } |
... | ... | @@ -131,7 +131,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location |
131 | 131 | |
132 | 132 | } |
133 | 133 | |
134 | - // alert(localStorage.getItem("currentViewTitle")); | |
134 | + // alert($rootScope.getLocalStorageValue("currentViewTitle")); | |
135 | 135 | |
136 | 136 | var promise = DataService.getJson('~/../content/data/json/3da/3da_dat_contentlist.json') |
137 | 137 | promise.then( |
... | ... | @@ -159,7 +159,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location |
159 | 159 | content: '<div class="col-sm-12">' + |
160 | 160 | '<object data="' + $scope.Selected3DImagePath + '" width="100%" height="800px" type="image/svg+xml"></object>' + |
161 | 161 | '</div>', |
162 | - title: localStorage.getItem("currentViewTitle"), | |
162 | + title: $rootScope.getLocalStorageValue("currentViewTitle"), | |
163 | 163 | position: { |
164 | 164 | top: 70, |
165 | 165 | left: 1, | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js
... | ... | @@ -48,7 +48,7 @@ function ($scope, $rootScope, pages, log, $location) { |
48 | 48 | |
49 | 49 | //set the local storage |
50 | 50 | |
51 | - var curtab = localStorage.getItem("currentAODTabView"); | |
51 | + var curtab = $rootScope.getLocalStorageValue("currentAODTabView"); | |
52 | 52 | if (curtab == 2) { |
53 | 53 | $scope.setActiveTab(2); |
54 | 54 | } | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
... | ... | @@ -56,13 +56,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
56 | 56 | |
57 | 57 | //set the local storage |
58 | 58 | |
59 | - var curtab = localStorage.getItem("currentCATabView"); | |
59 | + var curtab = $rootScope.getLocalStorageValue("currentCATabView"); | |
60 | 60 | //if (curtab == 2) { |
61 | 61 | // $scope.setActiveTab(2); |
62 | 62 | //} |
63 | 63 | if (curtab == 2) { |
64 | 64 | $scope.setActiveTab(2); |
65 | - var curSelectedRowId = localStorage.getItem("CASelectedRowId"); | |
65 | + var curSelectedRowId = $rootScope.getLocalStorageValue("CASelectedRowId"); | |
66 | 66 | if (typeof (curSelectedRowId) !== "undefined" && curSelectedRowId !== null && curSelectedRowId !== '') { |
67 | 67 | $scope.reRunSearchOnLoad(); |
68 | 68 | $scope.idSelected = curSelectedRowId; |
... | ... | @@ -76,7 +76,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
76 | 76 | else { |
77 | 77 | $scope.setActiveTab(1); |
78 | 78 | $scope.reRunSearchOnLoad(); |
79 | - $('html, body').animate({ scrollTop: localStorage.getItem('CAGridViewScroll') }, 'slow'); | |
79 | + $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('CAGridViewScroll') }, 'slow'); | |
80 | 80 | } |
81 | 81 | |
82 | 82 | |
... | ... | @@ -84,7 +84,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
84 | 84 | }); |
85 | 85 | |
86 | 86 | $scope.reRunSearchOnLoad = function () { |
87 | - var curBodyRegion = localStorage.getItem("CACurBodyRegion"); | |
87 | + var curBodyRegion = $rootScope.getLocalStorageValue("CACurBodyRegion"); | |
88 | 88 | if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !== '') { |
89 | 89 | $scope.query.selectedbodyregion = curBodyRegion; |
90 | 90 | } |
... | ... | @@ -92,7 +92,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
92 | 92 | $scope.query.selectedbodyregion = ""; |
93 | 93 | } |
94 | 94 | |
95 | - var curBodySystem = localStorage.getItem("CACurBodySystem"); | |
95 | + var curBodySystem = $rootScope.getLocalStorageValue("CACurBodySystem"); | |
96 | 96 | if (typeof (curBodySystem) !== "undefined" && curBodySystem !== null && curBodySystem !== '') { |
97 | 97 | $scope.query.selectedbodysystem = curBodySystem; |
98 | 98 | } |
... | ... | @@ -100,7 +100,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
100 | 100 | $scope.query.selectedbodysystem = ""; |
101 | 101 | } |
102 | 102 | |
103 | - var curSpeciality = localStorage.getItem("CACurSpeciality"); | |
103 | + var curSpeciality = $rootScope.getLocalStorageValue("CACurSpeciality"); | |
104 | 104 | if (typeof (curSpeciality) !== "undefined" && curSpeciality !== null && curSpeciality !== '') { |
105 | 105 | $scope.query.selectedspecialty = curSpeciality; |
106 | 106 | } |
... | ... | @@ -178,7 +178,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
178 | 178 | }); |
179 | 179 | |
180 | 180 | }); |
181 | - $('#' + localStorage.getItem("currentBodyViewId")).find('.thumbnail').addClass('HightLightThumbnail'); | |
181 | + $('#' + $rootScope.getLocalStorageValue("currentBodyViewId")).find('.thumbnail').addClass('HightLightThumbnail'); | |
182 | 182 | }, |
183 | 183 | function (error) { |
184 | 184 | // handle errors here |
... | ... | @@ -263,7 +263,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
263 | 263 | $scope.searchCAListViewData.pop(); |
264 | 264 | } |
265 | 265 | |
266 | - if (localStorage.getItem("currentCATabView") == 2) { | |
266 | + if ($rootScope.getLocalStorageValue("currentCATabView") == 2) { | |
267 | 267 | localStorage.setItem("CASelectedRowId", ""); |
268 | 268 | $scope.hiderow = false; |
269 | 269 | } |
... | ... | @@ -479,7 +479,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
479 | 479 | } |
480 | 480 | $rootScope.isLoading = true; |
481 | 481 | $('#spinner').css('visibility', 'visible'); |
482 | - $scope.voId = localStorage.getItem("currentBodyViewId"); | |
482 | + $scope.voId = $rootScope.getLocalStorageValue("currentBodyViewId"); | |
483 | 483 | |
484 | 484 | // alert($scope.voId); |
485 | 485 | |
... | ... | @@ -494,13 +494,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
494 | 494 | .select(); |
495 | 495 | } |
496 | 496 | var counter = 1; |
497 | - var tittle = localStorage.getItem("currentViewTitleFromJson"); | |
497 | + var tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson"); | |
498 | 498 | |
499 | 499 | if (openViews != null && openViews.length > 0) { |
500 | 500 | angular.forEach(openViews, function (value, key) { |
501 | 501 | |
502 | 502 | if (value.body - views == tittle) { |
503 | - tittle = localStorage.getItem("currentViewTitleFromJson") + counter++; | |
503 | + tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson") + counter++; | |
504 | 504 | $rootScope.currentActiveViewTitle = tittle; |
505 | 505 | localStorage.setItem("currentViewTitle", tittle); |
506 | 506 | } |
... | ... | @@ -512,7 +512,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
512 | 512 | |
513 | 513 | } |
514 | 514 | |
515 | - //alert(localStorage.getItem("currentViewTitle")); | |
515 | + //alert($rootScope.getLocalStorageValue("currentViewTitle")); | |
516 | 516 | |
517 | 517 | var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist_mp4link.json') |
518 | 518 | promise.then( |
... | ... | @@ -569,7 +569,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
569 | 569 | //ajax: { |
570 | 570 | // url: 'app/views/ca/ca-view-detail.html' |
571 | 571 | //}, |
572 | - title: localStorage.getItem("currentViewTitle"), | |
572 | + title: $rootScope.getLocalStorageValue("currentViewTitle"), | |
573 | 573 | position: { |
574 | 574 | top: 70, |
575 | 575 | left: 1, |
... | ... | @@ -653,16 +653,16 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
653 | 653 | |
654 | 654 | //Set the scroll position of the tablebody to show selected row. |
655 | 655 | |
656 | - var curCAListViewScroll = localStorage.getItem("CAListViewScroll"); | |
656 | + var curCAListViewScroll = $rootScope.getLocalStorageValue("CAListViewScroll"); | |
657 | 657 | if (typeof (curCAListViewScroll) !== "undefined" && curCAListViewScroll !== null && curCAListViewScroll !== '') { |
658 | 658 | if (typeof InstallTrigger !== 'undefined') { |
659 | 659 | |
660 | - $('#ListViewDiv').animate({ scrollTop: localStorage.getItem("CAListViewScroll") }); | |
660 | + $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue("CAListViewScroll") }); | |
661 | 661 | |
662 | 662 | } |
663 | 663 | else |
664 | 664 | { |
665 | - $('#ListViewDiv').scrollTop(localStorage.getItem("CAListViewScroll")); | |
665 | + $('#ListViewDiv').scrollTop($rootScope.getLocalStorageValue("CAListViewScroll")); | |
666 | 666 | } |
667 | 667 | } |
668 | 668 | //else { |
... | ... | @@ -678,7 +678,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
678 | 678 | }; |
679 | 679 | |
680 | 680 | $scope.hideListViewDiv = function () { |
681 | - if (localStorage.getItem("currentCATabView") == 2) { | |
681 | + if ($rootScope.getLocalStorageValue("currentCATabView") == 2) { | |
682 | 682 | localStorage.setItem("CASelectedRowId", ""); |
683 | 683 | if ($('.selected').hasClass("selected")) { $('.selected').removeClass("selected"); } |
684 | 684 | $scope.hiderow = false; | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
... | ... | @@ -63,10 +63,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
63 | 63 | |
64 | 64 | //set the local storage |
65 | 65 | |
66 | - var curtab = localStorage.getItem("currentCITabView"); | |
66 | + var curtab = $rootScope.getLocalStorageValue("currentCITabView"); | |
67 | 67 | if (curtab == 2) { |
68 | 68 | $scope.setActiveTab(2); |
69 | - var curSelectedRowId = localStorage.getItem("CISelectedRowId"); | |
69 | + var curSelectedRowId = $rootScope.getLocalStorageValue("CISelectedRowId"); | |
70 | 70 | if (typeof (curSelectedRowId) !== "undefined" && curSelectedRowId !== null && curSelectedRowId !== '') { |
71 | 71 | $scope.reRunSearchOnLoad(); |
72 | 72 | $scope.idSelected = curSelectedRowId; |
... | ... | @@ -80,8 +80,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
80 | 80 | else { |
81 | 81 | $scope.setActiveTab(1); |
82 | 82 | $scope.reRunSearchOnLoad(); |
83 | - if (localStorage.getItem('CIGridViewScroll') !== null) { | |
84 | - $('html, body').animate({ scrollTop: localStorage.getItem('CIGridViewScroll') }); | |
83 | + if ($rootScope.getLocalStorageValue('CIGridViewScroll') !== null) { | |
84 | + $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('CIGridViewScroll') }); | |
85 | 85 | } |
86 | 86 | } |
87 | 87 | |
... | ... | @@ -90,7 +90,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
90 | 90 | |
91 | 91 | $scope.reRunSearchOnLoad = function () { |
92 | 92 | |
93 | - var curBodyRegion = localStorage.getItem("CICurBodyRegion"); | |
93 | + var curBodyRegion = $rootScope.getLocalStorageValue("CICurBodyRegion"); | |
94 | 94 | if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !== '') { |
95 | 95 | $scope.query.selectedbodyregion = curBodyRegion; |
96 | 96 | } |
... | ... | @@ -98,7 +98,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
98 | 98 | $scope.query.selectedbodyregion = ""; |
99 | 99 | } |
100 | 100 | |
101 | - var curBodySystem = localStorage.getItem("CICurBodySystem"); | |
101 | + var curBodySystem = $rootScope.getLocalStorageValue("CICurBodySystem"); | |
102 | 102 | if (typeof (curBodySystem) !== "undefined" && curBodySystem !== null && curBodySystem !== '') { |
103 | 103 | $scope.query.selectedbodysystem = curBodySystem; |
104 | 104 | } |
... | ... | @@ -106,7 +106,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
106 | 106 | $scope.query.selectedbodysystem = ""; |
107 | 107 | } |
108 | 108 | |
109 | - var curOrientation = localStorage.getItem("CICurOrientation"); | |
109 | + var curOrientation = $rootScope.getLocalStorageValue("CICurOrientation"); | |
110 | 110 | if (typeof (curOrientation) !== "undefined" && curOrientation !== null && curOrientation !== '') { |
111 | 111 | $scope.query.selectedorientation = curOrientation; |
112 | 112 | } |
... | ... | @@ -114,7 +114,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
114 | 114 | $scope.query.selectedorientation = ""; |
115 | 115 | } |
116 | 116 | |
117 | - var curImageType = localStorage.getItem("CICurImageType"); | |
117 | + var curImageType = $rootScope.getLocalStorageValue("CICurImageType"); | |
118 | 118 | if (typeof (curImageType) !== "undefined" && curImageType !== null && curImageType !== '') { |
119 | 119 | $scope.query.selectedimagetype = curImageType; |
120 | 120 | } |
... | ... | @@ -122,7 +122,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
122 | 122 | $scope.query.selectedimagetype = ""; |
123 | 123 | } |
124 | 124 | |
125 | - var curSpeciality = localStorage.getItem("CICurSpeciality"); | |
125 | + var curSpeciality = $rootScope.getLocalStorageValue("CICurSpeciality"); | |
126 | 126 | if (typeof (curSpeciality) !== "undefined" && curSpeciality !== null && curSpeciality !== '') { |
127 | 127 | $scope.query.selectedspecialty = curSpeciality; |
128 | 128 | } |
... | ... | @@ -201,7 +201,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
201 | 201 | // }); |
202 | 202 | |
203 | 203 | //}); |
204 | - $timeout(function () { $('#' + localStorage.getItem("currentBodyViewId")).find('.thumbnail').addClass('HightLightThumbnail'); }, 100); | |
204 | + $timeout(function () { $('#' + $rootScope.getLocalStorageValue("currentBodyViewId")).find('.thumbnail').addClass('HightLightThumbnail'); }, 100); | |
205 | 205 | |
206 | 206 | |
207 | 207 | $timeout(function () { $('#ciSpinner').css('visibility', 'hidden'); }, 300); |
... | ... | @@ -542,7 +542,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
542 | 542 | |
543 | 543 | $rootScope.isLoading = true; |
544 | 544 | $('#spinner').css('visibility', 'visible'); |
545 | - $scope.voId = localStorage.getItem("currentBodyViewId"); | |
545 | + $scope.voId = $rootScope.getLocalStorageValue("currentBodyViewId"); | |
546 | 546 | |
547 | 547 | // alert($scope.voId); |
548 | 548 | |
... | ... | @@ -557,13 +557,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
557 | 557 | .select(); |
558 | 558 | } |
559 | 559 | var counter = 1; |
560 | - var tittle = localStorage.getItem("currentViewTitleFromJson"); | |
560 | + var tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson"); | |
561 | 561 | |
562 | 562 | if (openViews != null && openViews.length > 0) { |
563 | 563 | angular.forEach(openViews, function (value, key) { |
564 | 564 | |
565 | 565 | if (value.body - views == tittle) { |
566 | - tittle = localStorage.getItem("currentViewTitleFromJson") + counter++; | |
566 | + tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson") + counter++; | |
567 | 567 | $rootScope.currentActiveViewTitle = tittle; |
568 | 568 | localStorage.setItem("currentViewTitle", tittle); |
569 | 569 | } |
... | ... | @@ -575,7 +575,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
575 | 575 | |
576 | 576 | } |
577 | 577 | |
578 | - //alert(localStorage.getItem("currentViewTitle")); | |
578 | + //alert($rootScope.getLocalStorageValue("currentViewTitle")); | |
579 | 579 | |
580 | 580 | var promise = DataService.getJson('~/../content/data/json/ci/ci_dat_contentlist.json') |
581 | 581 | promise.then( |
... | ... | @@ -619,7 +619,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
619 | 619 | //ajax: { |
620 | 620 | // url: 'app/views/ci/ci-view-detail.html' |
621 | 621 | //}, |
622 | - title: localStorage.getItem("currentViewTitle"), | |
622 | + title: $rootScope.getLocalStorageValue("currentViewTitle"), | |
623 | 623 | position: { |
624 | 624 | top: 70, |
625 | 625 | left: 1, |
... | ... | @@ -704,17 +704,17 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
704 | 704 | |
705 | 705 | //Set the scroll position of the tablebody to show selected row. |
706 | 706 | |
707 | - var curCIListViewScroll = localStorage.getItem("CIListViewScroll"); | |
707 | + var curCIListViewScroll = $rootScope.getLocalStorageValue("CIListViewScroll"); | |
708 | 708 | if (typeof (curCIListViewScroll) !== "undefined" && curCIListViewScroll !== null && curCIListViewScroll !== '') { |
709 | 709 | if (typeof InstallTrigger !== 'undefined') |
710 | 710 | { |
711 | 711 | |
712 | - $('#ListViewDiv').animate({ scrollTop: localStorage.getItem("CIListViewScroll") }); | |
712 | + $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue("CIListViewScroll") }); | |
713 | 713 | } |
714 | 714 | else |
715 | 715 | { |
716 | 716 | |
717 | - $('#ListViewDiv').scrollTop(localStorage.getItem("CIListViewScroll")); | |
717 | + $('#ListViewDiv').scrollTop($rootScope.getLocalStorageValue("CIListViewScroll")); | |
718 | 718 | } |
719 | 719 | |
720 | 720 | } |
... | ... | @@ -731,7 +731,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
731 | 731 | }; |
732 | 732 | |
733 | 733 | $scope.hideListViewDiv = function () { |
734 | - if (localStorage.getItem("currentCITabView") == 2) { | |
734 | + if ($rootScope.getLocalStorageValue("currentCITabView") == 2) { | |
735 | 735 | localStorage.setItem("CISelectedRowId", ""); |
736 | 736 | if ($('.selected').hasClass("selected")) { $('.selected').removeClass("selected"); } |
737 | 737 | $scope.hiderow = false; | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -160,7 +160,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
160 | 160 | |
161 | 161 | $scope.switchGender = function () { |
162 | 162 | |
163 | - var retrievedObject = localStorage.getItem('currentViewTitle'); | |
163 | + var retrievedObject = $rootScope.getLocalStorageValue('currentViewTitle'); | |
164 | 164 | |
165 | 165 | if (retrievedObject == "Male Anterior") { |
166 | 166 | $scope.male = "active"; |
... | ... | @@ -184,15 +184,15 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
184 | 184 | $("#bodyViewList").empty(); |
185 | 185 | //for default load |
186 | 186 | if ($event == null || $event == undefined) { |
187 | - //if ((localStorage.getItem("genderId") != "")||(localStorage.getItem("genderId")!="null")) { | |
188 | - // $scope.genderId = localStorage.getItem("genderId"); | |
187 | + //if (($rootScope.getLocalStorageValue("genderId") != "")||($rootScope.getLocalStorageValue("genderId")!="null")) { | |
188 | + // $scope.genderId = $rootScope.getLocalStorageValue("genderId"); | |
189 | 189 | //} |
190 | - var selectedGender = localStorage.getItem("genderId"); | |
190 | + var selectedGender = $rootScope.getLocalStorageValue("genderId"); | |
191 | 191 | if ((selectedGender == null)) { |
192 | 192 | $scope.genderId = "Male"; |
193 | 193 | } |
194 | 194 | else |
195 | - $scope.genderId = localStorage.getItem("genderId"); | |
195 | + $scope.genderId = $rootScope.getLocalStorageValue("genderId"); | |
196 | 196 | |
197 | 197 | } |
198 | 198 | else { |
... | ... | @@ -201,7 +201,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
201 | 201 | |
202 | 202 | localStorage.setItem("genderId", $scope.genderId); |
203 | 203 | |
204 | - var selectedGender = localStorage.getItem("genderId"); | |
204 | + var selectedGender = $rootScope.getLocalStorageValue("genderId"); | |
205 | 205 | |
206 | 206 | if (selectedGender != null) { |
207 | 207 | if (selectedGender == "Male") { |
... | ... | @@ -226,7 +226,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
226 | 226 | |
227 | 227 | var userEthnicity; |
228 | 228 | var userModestysettings; |
229 | - var curentEthnicity = localStorage.getItem("globalEthnicity"); | |
229 | + var curentEthnicity = $rootScope.getLocalStorageValue("globalEthnicity"); | |
230 | 230 | if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) { |
231 | 231 | userEthnicity = curentEthnicity; |
232 | 232 | } |
... | ... | @@ -234,7 +234,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
234 | 234 | userEthnicity = $rootScope.globalSetting.ethnicity; |
235 | 235 | } |
236 | 236 | |
237 | - var curentmodesty = localStorage.getItem("globalModesty"); | |
237 | + var curentmodesty = $rootScope.getLocalStorageValue("globalModesty"); | |
238 | 238 | if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) { |
239 | 239 | userModestysettings = curentmodesty; |
240 | 240 | } |
... | ... | @@ -437,19 +437,19 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
437 | 437 | //0. we will initially append container to load body |
438 | 438 | |
439 | 439 | //check if localstorage has any settings |
440 | - var curentEthnicity = localStorage.getItem("globalEthnicity"); | |
440 | + var curentEthnicity = $rootScope.getLocalStorageValue("globalEthnicity"); | |
441 | 441 | if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) { |
442 | 442 | $rootScope.globalSetting.ethnicity = curentEthnicity; |
443 | 443 | } |
444 | 444 | |
445 | - var curentmodesty = localStorage.getItem("globalModesty"); | |
445 | + var curentmodesty = $rootScope.getLocalStorageValue("globalModesty"); | |
446 | 446 | if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) { |
447 | 447 | $rootScope.globalSetting.modesty = curentmodesty |
448 | 448 | } |
449 | 449 | |
450 | 450 | //0.1 |
451 | 451 | |
452 | - var currentBodyViewId = localStorage.getItem("currentBodyViewId"); | |
452 | + var currentBodyViewId = $rootScope.getLocalStorageValue("currentBodyViewId"); | |
453 | 453 | if (currentBodyViewId == null || currentBodyViewId == undefined) { |
454 | 454 | // document.location = '/'; |
455 | 455 | document.location = '/'; |
... | ... | @@ -474,7 +474,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
474 | 474 | |
475 | 475 | // 0.2 getting corresponding body view title |
476 | 476 | //var counter = 1; |
477 | - var tittle = localStorage.getItem("currentViewTitleFromJson"); | |
477 | + var tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson"); | |
478 | 478 | localStorage.setItem("currentViewTitle", tittle); |
479 | 479 | |
480 | 480 | //WILL BE USED WHEN MULTI VIEWOPEN FUNCTIONALITY IS IMPELMNETD |
... | ... | @@ -482,7 +482,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
482 | 482 | // angular.forEach(openViews, function (value, key) { |
483 | 483 | |
484 | 484 | // if (value.bodyView == tittle) { |
485 | - // tittle = localStorage.getItem("currentViewTitleFromJson") + counter++; | |
485 | + // tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson") + counter++; | |
486 | 486 | // $rootScope.currentActiveViewTitle = tittle; |
487 | 487 | // localStorage.setItem("currentViewTitle", tittle); |
488 | 488 | // } |
... | ... | @@ -504,7 +504,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
504 | 504 | ajax: { |
505 | 505 | url: 'app/views/da/da-view.html' |
506 | 506 | }, |
507 | - title: localStorage.getItem("currentViewTitle"), | |
507 | + title: $rootScope.getLocalStorageValue("currentViewTitle"), | |
508 | 508 | |
509 | 509 | position: { |
510 | 510 | top: 70, |
... | ... | @@ -547,7 +547,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
547 | 547 | |
548 | 548 | //$rootScope.loadSearchData(); |
549 | 549 | |
550 | - $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); | |
550 | + $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle"); | |
551 | 551 | |
552 | 552 | $scope.layerNumber = 0; |
553 | 553 | |
... | ... | @@ -559,7 +559,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
559 | 559 | |
560 | 560 | //2. load bodyRegion data |
561 | 561 | $rootScope.isLoading = true; |
562 | - $rootScope.voId = localStorage.getItem("currentBodyViewId"); | |
562 | + $rootScope.voId = $rootScope.getLocalStorageValue("currentBodyViewId"); | |
563 | 563 | } |
564 | 564 | $('#daBodyview').css("height", $(window).outerHeight()); |
565 | 565 | |
... | ... | @@ -668,7 +668,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
668 | 668 | console.log(languageArray.length); |
669 | 669 | console.log('loadSearchDataForBodyView'); |
670 | 670 | |
671 | - var currentBodyViewId = localStorage.getItem("currentBodyViewId"); | |
671 | + var currentBodyViewId = $rootScope.getLocalStorageValue("currentBodyViewId"); | |
672 | 672 | |
673 | 673 | for (var i = 0; i <= languageArray.length - 1; i++) { |
674 | 674 | var searchWorker = new Worker('search-wp.js'); |
... | ... | @@ -812,7 +812,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
812 | 812 | $scope.LoadBodyViewNavigatorImage = function () { |
813 | 813 | |
814 | 814 | if ($rootScope.currentBodyViewId == undefined || $rootScope.currentBodyViewId == null) { |
815 | - $rootScope.currentBodyViewId = localStorage.getItem("currentBodyViewId"); | |
815 | + $rootScope.currentBodyViewId = $rootScope.getLocalStorageValue("currentBodyViewId"); | |
816 | 816 | } |
817 | 817 | console.log('insideLoadBodyViewNavigatorImage') |
818 | 818 | var NavigatorManJsonPath = '~/../content/data/json/da/da_dat_orient_image.json'; |
... | ... | @@ -1022,8 +1022,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1022 | 1022 | |
1023 | 1023 | } |
1024 | 1024 | |
1025 | - if (localStorage.getItem("zoomInOutValue") != undefined) | |
1026 | - $rootScope.zoomInOut = localStorage.getItem("zoomInOutValue"); | |
1025 | + if ($rootScope.getLocalStorageValue("zoomInOutValue") != undefined) | |
1026 | + $rootScope.zoomInOut = $rootScope.getLocalStorageValue("zoomInOutValue"); | |
1027 | 1027 | |
1028 | 1028 | if ($scope.bodyRegionCoordinates != null || $scope.bodyRegionCoordinates != undefined) { |
1029 | 1029 | angular.forEach($scope.bodyRegionCoordinates, function (value, key) { |
... | ... | @@ -1115,14 +1115,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1115 | 1115 | $scope.figLaefX; |
1116 | 1116 | $scope.figLaefY; |
1117 | 1117 | var gender; |
1118 | - if (localStorage.getItem("genderId") == 'Female') { | |
1118 | + if ($rootScope.getLocalStorageValue("genderId") == 'Female') { | |
1119 | 1119 | gender = 'F'; |
1120 | 1120 | |
1121 | 1121 | } |
1122 | 1122 | else { |
1123 | 1123 | gender = 'M'; |
1124 | 1124 | } |
1125 | - if (((localStorage.getItem("genderId") == 'Female') && (value._BodyRegionId == 2)) || (value._BodyRegionId == 3)) { | |
1125 | + if ((($rootScope.getLocalStorageValue("genderId") == 'Female') && (value._BodyRegionId == 2)) || (value._BodyRegionId == 3)) { | |
1126 | 1126 | |
1127 | 1127 | if ($scope.bagartDetails != null || $scope.bagartDetails != undefined) { |
1128 | 1128 | var dtlOfBr = new jinqJs() |
... | ... | @@ -1397,7 +1397,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1397 | 1397 | |
1398 | 1398 | |
1399 | 1399 | var selectedGender; |
1400 | - if (localStorage.getItem("genderId") == "Male") { | |
1400 | + if ($rootScope.getLocalStorageValue("genderId") == "Male") { | |
1401 | 1401 | selectedGender = 'M'; |
1402 | 1402 | } |
1403 | 1403 | else { |
... | ... | @@ -7363,11 +7363,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7363 | 7363 | } |
7364 | 7364 | |
7365 | 7365 | |
7366 | - var viewname = localStorage.getItem("currentViewTitle") | |
7366 | + var viewname = $rootScope.getLocalStorageValue("currentViewTitle") | |
7367 | 7367 | var currentBodyViewId = $scope.correspondingBodyViewIds[$rootScope.voId]; |
7368 | 7368 | |
7369 | 7369 | |
7370 | - if ((event.currentTarget.title == 'Male') && (localStorage.getItem("genderId") == 'Female')) { | |
7370 | + if ((event.currentTarget.title == 'Male') && ($rootScope.getLocalStorageValue("genderId") == 'Female')) { | |
7371 | 7371 | |
7372 | 7372 | //1. |
7373 | 7373 | localStorage.setItem("genderId", 'Male'); |
... | ... | @@ -7391,16 +7391,16 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7391 | 7391 | $rootScope.loadSearchData(); |
7392 | 7392 | |
7393 | 7393 | //6. |
7394 | - $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("currentViewTitle").replace('Female', 'Male'); | |
7394 | + $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = $rootScope.getLocalStorageValue("currentViewTitle").replace('Female', 'Male'); | |
7395 | 7395 | |
7396 | - localStorage.setItem("currentViewTitle", localStorage.getItem("currentViewTitle").replace('Female', 'Male')); | |
7396 | + localStorage.setItem("currentViewTitle", $rootScope.getLocalStorageValue("currentViewTitle").replace('Female', 'Male')); | |
7397 | 7397 | |
7398 | 7398 | |
7399 | 7399 | $rootScope.isLoading = true; |
7400 | 7400 | |
7401 | 7401 | } |
7402 | 7402 | |
7403 | - else if ((event.currentTarget.title == 'Female') && (localStorage.getItem("genderId") == 'Male')) { | |
7403 | + else if ((event.currentTarget.title == 'Female') && ($rootScope.getLocalStorageValue("genderId") == 'Male')) { | |
7404 | 7404 | |
7405 | 7405 | //1. |
7406 | 7406 | localStorage.setItem("genderId", 'Female'); |
... | ... | @@ -7423,9 +7423,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7423 | 7423 | $rootScope.loadSearchData(); |
7424 | 7424 | |
7425 | 7425 | //6. |
7426 | - $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("currentViewTitle").replace('Male', 'Female'); | |
7426 | + $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = $rootScope.getLocalStorageValue("currentViewTitle").replace('Male', 'Female'); | |
7427 | 7427 | |
7428 | - localStorage.setItem("currentViewTitle", localStorage.getItem("currentViewTitle").replace('Male', 'Female')); | |
7428 | + localStorage.setItem("currentViewTitle", $rootScope.getLocalStorageValue("currentViewTitle").replace('Male', 'Female')); | |
7429 | 7429 | |
7430 | 7430 | |
7431 | 7431 | $rootScope.isLoading = true; |
... | ... | @@ -7434,7 +7434,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7434 | 7434 | |
7435 | 7435 | $rootScope.openViews.push( |
7436 | 7436 | { |
7437 | - "module": $rootScope.currentActiveModuleTitle, "bodyView": localStorage.getItem("currentViewTitle"), "state": 'max', "BodyViewId": currentBodyViewId, | |
7437 | + "module": $rootScope.currentActiveModuleTitle, "bodyView": $rootScope.getLocalStorageValue("currentViewTitle"), "state": 'max', "BodyViewId": currentBodyViewId, | |
7438 | 7438 | "slug": $rootScope.currentSlug |
7439 | 7439 | } |
7440 | 7440 | ); |
... | ... | @@ -7541,7 +7541,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7541 | 7541 | |
7542 | 7542 | } |
7543 | 7543 | |
7544 | - $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); | |
7544 | + $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle"); | |
7545 | 7545 | }, |
7546 | 7546 | function (error) { |
7547 | 7547 | // handle errors here |
... | ... | @@ -7607,7 +7607,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7607 | 7607 | var selectedViewId = $scope.bodyViews[event.currentTarget.title]; |
7608 | 7608 | $rootScope.viewOrientationId = selectedViewId; |
7609 | 7609 | |
7610 | - if (localStorage.getItem("genderId") == 'Male') { | |
7610 | + if ($rootScope.getLocalStorageValue("genderId") == 'Male') { | |
7611 | 7611 | if ($rootScope.voId != selectedViewId) { |
7612 | 7612 | if (selectedViewId == 5) { |
7613 | 7613 | $rootScope.voId = 9; |
... | ... | @@ -7636,13 +7636,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7636 | 7636 | $rootScope.loadSearchData(); |
7637 | 7637 | |
7638 | 7638 | //5.Change the popup title next to search |
7639 | - $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); | |
7639 | + $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle"); | |
7640 | 7640 | |
7641 | 7641 | }; |
7642 | 7642 | |
7643 | 7643 | |
7644 | 7644 | //set selected view name as the title of jspanel |
7645 | - // $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("genderId") +" "+ event.currentTarget.attributes[1].value; | |
7645 | + // $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = $rootScope.getLocalStorageValue("genderId") +" "+ event.currentTarget.attributes[1].value; | |
7646 | 7646 | |
7647 | 7647 | } |
7648 | 7648 | else { |
... | ... | @@ -7672,21 +7672,21 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7672 | 7672 | $rootScope.loadSearchData(); |
7673 | 7673 | |
7674 | 7674 | //5.Change the popup title next to search |
7675 | - $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); | |
7675 | + $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle"); | |
7676 | 7676 | }; |
7677 | 7677 | |
7678 | 7678 | |
7679 | - // $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("genderId") + " " + $scope.bodyViews[event.currentTarget.attributes[1].value; | |
7679 | + // $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = $rootScope.getLocalStorageValue("genderId") + " " + $scope.bodyViews[event.currentTarget.attributes[1].value; | |
7680 | 7680 | |
7681 | 7681 | } |
7682 | - $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("genderId") + " " + event.currentTarget.title; | |
7683 | - localStorage.setItem("currentViewTitle", localStorage.getItem("genderId") + " " + event.currentTarget.title); | |
7682 | + $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = $rootScope.getLocalStorageValue("genderId") + " " + event.currentTarget.title; | |
7683 | + localStorage.setItem("currentViewTitle", $rootScope.getLocalStorageValue("genderId") + " " + event.currentTarget.title); | |
7684 | 7684 | localStorage.setItem("currentBodyViewId", selectedViewId); |
7685 | 7685 | |
7686 | 7686 | |
7687 | 7687 | $rootScope.openViews.push( |
7688 | 7688 | { |
7689 | - "module": $rootScope.currentActiveModuleTitle, "bodyView": localStorage.getItem("currentViewTitle"), "state": 'max', "BodyViewId": $rootScope.voId, | |
7689 | + "module": $rootScope.currentActiveModuleTitle, "bodyView": $rootScope.getLocalStorageValue("currentViewTitle"), "state": 'max', "BodyViewId": $rootScope.voId, | |
7690 | 7690 | "slug": $rootScope.currentSlug |
7691 | 7691 | } |
7692 | 7692 | ); |
... | ... | @@ -7784,7 +7784,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7784 | 7784 | |
7785 | 7785 | $scope.loadNavigatorForSelectedBodyView(data.reloadDABodyViewId); |
7786 | 7786 | } |
7787 | - // $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); | |
7787 | + // $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle"); | |
7788 | 7788 | |
7789 | 7789 | //$rootScope.isSettingEventAlredayDispachted = false; |
7790 | 7790 | //} |
... | ... | @@ -8315,7 +8315,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8315 | 8315 | |
8316 | 8316 | |
8317 | 8317 | $('#viewName').empty(); |
8318 | - var currentView = localStorage.getItem("currentViewTitle"); | |
8318 | + var currentView = $rootScope.getLocalStorageValue("currentViewTitle"); | |
8319 | 8319 | var viewNmeHtml = '<option>' + currentView + '</option>' |
8320 | 8320 | $('#viewName').append(viewNmeHtml); |
8321 | 8321 | |
... | ... | @@ -8723,7 +8723,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8723 | 8723 | $scope.loadListManger(); |
8724 | 8724 | } |
8725 | 8725 | else { |
8726 | - var bodySystemDataPath = '~/../content/data/json/da/body-views/' + localStorage.getItem("currentBodyViewId") + '/da_dat_body_system_term_' + localStorage.getItem("currentBodyViewId") + '.json'; | |
8726 | + var bodySystemDataPath = '~/../content/data/json/da/body-views/' + $rootScope.getLocalStorageValue("currentBodyViewId") + '/da_dat_body_system_term_' + $rootScope.getLocalStorageValue("currentBodyViewId") + '.json'; | |
8727 | 8727 | DataService.getJson(bodySystemDataPath) |
8728 | 8728 | .then( |
8729 | 8729 | function (result) { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -271,7 +271,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
271 | 271 | console.log(' Error in Term and Condition acceptance status update = ' + error);//.statusText |
272 | 272 | }); |
273 | 273 | } |
274 | - var currentUserDetails = localStorage.getItem('loggedInUserDetails'); | |
274 | + var currentUserDetails = $rootScope.getLocalStorageValue('loggedInUserDetails'); | |
275 | 275 | if (currentUserDetails) { |
276 | 276 | var userInfo = JSON.parse(currentUserDetails); |
277 | 277 | |
... | ... | @@ -307,7 +307,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
307 | 307 | } |
308 | 308 | |
309 | 309 | function getUserDetails() { //Retain logged in user details |
310 | - var currentUserDetails = localStorage.getItem('loggedInUserDetails'); | |
310 | + var currentUserDetails = $rootScope.getLocalStorageValue('loggedInUserDetails'); | |
311 | 311 | if (currentUserDetails) { |
312 | 312 | try { |
313 | 313 | var userInfo = JSON.parse(currentUserDetails); |
... | ... | @@ -3356,7 +3356,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
3356 | 3356 | $rootScope.SettingsTab = 3; |
3357 | 3357 | |
3358 | 3358 | //2. |
3359 | - var curentEthnicity = localStorage.getItem("globalEthnicity"); | |
3359 | + var curentEthnicity = $rootScope.getLocalStorageValue("globalEthnicity"); | |
3360 | 3360 | if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) { |
3361 | 3361 | $rootScope.globalSetting.ethnicity = curentEthnicity; |
3362 | 3362 | } |
... | ... | @@ -3364,7 +3364,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
3364 | 3364 | localStorage.setItem("globalEthnicity", $rootScope.globalSetting.ethnicity); |
3365 | 3365 | } |
3366 | 3366 | |
3367 | - var curentmodesty = localStorage.getItem("globalModesty"); | |
3367 | + var curentmodesty = $rootScope.getLocalStorageValue("globalModesty"); | |
3368 | 3368 | if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) { |
3369 | 3369 | $rootScope.globalSetting.modesty = curentmodesty |
3370 | 3370 | } |
... | ... | @@ -3491,7 +3491,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
3491 | 3491 | $rootScope.globalSetting.ethnicity = setting.ethnicity; |
3492 | 3492 | localStorage.setItem("globalEthnicity", $rootScope.globalSetting.ethnicity); |
3493 | 3493 | |
3494 | - $rootScope.globalSetting.modesty = localStorage.getItem("globalModesty"); | |
3494 | + $rootScope.globalSetting.modesty = $rootScope.getLocalStorageValue("globalModesty"); | |
3495 | 3495 | |
3496 | 3496 | isReloadingViewRequired = true; |
3497 | 3497 | } |
... | ... | @@ -3499,7 +3499,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
3499 | 3499 | $rootScope.globalSetting.modesty = setting.modesty; |
3500 | 3500 | localStorage.setItem("globalModesty", $rootScope.globalSetting.modesty); |
3501 | 3501 | |
3502 | - $rootScope.globalSetting.ethnicity = localStorage.getItem("globalEthnicity"); | |
3502 | + $rootScope.globalSetting.ethnicity = $rootScope.getLocalStorageValue("globalEthnicity"); | |
3503 | 3503 | |
3504 | 3504 | if ($('.modestyImg') != null) { |
3505 | 3505 | if (($rootScope.globalSetting.modesty == 'Y')) { |
... | ... | @@ -3550,7 +3550,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
3550 | 3550 | //Check that what current bodyview is open |
3551 | 3551 | if ($rootScope.openViews.length > 0) { |
3552 | 3552 | var openViewLen = $rootScope.openViews.length; |
3553 | - var currentOpenViewId = localStorage.getItem("currentBodyViewId");//$rootScope.openViews[openViewLen - 1].BodyViewId; | |
3553 | + var currentOpenViewId = $rootScope.getLocalStorageValue("currentBodyViewId");//$rootScope.openViews[openViewLen - 1].BodyViewId; | |
3554 | 3554 | $rootScope.isSettingEventAlredayDispachted = true; |
3555 | 3555 | $rootScope.$broadcast('reloadDABodyViewEvent', { reloadDABodyViewId: currentOpenViewId }, true); |
3556 | 3556 | } |
... | ... | @@ -3563,7 +3563,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
3563 | 3563 | |
3564 | 3564 | |
3565 | 3565 | $rootScope.changeNavigatorModesty = function () { |
3566 | - var currentOpenViewId = localStorage.getItem("currentBodyViewId");//$rootScope.openViews[openViewLen - 1].BodyViewId; | |
3566 | + var currentOpenViewId = $rootScope.getLocalStorageValue("currentBodyViewId");//$rootScope.openViews[openViewLen - 1].BodyViewId; | |
3567 | 3567 | |
3568 | 3568 | $rootScope.$broadcast('changeNavigatorModestyEvent', { bodyViewId: currentOpenViewId }, true); |
3569 | 3569 | |
... | ... | @@ -3587,7 +3587,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
3587 | 3587 | $('#snipImage').attr('src', dataURL); |
3588 | 3588 | |
3589 | 3589 | $('#spnModule').text($rootScope.currentActiveModuleTitle); |
3590 | - $('#spnBodyViewTitle').text(localStorage.getItem('currentViewTitle')); | |
3590 | + $('#spnBodyViewTitle').text($rootScope.getLocalStorageValue('currentViewTitle')); | |
3591 | 3591 | |
3592 | 3592 | PrintDivContentByID('printBox'); // Open Print Window |
3593 | 3593 | } |
... | ... | @@ -3616,7 +3616,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
3616 | 3616 | console.log('jsPanel loaded exist= ' + document.getElementById('jsPanel-1')); // document.getElementsByClassName('ppImagePanel')); |
3617 | 3617 | |
3618 | 3618 | var curModule = $rootScope.currentActiveModuleTitle; |
3619 | - var curPosture = localStorage.getItem('currentViewTitle'); | |
3619 | + var curPosture = $rootScope.getLocalStorageValue('currentViewTitle'); | |
3620 | 3620 | |
3621 | 3621 | if (document.getElementById('jsPanel-1')) { //document.getElementsByClassName('ppImagePanel')) { |
3622 | 3622 | if (dataURL == "" || dataURL == undefined) |
... | ... | @@ -3675,7 +3675,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
3675 | 3675 | ajax: { |
3676 | 3676 | url: 'app/views/home/printPreview.html' |
3677 | 3677 | }, |
3678 | - title: localStorage.getItem("currentViewTitle"), | |
3678 | + title: $rootScope.getLocalStorageValue("currentViewTitle"), | |
3679 | 3679 | position: { |
3680 | 3680 | top: 70, |
3681 | 3681 | left: 1, |
... | ... | @@ -3685,7 +3685,21 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
3685 | 3685 | //size: { width: $(window).outerWidth() - 10, height: $(window).outerHeight() - 110 }, |
3686 | 3686 | }); |
3687 | 3687 | } |
3688 | + $rootScope.getLocalStorageValue = function (localStorageParam) { | |
3689 | + | |
3690 | + if ((localStorage.getItem('loggedInUserDetails') == null) && ($rootScope.isVisibleLogin == false)) | |
3691 | + { | |
3688 | 3692 | |
3693 | + $rootScope.LogoutUser(); | |
3694 | + | |
3695 | + | |
3696 | + } | |
3697 | + else { | |
3698 | + return localStorage.getItem(localStorageParam); | |
3699 | + } | |
3700 | + | |
3701 | + | |
3702 | + } | |
3689 | 3703 | // $(<parent>).on('<event>', '<child>', callback); |
3690 | 3704 | $(document).on('change', 'input[name=inlineRadioOptions]', function () { |
3691 | 3705 | if ($(this).attr("value") == "Portrait") { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... | ... | @@ -87,19 +87,19 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
87 | 87 | $("#viewList").append("<div class='col-xs-12 text-center' style='padding-top:15px;padding-bottom:15px;' id='demoView'><div class='col-xs-12' style='padding:15px;background-color:#fff;'><div class='col-xs-2' style='border:1px solid #000;padding:5px;color:#000;font-size:12px;'><div class='thumbnail' style='margin-bottom:10px;'><img style='width:auto;height:95px!important;' src=" + $rootScope.listArray[0].imageName + "></div><div class='col-xs-12' id='demoText' style='padding:0;'>" + $rootScope.listArray[0].text + "</div></div></div><a style='position:absolute;right:30px;bottom:34px;' onclick='openCurrentView(event)' href='javascript:void(0)' class='pull-right btn btn-primary'>Open</a></div>"); |
88 | 88 | var moduleItemDataToBeSavedID |
89 | 89 | $("#list-view table tbody tr").removeClass("active"); |
90 | - var moduleItemDataToBeSavedID = localStorage.getItem("listViewSelectedID"); | |
90 | + var moduleItemDataToBeSavedID = $rootScope.getLocalStorageValue("listViewSelectedID"); | |
91 | 91 | $("#list-view table tbody #" + moduleItemDataToBeSavedID).addClass("active"); |
92 | 92 | $scope.isListViewButtonClicked = true; |
93 | - var curAAListViewScroll = localStorage.getItem("AAListViewScroll"); | |
93 | + var curAAListViewScroll = $rootScope.getLocalStorageValue("AAListViewScroll"); | |
94 | 94 | |
95 | 95 | if (typeof (curAAListViewScroll) !== "undefined" && curAAListViewScroll !== null && curAAListViewScroll !== '') { |
96 | 96 | if (typeof InstallTrigger !== 'undefined') { |
97 | 97 | |
98 | - $('#list-view table tbody').animate({ scrollTop: localStorage.getItem("AAListViewScroll") }); | |
98 | + $('#list-view table tbody').animate({ scrollTop: $rootScope.getLocalStorageValue("AAListViewScroll") }); | |
99 | 99 | } |
100 | 100 | else { |
101 | 101 | |
102 | - $('#list-view table tbody').scrollTop(localStorage.getItem("AAListViewScroll")); | |
102 | + $('#list-view table tbody').scrollTop($rootScope.getLocalStorageValue("AAListViewScroll")); | |
103 | 103 | } |
104 | 104 | |
105 | 105 | } |
... | ... | @@ -128,8 +128,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
128 | 128 | |
129 | 129 | $scope.moduleLandingData = result; |
130 | 130 | // setTimeout(function () { $('#' + $rootScope.highlightid).find('.thumbnail').addClass('hightlightstate'); }, 100); |
131 | - if (localStorage.getItem('AAGridViewHighlightThumbnail') !== null) { | |
132 | - setTimeout(function () { $('#' + localStorage.getItem("AAGridViewHighlightThumbnail")).find('.thumbnail').addClass('HightLightThumbnail'); }, 100); | |
131 | + if ($rootScope.getLocalStorageValue('AAGridViewHighlightThumbnail') !== null) { | |
132 | + setTimeout(function () { $('#' + $rootScope.getLocalStorageValue("AAGridViewHighlightThumbnail")).find('.thumbnail').addClass('HightLightThumbnail'); }, 100); | |
133 | 133 | } |
134 | 134 | //console.log(JSON.stringify(result, null, 4)); |
135 | 135 | }, |
... | ... | @@ -138,8 +138,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
138 | 138 | console.log(' error: ' + error.statusText); |
139 | 139 | } |
140 | 140 | ) |
141 | - if (localStorage.getItem('AAGridViewScroll') !== null) { | |
142 | - $('html, body').animate({ scrollTop: localStorage.getItem('AAGridViewScroll') }, 'slow'); | |
141 | + if ($rootScope.getLocalStorageValue('AAGridViewScroll') !== null) { | |
142 | + $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('AAGridViewScroll') }, 'slow'); | |
143 | 143 | } |
144 | 144 | } |
145 | 145 | |
... | ... | @@ -245,7 +245,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
245 | 245 | ajax: { |
246 | 246 | url: jsContentURL |
247 | 247 | }, |
248 | - title: localStorage.getItem("currentViewTitle"), | |
248 | + title: $rootScope.getLocalStorageValue("currentViewTitle"), | |
249 | 249 | |
250 | 250 | position: { |
251 | 251 | top: 70, |
... | ... | @@ -282,7 +282,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
282 | 282 | |
283 | 283 | $('.canvasDivClass').css("height", $rootScope.canvasDivHeight); |
284 | 284 | |
285 | - $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); | |
285 | + $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle"); | |
286 | 286 | $("#modItemImage").attr('src', $rootScope.OpenItemImagePath); |
287 | 287 | |
288 | 288 | |
... | ... | @@ -346,7 +346,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
346 | 346 | $("#canvasDiv").scrollTop($rootScope.CanvasDivTopPosition); |
347 | 347 | }); |
348 | 348 | $(document).on("click", "#ImagePanel .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { |
349 | - $scope.setActiveTab(parseInt(localStorage.getItem("activeTab"))); | |
349 | + $scope.setActiveTab(parseInt($rootScope.getLocalStorageValue("activeTab"))); | |
350 | 350 | $(".tools").css("z-index", "15000"); |
351 | 351 | $rootScope.selectedBodySystemName = 'All'; |
352 | 352 | $rootScope.selectedBodySystemId = 0; | ... | ... |