Commit cf1967484b8252d84fc1015190d4d05b1601e1c8
1 parent
7aabea2c
commit chnges
Showing
1 changed file
with
45 additions
and
5 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -200,7 +200,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
200 | 200 | .then( |
201 | 201 | |
202 | 202 | function (result) { |
203 | - | |
203 | + console.log(result); | |
204 | 204 | if (result == LoginConstants.USER_NOT_FOUND) { |
205 | 205 | $rootScope.isVisibleLogin = true; |
206 | 206 | // alert(LoginMessageConstants.USER_OR_PASSWORD_INCORRECT); |
... | ... | @@ -208,6 +208,43 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
208 | 208 | $("#messageModal").modal('show'); |
209 | 209 | } |
210 | 210 | else { |
211 | + //code for modesty setting | |
212 | + if (result.LicenseInfo != null) { | |
213 | + if (result.IsModestyOn) { | |
214 | + $rootScope.isModestyOn = true; | |
215 | + $rootScope.isModestyOff = false; | |
216 | + $rootScope.globalSetting.modesty = true; | |
217 | + $rootScope.setting1 = { | |
218 | + ethnicity: null, | |
219 | + modesty: "Y" | |
220 | + } | |
221 | + $rootScope.UpdateAndCloseSetting($rootScope.setting1) | |
222 | + | |
223 | + } | |
224 | + else { | |
225 | + $rootScope.isModestyOn = false; | |
226 | + $rootScope.isModestyOff = true; | |
227 | + $rootScope.globalSetting.modesty = false; | |
228 | + $rootScope.setting1 = { | |
229 | + ethnicity: null, | |
230 | + modesty: "N" | |
231 | + } | |
232 | + $rootScope.UpdateAndCloseSetting($rootScope.setting1) | |
233 | + | |
234 | + } | |
235 | + } | |
236 | + else | |
237 | + { | |
238 | + $rootScope.isModestyOn = true; | |
239 | + $rootScope.isModestyOff = false; | |
240 | + $rootScope.globalSetting.modesty = true; | |
241 | + $rootScope.setting1 = { | |
242 | + ethnicity: "W", | |
243 | + modesty: "Y" | |
244 | + } | |
245 | + $rootScope.UpdateAndCloseSetting($rootScope.setting1) | |
246 | + } | |
247 | + //code for modesty setting | |
211 | 248 | |
212 | 249 | if (typeof result.LoginId != undefined || result.LoginId != "" || result.LoginId != null) { |
213 | 250 | |
... | ... | @@ -4727,7 +4764,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
4727 | 4764 | }; |
4728 | 4765 | |
4729 | 4766 | $rootScope.loadsettings = function () { |
4730 | - | |
4767 | + | |
4731 | 4768 | //1. For now we are by default opening DA settings tab |
4732 | 4769 | $rootScope.SettingsTab = 3; |
4733 | 4770 | |
... | ... | @@ -4758,7 +4795,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
4758 | 4795 | }; |
4759 | 4796 | |
4760 | 4797 | $rootScope.setModestySettings = function (currentmodsetting) { |
4761 | - | |
4798 | + | |
4762 | 4799 | if (currentmodsetting == 'Y') { |
4763 | 4800 | $rootScope.isModestyOn = true; |
4764 | 4801 | $rootScope.isModestyOff = false; |
... | ... | @@ -4814,6 +4851,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
4814 | 4851 | } |
4815 | 4852 | |
4816 | 4853 | $rootScope.ChangeModesty = function (formsetting, modestyValue) { |
4854 | + | |
4817 | 4855 | formsetting.modesty = modestyValue; |
4818 | 4856 | $rootScope.setModestySettings(formsetting.modesty); |
4819 | 4857 | |
... | ... | @@ -4836,7 +4874,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
4836 | 4874 | } |
4837 | 4875 | |
4838 | 4876 | $rootScope.UpdateAndCloseSetting = function (setting) { |
4839 | - | |
4877 | + | |
4840 | 4878 | $rootScope.UpdateSetting(setting); |
4841 | 4879 | if ($rootScope.MenuModuleName == "DA" || $rootScope.MenuModuleName == "AA") { |
4842 | 4880 | $rootScope.loadSearchData(); |
... | ... | @@ -4856,6 +4894,8 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
4856 | 4894 | }; |
4857 | 4895 | |
4858 | 4896 | |
4897 | + | |
4898 | + | |
4859 | 4899 | |
4860 | 4900 | $rootScope.deSelectLanguageOptions = function () { |
4861 | 4901 | |
... | ... | @@ -4943,7 +4983,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
4943 | 4983 | |
4944 | 4984 | |
4945 | 4985 | $rootScope.UpdateSetting = function (setting) { |
4946 | - | |
4986 | + debugger; | |
4947 | 4987 | $rootScope.isApplyBtnClicked = true; |
4948 | 4988 | var isReloadingViewRequired = false; |
4949 | 4989 | //1. | ... | ... |