From d634241cc084cb824dd2e13ad1ca2a8474ae16a4 Mon Sep 17 00:00:00 2001 From: nikita Date: Mon, 12 Dec 2016 12:41:09 +0530 Subject: [PATCH] issue is fixed but navigator image is not changed on settings change. Need to see --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 10 +++++----- 400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js | 8 +++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 6fe9003..1f18395 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -89,7 +89,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //navigator man functionality $scope.navigatorImage; - $scope.NavigatorData; + $rootScope.NavigatorData; $scope.navimgsrc; $scope.dragdivleft = 0; @@ -644,12 +644,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $http({ method: 'GET', url: NavigatorManJsonPath }) .success(function (data) { - $scope.NavigatorData = data; + $rootScope.NavigatorData = data; $scope.skinTone = $rootScope.globalSetting.ethnicity; var navigatorManData = new jinqJs() - .from($scope.NavigatorData.Navigtor.ViewOrientation) + .from($rootScope.NavigatorData.Navigtor.ViewOrientation) .where("_ViewOrientationId == " + $rootScope.currentBodyViewId) .select(); @@ -6348,9 +6348,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //$scope.skinTone = $rootScope.globalSetting.ethnicity; - if ($scope.NavigatorData != null || $scope.NavigatorData != undefined) { + if ($rootScope.NavigatorData != null || $rootScope.NavigatorData != undefined) { var navdtlOrient = new jinqJs() - .from($scope.NavigatorData.Navigtor.ViewOrientation) + .from($rootScope.NavigatorData.Navigtor.ViewOrientation) .where("_ViewOrientationId == " + currentBodyViewId) .select(); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 0690ce8..5de515f 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -1927,7 +1927,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } } - + $rootScope.prevId = ""; } function fillListManagerTerms() { @@ -2068,7 +2068,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } - else if (setting.ethnicity != $rootScope.globalSetting.ethnicity) { + else if (setting.ethnicity!=null && setting.ethnicity != $rootScope.globalSetting.ethnicity) { $rootScope.globalSetting.ethnicity = setting.ethnicity; localStorage.setItem("globalEthnicity", $rootScope.globalSetting.ethnicity); @@ -2077,10 +2077,12 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", isReloadingViewRequired = true; } - else if (setting.modesty != $rootScope.globalSetting.modesty) { + else if (setting.modesty!= null && setting.modesty != $rootScope.globalSetting.modesty) { $rootScope.globalSetting.modesty = setting.modesty; localStorage.setItem("globalModesty", $rootScope.globalSetting.modesty); + $rootScope.globalSetting.ethnicity = localStorage.getItem("globalEthnicity"); + if ($('.modestyImg') != null) { if (($rootScope.globalSetting.modesty == 'Y')) { $('.modestyImg').css('visibility', 'visible'); -- libgit2 0.21.4