Commit 0a6e382dea5cd1ded1be86d998db735c15ea02ad

Authored by Nikita Kulshreshtha
1 parent d634241c

after changing code for modesty. Navigator image was not reflected on skintone/ modesty change.

Remove angular binding from navImg and added src attribute when we get nav image src.
Also added new event for changing Nav image on modesty change only.
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -684,7 +684,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -684,7 +684,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
684 navImageModesty = $scope.navigatorImage[0]._ImageName; 684 navImageModesty = $scope.navigatorImage[0]._ImageName;
685 } 685 }
686 686
687 - $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $scope.skinTone + '/navigator_images/' + navImageModesty; 687 + // $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $scope.skinTone + '/navigator_images/' + navImageModesty;
  688 + document.getElementById('navimg').src = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $scope.skinTone + '/navigator_images/' + navImageModesty;
688 689
689 $('#navigatorDiv').css('visibility', 'visible'); 690 $('#navigatorDiv').css('visibility', 'visible');
690 691
@@ -6317,6 +6318,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -6317,6 +6318,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6317 6318
6318 }) 6319 })
6319 6320
  6321 + $scope.$on('changeNavigatorModestyEvent', function (event, data) {
  6322 + console.log('changeNavigatorModestyEvent');
  6323 +
  6324 + $scope.loadSelectedBodyViewNavigator(data.bodyViewId);
  6325 +
  6326 + })
6320 //Reload DA controller Body View after setting Change 6327 //Reload DA controller Body View after setting Change
6321 $scope.$on('reloadDABodyViewEvent', function (event, data) { 6328 $scope.$on('reloadDABodyViewEvent', function (event, data) {
6322 //console.log('reloadDABodyViewEvent'); 6329 //console.log('reloadDABodyViewEvent');
@@ -6380,7 +6387,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -6380,7 +6387,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6380 6387
6381 } 6388 }
6382 6389
6383 - $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $rootScope.globalSetting.ethnicity + '/navigator_images/' + navImageModesty; 6390 + // $scope.navimgsrc = 'http://localhost/AIAHTML5/content/images/DA/ethnicity/body-views/' + $scope.voId + '/' + $rootScope.globalSetting.ethnicity + '/navigator_images/' + navImageModesty;//"~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $rootScope.globalSetting.ethnicity + '/navigator_images/' + navImageModesty;
  6391 + document.getElementById('navimg').src = '~/../content/images/DA/ethnicity/body-views/' + $scope.voId + '/' + $rootScope.globalSetting.ethnicity + '/navigator_images/' + navImageModesty;//"~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $rootScope.globalSetting.ethnicity + '/navigator_images/' + navImageModesty;
6384 } 6392 }
6385 } 6393 }
6386 6394
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -2092,6 +2092,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", @@ -2092,6 +2092,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
2092 $('.modestyImg').css('visibility', 'hidden'); 2092 $('.modestyImg').css('visibility', 'hidden');
2093 } 2093 }
2094 } 2094 }
  2095 + $rootScope.changeNavigatorModesty();
2095 } 2096 }
2096 2097
2097 //4. 2098 //4.
@@ -2121,7 +2122,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", @@ -2121,7 +2122,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
2121 //Check that what current bodyview is open 2122 //Check that what current bodyview is open
2122 if ($rootScope.openViews.length > 0) { 2123 if ($rootScope.openViews.length > 0) {
2123 var openViewLen = $rootScope.openViews.length; 2124 var openViewLen = $rootScope.openViews.length;
2124 - var currentOpenViewId = $rootScope.openViews[openViewLen - 1].BodyViewId; 2125 + var currentOpenViewId = localStorage.getItem("currentBodyViewId");//$rootScope.openViews[openViewLen - 1].BodyViewId;
2125 $rootScope.isSettingEventAlredayDispachted = true; 2126 $rootScope.isSettingEventAlredayDispachted = true;
2126 $rootScope.$broadcast('reloadDABodyViewEvent', { reloadDABodyViewId: currentOpenViewId }, true); 2127 $rootScope.$broadcast('reloadDABodyViewEvent', { reloadDABodyViewId: currentOpenViewId }, true);
2127 } 2128 }
@@ -2132,6 +2133,11 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", @@ -2132,6 +2133,11 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
2132 } 2133 }
2133 }; 2134 };
2134 2135
  2136 + $rootScope.changeNavigatorModesty = function () {
  2137 + var currentOpenViewId = localStorage.getItem("currentBodyViewId");//$rootScope.openViews[openViewLen - 1].BodyViewId;
2135 2138
  2139 + $rootScope.$broadcast('changeNavigatorModestyEvent', { bodyViewId: currentOpenViewId }, true);
  2140 +
  2141 + };
2136 }] 2142 }]
2137 ); 2143 );
2138 \ No newline at end of file 2144 \ No newline at end of file
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
@@ -313,7 +313,7 @@ @@ -313,7 +313,7 @@
313 313
314 <div class="dropdown-menu active" id="navigatorDiv" style="min-height:auto; min-width:auto; "> 314 <div class="dropdown-menu active" id="navigatorDiv" style="min-height:auto; min-width:auto; ">
315 <div id="containment-wrapper" align="center" style="min-width:auto;height:119px; "> 315 <div id="containment-wrapper" align="center" style="min-width:auto;height:119px; ">
316 - <img id="navimg" ng-src="{{navimgsrc}}" alt=""></img> 316 + <img id="navimg" alt=""></img>
317 <div id="draggable" class="draggable ui-widget-content" ng-mouseup="ScrollCanvasDiv()" ng-style="dragdivposition"> 317 <div id="draggable" class="draggable ui-widget-content" ng-mouseup="ScrollCanvasDiv()" ng-style="dragdivposition">
318 </div> 318 </div>
319 </div> 319 </div>