Commit e4c9adaad136f59f5e56672a747640b72972261b

Authored by Mukul Rajput
1 parent 2c208565

this is solution for the bug 23952

400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -42,7 +42,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
42 42  
43 43 // on refersh this variable will also get null that is why we are only checking this variable on initialize that if it is null that means page gets refershed.
44 44 $rootScope.refreshcheck = null;
45   -
  45 + $rootScope.isCloseSettingClicked = false;
46 46  
47 47  
48 48 $rootScope.isModestyOn;
... ... @@ -4003,8 +4003,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
4003 4003 }
4004 4004  
4005 4005 $rootScope.ChangeEthnicity = function (formsetting, skintone) {
4006   - formsetting.ethnicity = skintone;
  4006 +
  4007 + if ($rootScope.isCloseSettingClicked == true) {
  4008 + formsetting.ethnicity = localStorage.getItem("globalEthnicity");
  4009 + $rootScope.isCloseSettingClicked = false;
  4010 + }
  4011 + else {
  4012 + formsetting.ethnicity = skintone;
  4013 + }
4007 4014 $rootScope.setEthncitySettings(formsetting.ethnicity);
  4015 +
  4016 +
4008 4017  
4009 4018 }
4010 4019  
... ... @@ -4015,7 +4024,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
4015 4024 }
4016 4025 $rootScope.isApplyBtnClicked = false;
4017 4026 $rootScope.CloseSetting = function () {
4018   -
  4027 + $rootScope.isCloseSettingClicked = true;
4019 4028 $rootScope.setEthncitySettings($rootScope.globalSetting.ethnicity);
4020 4029 $rootScope.setModestySettings($rootScope.globalSetting.modesty);
4021 4030 if ($rootScope.isApplyBtnClicked == false) {
... ... @@ -4051,17 +4060,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
4051 4060 };
4052 4061  
4053 4062  
4054   - $rootScope.CloseSettingPopup = function () {
4055   - if ($rootScope.isApplyBtnClicked == false) {
4056   - $rootScope.deSelectLanguageOptions();
4057   - }
4058   - else {
4059   - $rootScope.isApplyBtnClicked = false;
4060   - }
4061   - $('#modal-settings').css("display", "none");
4062   - $("#modelsettingsbackground").css("display", "none");
4063   - }
4064   -
  4063 +
4065 4064 $rootScope.deSelectLanguageOptions = function () {
4066 4065  
4067 4066 var languageDifference = ($rootScope.lexiconLanguageArrayLength) - ($rootScope.lexiconLanguageArray.length);
... ...
400-SOURCECODE/AIAHTML5.Web/index.html
... ... @@ -472,7 +472,7 @@
472 472 <form>
473 473 <div ng-init="loadsettings()" class="modal-content" id="setting-modal-dark">
474 474 <div class="modal-header annotation-modal-header">
475   - <button type="button" class="close" data-dismiss="modal" ng-click="CloseSettingPopup()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  475 + <button type="button" class="close" data-dismiss="modal" ng-click="CloseSetting()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
476 476 <h4 class="modal-title" id="myModalLabel2">Settings</h4>
477 477 </div>
478 478 <div class="modal-body">
... ...