Commit a6e09ea9519da3bbbcc7330399ea780395e9d0ed
1 parent
f249adab
fixed new bug 59238 in DA module
Showing
1 changed file
with
25 additions
and
6 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -343,8 +343,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
343 | 343 | //get the DA body view list based on selected gender |
344 | 344 | $scope.getDAViewList = function ($event) { |
345 | 345 | |
346 | - var windowviewid=$rootScope.MULTI_VIEW_ID; | |
347 | - | |
346 | + var windowviewid = $rootScope.MULTI_VIEW_ID; | |
347 | + | |
348 | 348 | if ($('#MainImage') != null) { |
349 | 349 | $('#MainImage').remove(); |
350 | 350 | } |
... | ... | @@ -352,10 +352,20 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
352 | 352 | //for default load |
353 | 353 | if ($event == null || $event == undefined) { |
354 | 354 | // default set male |
355 | - $scope.SetwindowStoreData(windowviewid,'genderId','Male'); | |
355 | + | |
356 | + var currentGenderValue = $rootScope.getLocalStorageValue("currentGenderValue"); | |
357 | + if (typeof (currentGenderValue) !== "undefined" && currentGenderValue !== null) { | |
358 | + $scope.SetwindowStoreData(windowviewid, 'genderId', currentGenderValue); | |
359 | + } | |
360 | + else | |
361 | + { | |
362 | + $scope.SetwindowStoreData(windowviewid, 'genderId', 'Male'); | |
363 | + localStorage.setItem("currentGenderValue", 'Male'); | |
364 | + } | |
356 | 365 | } |
357 | 366 | else { |
358 | - $scope.SetwindowStoreData(windowviewid,'genderId',$event.currentTarget.id); | |
367 | + $scope.SetwindowStoreData(windowviewid, 'genderId', $event.currentTarget.id); | |
368 | + localStorage.setItem("currentGenderValue", $event.currentTarget.id); | |
359 | 369 | } |
360 | 370 | |
361 | 371 | var selectedGender = $scope.GetwindowStoreData(windowviewid,'genderId'); |
... | ... | @@ -8948,7 +8958,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8948 | 8958 | |
8949 | 8959 | $rootScope.isLoading = true; |
8950 | 8960 | $('#spinner').css('visibility', 'visible'); |
8951 | - //3. | |
8961 | + | |
8962 | + //3. update gender local storage | |
8963 | + if (!$rootScope.isCallFromOtherModule) { | |
8964 | + localStorage.setItem("currentGenderValue", 'Male'); | |
8965 | + } | |
8952 | 8966 | |
8953 | 8967 | $scope.loadSelectedBodyView(currentBodyViewId, windowviewid); |
8954 | 8968 | |
... | ... | @@ -8985,7 +8999,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8985 | 8999 | |
8986 | 9000 | $rootScope.isLoading = true; |
8987 | 9001 | $('#spinner').css('visibility', 'visible'); |
8988 | - //3. | |
9002 | + | |
9003 | + //3. update gender local storage | |
9004 | + if (!$rootScope.isCallFromOtherModule) { | |
9005 | + localStorage.setItem("currentGenderValue", 'Female'); | |
9006 | + } | |
9007 | + | |
8989 | 9008 | |
8990 | 9009 | $scope.loadSelectedBodyView(currentBodyViewId, windowviewid); |
8991 | 9010 | ... | ... |