From c8ae2497b7e4c7393210ed186acd672a0040389f Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Wed, 03 Sep 2008 12:03:19 -0400 Subject: [PATCH] Auto-detect client language and timezone if desired by config/prefs --- program/js/app.js | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index ff6ff8c..7ba8572 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -318,13 +318,19 @@ 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; -- Gitblit v1.9.1