diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js
index 8881992..5cec29a 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js
@@ -97,8 +97,8 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
}
$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
- //alert(localStorage.getItem("currentBodyViewId"));
- $scope.voId3D = localStorage.getItem("currentBodyViewId");
+ //alert($rootScope.getLocalStorageValue("currentBodyViewId"));
+ $scope.voId3D = $rootScope.getLocalStorageValue("currentBodyViewId");
//alert($scope.voId3D);
@@ -113,13 +113,13 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
.select();
}
var counter = 1;
- var tittle = localStorage.getItem("currentViewTitleFromJson");
+ var tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson");
if (openViews != null && openViews.length > 0) {
angular.forEach(openViews, function (value, key) {
if (value.body - views == tittle) {
- tittle = localStorage.getItem("currentViewTitleFromJson") + counter++;
+ tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson") + counter++;
$rootScope.currentActiveViewTitle = tittle;
localStorage.setItem("currentViewTitle", tittle);
}
@@ -131,7 +131,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
}
- // alert(localStorage.getItem("currentViewTitle"));
+ // alert($rootScope.getLocalStorageValue("currentViewTitle"));
var promise = DataService.getJson('~/../content/data/json/3da/3da_dat_contentlist.json')
promise.then(
@@ -159,7 +159,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
content: '
' +
'' +
'
',
- title: localStorage.getItem("currentViewTitle"),
+ title: $rootScope.getLocalStorageValue("currentViewTitle"),
position: {
top: 70,
left: 1,
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js
index 35db7c9..0994ae6 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js
@@ -48,7 +48,7 @@ function ($scope, $rootScope, pages, log, $location) {
//set the local storage
- var curtab = localStorage.getItem("currentAODTabView");
+ var curtab = $rootScope.getLocalStorageValue("currentAODTabView");
if (curtab == 2) {
$scope.setActiveTab(2);
}
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
index 5ec1cdf..478cbc3 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
@@ -56,13 +56,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
//set the local storage
- var curtab = localStorage.getItem("currentCATabView");
+ var curtab = $rootScope.getLocalStorageValue("currentCATabView");
//if (curtab == 2) {
// $scope.setActiveTab(2);
//}
if (curtab == 2) {
$scope.setActiveTab(2);
- var curSelectedRowId = localStorage.getItem("CASelectedRowId");
+ var curSelectedRowId = $rootScope.getLocalStorageValue("CASelectedRowId");
if (typeof (curSelectedRowId) !== "undefined" && curSelectedRowId !== null && curSelectedRowId !== '') {
$scope.reRunSearchOnLoad();
$scope.idSelected = curSelectedRowId;
@@ -76,7 +76,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
else {
$scope.setActiveTab(1);
$scope.reRunSearchOnLoad();
- $('html, body').animate({ scrollTop: localStorage.getItem('CAGridViewScroll') }, 'slow');
+ $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('CAGridViewScroll') }, 'slow');
}
@@ -84,7 +84,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
});
$scope.reRunSearchOnLoad = function () {
- var curBodyRegion = localStorage.getItem("CACurBodyRegion");
+ var curBodyRegion = $rootScope.getLocalStorageValue("CACurBodyRegion");
if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !== '') {
$scope.query.selectedbodyregion = curBodyRegion;
}
@@ -92,7 +92,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
$scope.query.selectedbodyregion = "";
}
- var curBodySystem = localStorage.getItem("CACurBodySystem");
+ var curBodySystem = $rootScope.getLocalStorageValue("CACurBodySystem");
if (typeof (curBodySystem) !== "undefined" && curBodySystem !== null && curBodySystem !== '') {
$scope.query.selectedbodysystem = curBodySystem;
}
@@ -100,7 +100,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
$scope.query.selectedbodysystem = "";
}
- var curSpeciality = localStorage.getItem("CACurSpeciality");
+ var curSpeciality = $rootScope.getLocalStorageValue("CACurSpeciality");
if (typeof (curSpeciality) !== "undefined" && curSpeciality !== null && curSpeciality !== '') {
$scope.query.selectedspecialty = curSpeciality;
}
@@ -178,7 +178,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
});
});
- $('#' + localStorage.getItem("currentBodyViewId")).find('.thumbnail').addClass('HightLightThumbnail');
+ $('#' + $rootScope.getLocalStorageValue("currentBodyViewId")).find('.thumbnail').addClass('HightLightThumbnail');
},
function (error) {
// handle errors here
@@ -263,7 +263,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
$scope.searchCAListViewData.pop();
}
- if (localStorage.getItem("currentCATabView") == 2) {
+ if ($rootScope.getLocalStorageValue("currentCATabView") == 2) {
localStorage.setItem("CASelectedRowId", "");
$scope.hiderow = false;
}
@@ -479,7 +479,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
}
$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
- $scope.voId = localStorage.getItem("currentBodyViewId");
+ $scope.voId = $rootScope.getLocalStorageValue("currentBodyViewId");
// alert($scope.voId);
@@ -494,13 +494,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
.select();
}
var counter = 1;
- var tittle = localStorage.getItem("currentViewTitleFromJson");
+ var tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson");
if (openViews != null && openViews.length > 0) {
angular.forEach(openViews, function (value, key) {
if (value.body - views == tittle) {
- tittle = localStorage.getItem("currentViewTitleFromJson") + counter++;
+ tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson") + counter++;
$rootScope.currentActiveViewTitle = tittle;
localStorage.setItem("currentViewTitle", tittle);
}
@@ -512,7 +512,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
}
- //alert(localStorage.getItem("currentViewTitle"));
+ //alert($rootScope.getLocalStorageValue("currentViewTitle"));
var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist_mp4link.json')
promise.then(
@@ -569,7 +569,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
//ajax: {
// url: 'app/views/ca/ca-view-detail.html'
//},
- title: localStorage.getItem("currentViewTitle"),
+ title: $rootScope.getLocalStorageValue("currentViewTitle"),
position: {
top: 70,
left: 1,
@@ -653,16 +653,16 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
//Set the scroll position of the tablebody to show selected row.
- var curCAListViewScroll = localStorage.getItem("CAListViewScroll");
+ var curCAListViewScroll = $rootScope.getLocalStorageValue("CAListViewScroll");
if (typeof (curCAListViewScroll) !== "undefined" && curCAListViewScroll !== null && curCAListViewScroll !== '') {
if (typeof InstallTrigger !== 'undefined') {
- $('#ListViewDiv').animate({ scrollTop: localStorage.getItem("CAListViewScroll") });
+ $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue("CAListViewScroll") });
}
else
{
- $('#ListViewDiv').scrollTop(localStorage.getItem("CAListViewScroll"));
+ $('#ListViewDiv').scrollTop($rootScope.getLocalStorageValue("CAListViewScroll"));
}
}
//else {
@@ -678,7 +678,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
};
$scope.hideListViewDiv = function () {
- if (localStorage.getItem("currentCATabView") == 2) {
+ if ($rootScope.getLocalStorageValue("currentCATabView") == 2) {
localStorage.setItem("CASelectedRowId", "");
if ($('.selected').hasClass("selected")) { $('.selected').removeClass("selected"); }
$scope.hiderow = false;
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
index b8f2bcc..deea0ea 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
@@ -63,10 +63,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
//set the local storage
- var curtab = localStorage.getItem("currentCITabView");
+ var curtab = $rootScope.getLocalStorageValue("currentCITabView");
if (curtab == 2) {
$scope.setActiveTab(2);
- var curSelectedRowId = localStorage.getItem("CISelectedRowId");
+ var curSelectedRowId = $rootScope.getLocalStorageValue("CISelectedRowId");
if (typeof (curSelectedRowId) !== "undefined" && curSelectedRowId !== null && curSelectedRowId !== '') {
$scope.reRunSearchOnLoad();
$scope.idSelected = curSelectedRowId;
@@ -80,8 +80,8 @@ 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') });
+ if ($rootScope.getLocalStorageValue('CIGridViewScroll') !== null) {
+ $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('CIGridViewScroll') });
}
}
@@ -90,7 +90,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
$scope.reRunSearchOnLoad = function () {
- var curBodyRegion = localStorage.getItem("CICurBodyRegion");
+ var curBodyRegion = $rootScope.getLocalStorageValue("CICurBodyRegion");
if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !== '') {
$scope.query.selectedbodyregion = curBodyRegion;
}
@@ -98,7 +98,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
$scope.query.selectedbodyregion = "";
}
- var curBodySystem = localStorage.getItem("CICurBodySystem");
+ var curBodySystem = $rootScope.getLocalStorageValue("CICurBodySystem");
if (typeof (curBodySystem) !== "undefined" && curBodySystem !== null && curBodySystem !== '') {
$scope.query.selectedbodysystem = curBodySystem;
}
@@ -106,7 +106,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
$scope.query.selectedbodysystem = "";
}
- var curOrientation = localStorage.getItem("CICurOrientation");
+ var curOrientation = $rootScope.getLocalStorageValue("CICurOrientation");
if (typeof (curOrientation) !== "undefined" && curOrientation !== null && curOrientation !== '') {
$scope.query.selectedorientation = curOrientation;
}
@@ -114,7 +114,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
$scope.query.selectedorientation = "";
}
- var curImageType = localStorage.getItem("CICurImageType");
+ var curImageType = $rootScope.getLocalStorageValue("CICurImageType");
if (typeof (curImageType) !== "undefined" && curImageType !== null && curImageType !== '') {
$scope.query.selectedimagetype = curImageType;
}
@@ -122,7 +122,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
$scope.query.selectedimagetype = "";
}
- var curSpeciality = localStorage.getItem("CICurSpeciality");
+ var curSpeciality = $rootScope.getLocalStorageValue("CICurSpeciality");
if (typeof (curSpeciality) !== "undefined" && curSpeciality !== null && curSpeciality !== '') {
$scope.query.selectedspecialty = curSpeciality;
}
@@ -201,7 +201,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
// });
//});
- $timeout(function () { $('#' + localStorage.getItem("currentBodyViewId")).find('.thumbnail').addClass('HightLightThumbnail'); }, 100);
+ $timeout(function () { $('#' + $rootScope.getLocalStorageValue("currentBodyViewId")).find('.thumbnail').addClass('HightLightThumbnail'); }, 100);
$timeout(function () { $('#ciSpinner').css('visibility', 'hidden'); }, 300);
@@ -542,7 +542,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
- $scope.voId = localStorage.getItem("currentBodyViewId");
+ $scope.voId = $rootScope.getLocalStorageValue("currentBodyViewId");
// alert($scope.voId);
@@ -557,13 +557,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
.select();
}
var counter = 1;
- var tittle = localStorage.getItem("currentViewTitleFromJson");
+ var tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson");
if (openViews != null && openViews.length > 0) {
angular.forEach(openViews, function (value, key) {
if (value.body - views == tittle) {
- tittle = localStorage.getItem("currentViewTitleFromJson") + counter++;
+ tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson") + counter++;
$rootScope.currentActiveViewTitle = tittle;
localStorage.setItem("currentViewTitle", tittle);
}
@@ -575,7 +575,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
}
- //alert(localStorage.getItem("currentViewTitle"));
+ //alert($rootScope.getLocalStorageValue("currentViewTitle"));
var promise = DataService.getJson('~/../content/data/json/ci/ci_dat_contentlist.json')
promise.then(
@@ -619,7 +619,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
//ajax: {
// url: 'app/views/ci/ci-view-detail.html'
//},
- title: localStorage.getItem("currentViewTitle"),
+ title: $rootScope.getLocalStorageValue("currentViewTitle"),
position: {
top: 70,
left: 1,
@@ -704,17 +704,17 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
//Set the scroll position of the tablebody to show selected row.
- var curCIListViewScroll = localStorage.getItem("CIListViewScroll");
+ var curCIListViewScroll = $rootScope.getLocalStorageValue("CIListViewScroll");
if (typeof (curCIListViewScroll) !== "undefined" && curCIListViewScroll !== null && curCIListViewScroll !== '') {
if (typeof InstallTrigger !== 'undefined')
{
- $('#ListViewDiv').animate({ scrollTop: localStorage.getItem("CIListViewScroll") });
+ $('#ListViewDiv').animate({ scrollTop: $rootScope.getLocalStorageValue("CIListViewScroll") });
}
else
{
- $('#ListViewDiv').scrollTop(localStorage.getItem("CIListViewScroll"));
+ $('#ListViewDiv').scrollTop($rootScope.getLocalStorageValue("CIListViewScroll"));
}
}
@@ -731,7 +731,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
};
$scope.hideListViewDiv = function () {
- if (localStorage.getItem("currentCITabView") == 2) {
+ if ($rootScope.getLocalStorageValue("currentCITabView") == 2) {
localStorage.setItem("CISelectedRowId", "");
if ($('.selected').hasClass("selected")) { $('.selected').removeClass("selected"); }
$scope.hiderow = false;
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index bede30e..2496c6a 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -160,7 +160,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.switchGender = function () {
- var retrievedObject = localStorage.getItem('currentViewTitle');
+ var retrievedObject = $rootScope.getLocalStorageValue('currentViewTitle');
if (retrievedObject == "Male Anterior") {
$scope.male = "active";
@@ -184,15 +184,15 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$("#bodyViewList").empty();
//for default load
if ($event == null || $event == undefined) {
- //if ((localStorage.getItem("genderId") != "")||(localStorage.getItem("genderId")!="null")) {
- // $scope.genderId = localStorage.getItem("genderId");
+ //if (($rootScope.getLocalStorageValue("genderId") != "")||($rootScope.getLocalStorageValue("genderId")!="null")) {
+ // $scope.genderId = $rootScope.getLocalStorageValue("genderId");
//}
- var selectedGender = localStorage.getItem("genderId");
+ var selectedGender = $rootScope.getLocalStorageValue("genderId");
if ((selectedGender == null)) {
$scope.genderId = "Male";
}
else
- $scope.genderId = localStorage.getItem("genderId");
+ $scope.genderId = $rootScope.getLocalStorageValue("genderId");
}
else {
@@ -201,7 +201,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
localStorage.setItem("genderId", $scope.genderId);
- var selectedGender = localStorage.getItem("genderId");
+ var selectedGender = $rootScope.getLocalStorageValue("genderId");
if (selectedGender != null) {
if (selectedGender == "Male") {
@@ -226,7 +226,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var userEthnicity;
var userModestysettings;
- var curentEthnicity = localStorage.getItem("globalEthnicity");
+ var curentEthnicity = $rootScope.getLocalStorageValue("globalEthnicity");
if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) {
userEthnicity = curentEthnicity;
}
@@ -234,7 +234,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
userEthnicity = $rootScope.globalSetting.ethnicity;
}
- var curentmodesty = localStorage.getItem("globalModesty");
+ var curentmodesty = $rootScope.getLocalStorageValue("globalModesty");
if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) {
userModestysettings = curentmodesty;
}
@@ -437,19 +437,19 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//0. we will initially append container to load body
//check if localstorage has any settings
- var curentEthnicity = localStorage.getItem("globalEthnicity");
+ var curentEthnicity = $rootScope.getLocalStorageValue("globalEthnicity");
if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) {
$rootScope.globalSetting.ethnicity = curentEthnicity;
}
- var curentmodesty = localStorage.getItem("globalModesty");
+ var curentmodesty = $rootScope.getLocalStorageValue("globalModesty");
if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) {
$rootScope.globalSetting.modesty = curentmodesty
}
//0.1
- var currentBodyViewId = localStorage.getItem("currentBodyViewId");
+ var currentBodyViewId = $rootScope.getLocalStorageValue("currentBodyViewId");
if (currentBodyViewId == null || currentBodyViewId == undefined) {
// document.location = '/';
document.location = '/';
@@ -474,7 +474,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
// 0.2 getting corresponding body view title
//var counter = 1;
- var tittle = localStorage.getItem("currentViewTitleFromJson");
+ var tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson");
localStorage.setItem("currentViewTitle", tittle);
//WILL BE USED WHEN MULTI VIEWOPEN FUNCTIONALITY IS IMPELMNETD
@@ -482,7 +482,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
// angular.forEach(openViews, function (value, key) {
// if (value.bodyView == tittle) {
- // tittle = localStorage.getItem("currentViewTitleFromJson") + counter++;
+ // tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson") + counter++;
// $rootScope.currentActiveViewTitle = tittle;
// localStorage.setItem("currentViewTitle", tittle);
// }
@@ -504,7 +504,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
ajax: {
url: 'app/views/da/da-view.html'
},
- title: localStorage.getItem("currentViewTitle"),
+ title: $rootScope.getLocalStorageValue("currentViewTitle"),
position: {
top: 70,
@@ -547,7 +547,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//$rootScope.loadSearchData();
- $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
+ $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle");
$scope.layerNumber = 0;
@@ -559,7 +559,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//2. load bodyRegion data
$rootScope.isLoading = true;
- $rootScope.voId = localStorage.getItem("currentBodyViewId");
+ $rootScope.voId = $rootScope.getLocalStorageValue("currentBodyViewId");
}
$('#daBodyview').css("height", $(window).outerHeight());
@@ -668,7 +668,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
console.log(languageArray.length);
console.log('loadSearchDataForBodyView');
- var currentBodyViewId = localStorage.getItem("currentBodyViewId");
+ var currentBodyViewId = $rootScope.getLocalStorageValue("currentBodyViewId");
for (var i = 0; i <= languageArray.length - 1; i++) {
var searchWorker = new Worker('search-wp.js');
@@ -812,7 +812,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.LoadBodyViewNavigatorImage = function () {
if ($rootScope.currentBodyViewId == undefined || $rootScope.currentBodyViewId == null) {
- $rootScope.currentBodyViewId = localStorage.getItem("currentBodyViewId");
+ $rootScope.currentBodyViewId = $rootScope.getLocalStorageValue("currentBodyViewId");
}
console.log('insideLoadBodyViewNavigatorImage')
var NavigatorManJsonPath = '~/../content/data/json/da/da_dat_orient_image.json';
@@ -1022,8 +1022,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
- if (localStorage.getItem("zoomInOutValue") != undefined)
- $rootScope.zoomInOut = localStorage.getItem("zoomInOutValue");
+ if ($rootScope.getLocalStorageValue("zoomInOutValue") != undefined)
+ $rootScope.zoomInOut = $rootScope.getLocalStorageValue("zoomInOutValue");
if ($scope.bodyRegionCoordinates != null || $scope.bodyRegionCoordinates != undefined) {
angular.forEach($scope.bodyRegionCoordinates, function (value, key) {
@@ -1115,14 +1115,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.figLaefX;
$scope.figLaefY;
var gender;
- if (localStorage.getItem("genderId") == 'Female') {
+ if ($rootScope.getLocalStorageValue("genderId") == 'Female') {
gender = 'F';
}
else {
gender = 'M';
}
- if (((localStorage.getItem("genderId") == 'Female') && (value._BodyRegionId == 2)) || (value._BodyRegionId == 3)) {
+ if ((($rootScope.getLocalStorageValue("genderId") == 'Female') && (value._BodyRegionId == 2)) || (value._BodyRegionId == 3)) {
if ($scope.bagartDetails != null || $scope.bagartDetails != undefined) {
var dtlOfBr = new jinqJs()
@@ -1397,7 +1397,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var selectedGender;
- if (localStorage.getItem("genderId") == "Male") {
+ if ($rootScope.getLocalStorageValue("genderId") == "Male") {
selectedGender = 'M';
}
else {
@@ -7363,11 +7363,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
- var viewname = localStorage.getItem("currentViewTitle")
+ var viewname = $rootScope.getLocalStorageValue("currentViewTitle")
var currentBodyViewId = $scope.correspondingBodyViewIds[$rootScope.voId];
- if ((event.currentTarget.title == 'Male') && (localStorage.getItem("genderId") == 'Female')) {
+ if ((event.currentTarget.title == 'Male') && ($rootScope.getLocalStorageValue("genderId") == 'Female')) {
//1.
localStorage.setItem("genderId", 'Male');
@@ -7391,16 +7391,16 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$rootScope.loadSearchData();
//6.
- $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("currentViewTitle").replace('Female', 'Male');
+ $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = $rootScope.getLocalStorageValue("currentViewTitle").replace('Female', 'Male');
- localStorage.setItem("currentViewTitle", localStorage.getItem("currentViewTitle").replace('Female', 'Male'));
+ localStorage.setItem("currentViewTitle", $rootScope.getLocalStorageValue("currentViewTitle").replace('Female', 'Male'));
$rootScope.isLoading = true;
}
- else if ((event.currentTarget.title == 'Female') && (localStorage.getItem("genderId") == 'Male')) {
+ else if ((event.currentTarget.title == 'Female') && ($rootScope.getLocalStorageValue("genderId") == 'Male')) {
//1.
localStorage.setItem("genderId", 'Female');
@@ -7423,9 +7423,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$rootScope.loadSearchData();
//6.
- $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("currentViewTitle").replace('Male', 'Female');
+ $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = $rootScope.getLocalStorageValue("currentViewTitle").replace('Male', 'Female');
- localStorage.setItem("currentViewTitle", localStorage.getItem("currentViewTitle").replace('Male', 'Female'));
+ localStorage.setItem("currentViewTitle", $rootScope.getLocalStorageValue("currentViewTitle").replace('Male', 'Female'));
$rootScope.isLoading = true;
@@ -7434,7 +7434,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$rootScope.openViews.push(
{
- "module": $rootScope.currentActiveModuleTitle, "bodyView": localStorage.getItem("currentViewTitle"), "state": 'max', "BodyViewId": currentBodyViewId,
+ "module": $rootScope.currentActiveModuleTitle, "bodyView": $rootScope.getLocalStorageValue("currentViewTitle"), "state": 'max', "BodyViewId": currentBodyViewId,
"slug": $rootScope.currentSlug
}
);
@@ -7541,7 +7541,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
- $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
+ $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle");
},
function (error) {
// handle errors here
@@ -7607,7 +7607,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var selectedViewId = $scope.bodyViews[event.currentTarget.title];
$rootScope.viewOrientationId = selectedViewId;
- if (localStorage.getItem("genderId") == 'Male') {
+ if ($rootScope.getLocalStorageValue("genderId") == 'Male') {
if ($rootScope.voId != selectedViewId) {
if (selectedViewId == 5) {
$rootScope.voId = 9;
@@ -7636,13 +7636,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$rootScope.loadSearchData();
//5.Change the popup title next to search
- $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
+ $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle");
};
//set selected view name as the title of jspanel
- // $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("genderId") +" "+ event.currentTarget.attributes[1].value;
+ // $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = $rootScope.getLocalStorageValue("genderId") +" "+ event.currentTarget.attributes[1].value;
}
else {
@@ -7672,21 +7672,21 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$rootScope.loadSearchData();
//5.Change the popup title next to search
- $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
+ $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle");
};
- // $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("genderId") + " " + $scope.bodyViews[event.currentTarget.attributes[1].value;
+ // $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = $rootScope.getLocalStorageValue("genderId") + " " + $scope.bodyViews[event.currentTarget.attributes[1].value;
}
- $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("genderId") + " " + event.currentTarget.title;
- localStorage.setItem("currentViewTitle", localStorage.getItem("genderId") + " " + event.currentTarget.title);
+ $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = $rootScope.getLocalStorageValue("genderId") + " " + event.currentTarget.title;
+ localStorage.setItem("currentViewTitle", $rootScope.getLocalStorageValue("genderId") + " " + event.currentTarget.title);
localStorage.setItem("currentBodyViewId", selectedViewId);
$rootScope.openViews.push(
{
- "module": $rootScope.currentActiveModuleTitle, "bodyView": localStorage.getItem("currentViewTitle"), "state": 'max', "BodyViewId": $rootScope.voId,
+ "module": $rootScope.currentActiveModuleTitle, "bodyView": $rootScope.getLocalStorageValue("currentViewTitle"), "state": 'max', "BodyViewId": $rootScope.voId,
"slug": $rootScope.currentSlug
}
);
@@ -7784,7 +7784,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.loadNavigatorForSelectedBodyView(data.reloadDABodyViewId);
}
- // $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
+ // $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle");
//$rootScope.isSettingEventAlredayDispachted = false;
//}
@@ -8315,7 +8315,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$('#viewName').empty();
- var currentView = localStorage.getItem("currentViewTitle");
+ var currentView = $rootScope.getLocalStorageValue("currentViewTitle");
var viewNmeHtml = ''
$('#viewName').append(viewNmeHtml);
@@ -8723,7 +8723,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.loadListManger();
}
else {
- var bodySystemDataPath = '~/../content/data/json/da/body-views/' + localStorage.getItem("currentBodyViewId") + '/da_dat_body_system_term_' + localStorage.getItem("currentBodyViewId") + '.json';
+ var bodySystemDataPath = '~/../content/data/json/da/body-views/' + $rootScope.getLocalStorageValue("currentBodyViewId") + '/da_dat_body_system_term_' + $rootScope.getLocalStorageValue("currentBodyViewId") + '.json';
DataService.getJson(bodySystemDataPath)
.then(
function (result) {
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
index 25ecc27..73433f2 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -271,7 +271,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
console.log(' Error in Term and Condition acceptance status update = ' + error);//.statusText
});
}
- var currentUserDetails = localStorage.getItem('loggedInUserDetails');
+ var currentUserDetails = $rootScope.getLocalStorageValue('loggedInUserDetails');
if (currentUserDetails) {
var userInfo = JSON.parse(currentUserDetails);
@@ -307,7 +307,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
}
function getUserDetails() { //Retain logged in user details
- var currentUserDetails = localStorage.getItem('loggedInUserDetails');
+ var currentUserDetails = $rootScope.getLocalStorageValue('loggedInUserDetails');
if (currentUserDetails) {
try {
var userInfo = JSON.parse(currentUserDetails);
@@ -3356,7 +3356,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$rootScope.SettingsTab = 3;
//2.
- var curentEthnicity = localStorage.getItem("globalEthnicity");
+ var curentEthnicity = $rootScope.getLocalStorageValue("globalEthnicity");
if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) {
$rootScope.globalSetting.ethnicity = curentEthnicity;
}
@@ -3364,7 +3364,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
localStorage.setItem("globalEthnicity", $rootScope.globalSetting.ethnicity);
}
- var curentmodesty = localStorage.getItem("globalModesty");
+ var curentmodesty = $rootScope.getLocalStorageValue("globalModesty");
if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) {
$rootScope.globalSetting.modesty = curentmodesty
}
@@ -3491,7 +3491,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$rootScope.globalSetting.ethnicity = setting.ethnicity;
localStorage.setItem("globalEthnicity", $rootScope.globalSetting.ethnicity);
- $rootScope.globalSetting.modesty = localStorage.getItem("globalModesty");
+ $rootScope.globalSetting.modesty = $rootScope.getLocalStorageValue("globalModesty");
isReloadingViewRequired = true;
}
@@ -3499,7 +3499,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$rootScope.globalSetting.modesty = setting.modesty;
localStorage.setItem("globalModesty", $rootScope.globalSetting.modesty);
- $rootScope.globalSetting.ethnicity = localStorage.getItem("globalEthnicity");
+ $rootScope.globalSetting.ethnicity = $rootScope.getLocalStorageValue("globalEthnicity");
if ($('.modestyImg') != null) {
if (($rootScope.globalSetting.modesty == 'Y')) {
@@ -3550,7 +3550,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
//Check that what current bodyview is open
if ($rootScope.openViews.length > 0) {
var openViewLen = $rootScope.openViews.length;
- var currentOpenViewId = localStorage.getItem("currentBodyViewId");//$rootScope.openViews[openViewLen - 1].BodyViewId;
+ var currentOpenViewId = $rootScope.getLocalStorageValue("currentBodyViewId");//$rootScope.openViews[openViewLen - 1].BodyViewId;
$rootScope.isSettingEventAlredayDispachted = true;
$rootScope.$broadcast('reloadDABodyViewEvent', { reloadDABodyViewId: currentOpenViewId }, true);
}
@@ -3563,7 +3563,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$rootScope.changeNavigatorModesty = function () {
- var currentOpenViewId = localStorage.getItem("currentBodyViewId");//$rootScope.openViews[openViewLen - 1].BodyViewId;
+ var currentOpenViewId = $rootScope.getLocalStorageValue("currentBodyViewId");//$rootScope.openViews[openViewLen - 1].BodyViewId;
$rootScope.$broadcast('changeNavigatorModestyEvent', { bodyViewId: currentOpenViewId }, true);
@@ -3587,7 +3587,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$('#snipImage').attr('src', dataURL);
$('#spnModule').text($rootScope.currentActiveModuleTitle);
- $('#spnBodyViewTitle').text(localStorage.getItem('currentViewTitle'));
+ $('#spnBodyViewTitle').text($rootScope.getLocalStorageValue('currentViewTitle'));
PrintDivContentByID('printBox'); // Open Print Window
}
@@ -3616,7 +3616,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
console.log('jsPanel loaded exist= ' + document.getElementById('jsPanel-1')); // document.getElementsByClassName('ppImagePanel'));
var curModule = $rootScope.currentActiveModuleTitle;
- var curPosture = localStorage.getItem('currentViewTitle');
+ var curPosture = $rootScope.getLocalStorageValue('currentViewTitle');
if (document.getElementById('jsPanel-1')) { //document.getElementsByClassName('ppImagePanel')) {
if (dataURL == "" || dataURL == undefined)
@@ -3675,7 +3675,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
ajax: {
url: 'app/views/home/printPreview.html'
},
- title: localStorage.getItem("currentViewTitle"),
+ title: $rootScope.getLocalStorageValue("currentViewTitle"),
position: {
top: 70,
left: 1,
@@ -3685,7 +3685,21 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
//size: { width: $(window).outerWidth() - 10, height: $(window).outerHeight() - 110 },
});
}
+ $rootScope.getLocalStorageValue = function (localStorageParam) {
+
+ if ((localStorage.getItem('loggedInUserDetails') == null) && ($rootScope.isVisibleLogin == false))
+ {
+ $rootScope.LogoutUser();
+
+
+ }
+ else {
+ return localStorage.getItem(localStorageParam);
+ }
+
+
+ }
// $().on('', '', callback);
$(document).on('change', 'input[name=inlineRadioOptions]', function () {
if ($(this).attr("value") == "Portrait") {
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
index 5da6751..e56f68a 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -87,19 +87,19 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
$("#viewList").append("" + $rootScope.listArray[0].text + "
Open ");
var moduleItemDataToBeSavedID
$("#list-view table tbody tr").removeClass("active");
- var moduleItemDataToBeSavedID = localStorage.getItem("listViewSelectedID");
+ var moduleItemDataToBeSavedID = $rootScope.getLocalStorageValue("listViewSelectedID");
$("#list-view table tbody #" + moduleItemDataToBeSavedID).addClass("active");
$scope.isListViewButtonClicked = true;
- var curAAListViewScroll = localStorage.getItem("AAListViewScroll");
+ var curAAListViewScroll = $rootScope.getLocalStorageValue("AAListViewScroll");
if (typeof (curAAListViewScroll) !== "undefined" && curAAListViewScroll !== null && curAAListViewScroll !== '') {
if (typeof InstallTrigger !== 'undefined') {
- $('#list-view table tbody').animate({ scrollTop: localStorage.getItem("AAListViewScroll") });
+ $('#list-view table tbody').animate({ scrollTop: $rootScope.getLocalStorageValue("AAListViewScroll") });
}
else {
- $('#list-view table tbody').scrollTop(localStorage.getItem("AAListViewScroll"));
+ $('#list-view table tbody').scrollTop($rootScope.getLocalStorageValue("AAListViewScroll"));
}
}
@@ -128,8 +128,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
$scope.moduleLandingData = result;
// setTimeout(function () { $('#' + $rootScope.highlightid).find('.thumbnail').addClass('hightlightstate'); }, 100);
- if (localStorage.getItem('AAGridViewHighlightThumbnail') !== null) {
- setTimeout(function () { $('#' + localStorage.getItem("AAGridViewHighlightThumbnail")).find('.thumbnail').addClass('HightLightThumbnail'); }, 100);
+ if ($rootScope.getLocalStorageValue('AAGridViewHighlightThumbnail') !== null) {
+ setTimeout(function () { $('#' + $rootScope.getLocalStorageValue("AAGridViewHighlightThumbnail")).find('.thumbnail').addClass('HightLightThumbnail'); }, 100);
}
//console.log(JSON.stringify(result, null, 4));
},
@@ -138,8 +138,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
console.log(' error: ' + error.statusText);
}
)
- if (localStorage.getItem('AAGridViewScroll') !== null) {
- $('html, body').animate({ scrollTop: localStorage.getItem('AAGridViewScroll') }, 'slow');
+ if ($rootScope.getLocalStorageValue('AAGridViewScroll') !== null) {
+ $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('AAGridViewScroll') }, 'slow');
}
}
@@ -245,7 +245,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
ajax: {
url: jsContentURL
},
- title: localStorage.getItem("currentViewTitle"),
+ title: $rootScope.getLocalStorageValue("currentViewTitle"),
position: {
top: 70,
@@ -282,7 +282,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
$('.canvasDivClass').css("height", $rootScope.canvasDivHeight);
- $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
+ $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle");
$("#modItemImage").attr('src', $rootScope.OpenItemImagePath);
@@ -346,7 +346,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
$("#canvasDiv").scrollTop($rootScope.CanvasDivTopPosition);
});
$(document).on("click", "#ImagePanel .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () {
- $scope.setActiveTab(parseInt(localStorage.getItem("activeTab")));
+ $scope.setActiveTab(parseInt($rootScope.getLocalStorageValue("activeTab")));
$(".tools").css("z-index", "15000");
$rootScope.selectedBodySystemName = 'All';
$rootScope.selectedBodySystemId = 0;