From c8ae2497b7e4c7393210ed186acd672a0040389f Mon Sep 17 00:00:00 2001 From: thomascube Date: Wed, 3 Sep 2008 16:03:19 +0000 Subject: Auto-detect client language and timezone if desired by config/prefs --- program/js/app.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'program/js') diff --git a/program/js/app.js b/program/js/app.js index ff6ff8cf3..7ba8572b3 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -318,13 +318,19 @@ function rcube_webmail() case 'login': var input_user = rcube_find_object('rcmloginuser'); var input_pass = rcube_find_object('rcmloginpwd'); + var input_tz = rcube_find_object('rcmlogintz'); + if (input_user) input_user.onkeyup = function(e){ return rcmail.login_user_keyup(e); }; if (input_user && input_user.value=='') input_user.focus(); else if (input_pass) input_pass.focus(); - + + // detect client timezone + if (input_tz) + input_tz.value = new Date().getTimezoneOffset() / -60; + this.enable_command('login', true); break; -- cgit v1.2.3