|
145 | 145 | g_account = unBoxCookieValue('account'); |
146 | 146 | g_username = unBoxCookieValue('username'); |
147 | 147 | g_userfullname = unBoxCookieValue('userfullname'); |
148 | | - g_timezone = unBoxCookieValue('timezone'); |
149 | | - if ($.cookie('timezoneoffset') != null) |
150 | | - g_timezoneoffset = isNaN(unBoxCookieValue('timezoneoffset')) ? null : parseFloat(unBoxCookieValue('timezoneoffset')); |
151 | | - else |
152 | | - g_timezoneoffset = null; |
| 148 | + g_timezone = unBoxCookieValue('timezone'); |
153 | 149 | } else { //single-sign-on (bypass login screen) |
154 | 150 | g_mySession = $.cookie('JSESSIONID'); |
155 | 151 | g_sessionKey = encodeURIComponent(g_loginResponse.sessionkey); |
|
159 | 155 | g_account = g_loginResponse.account; |
160 | 156 | g_domainid = g_loginResponse.domainid; |
161 | 157 | g_userfullname = g_loginResponse.firstname + ' ' + g_loginResponse.lastname; |
162 | | - g_timezone = g_loginResponse.timezone; |
163 | | - if (g_loginResponse.timezoneoffset != null) |
164 | | - g_timezoneoffset = isNaN(g_loginResponse.timezoneoffset) ? null : parseFloat(g_loginResponse.timezoneoffset); |
165 | | - else |
166 | | - g_timezoneoffset = null; |
| 158 | + g_timezone = g_loginResponse.timezone; |
167 | 159 | } |
168 | 160 |
|
169 | 161 | var userValid = false; |
|
254 | 246 | g_userid = loginresponse.userid; |
255 | 247 | g_account = loginresponse.account; |
256 | 248 | g_domainid = loginresponse.domainid; |
257 | | - g_timezone = loginresponse.timezone; |
258 | | - g_timezoneoffset = loginresponse.timezoneoffset; |
| 249 | + g_timezone = loginresponse.timezone; |
259 | 250 | g_userfullname = loginresponse.firstname + ' ' + loginresponse.lastname; |
260 | 251 |
|
261 | 252 | $.cookie('sessionKey', g_sessionKey, { |
|
272 | 263 | }); |
273 | 264 | $.cookie('role', g_role, { |
274 | 265 | expires: 1 |
275 | | - }); |
276 | | - $.cookie('timezoneoffset', g_timezoneoffset, { |
277 | | - expires: 1 |
278 | | - }); |
| 266 | + }); |
279 | 267 | $.cookie('timezone', g_timezone, { |
280 | 268 | expires: 1 |
281 | 269 | }); |
|
365 | 353 | $.cookie('username', null); |
366 | 354 | $.cookie('account', null); |
367 | 355 | $.cookie('domainid', null); |
368 | | - $.cookie('role', null); |
369 | | - $.cookie('timezoneoffset', null); |
| 356 | + $.cookie('role', null); |
370 | 357 | $.cookie('timezone', null); |
371 | 358 |
|
372 | 359 | if (onLogoutCallback()) { //onLogoutCallback() will set g_loginResponse(single-sign-on variable) to null, then bypassLoginCheck() will show login screen. |
|
0 commit comments