summaryrefslogtreecommitdiff
path: root/roundcubemail/program/js
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-09-29 08:11:51 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-09-29 08:11:51 +0000
commit0b6e7343b743cdc4fa5c6dd5f8f28693a653d380 (patch)
tree0b378bf95e9d9e1a92477230185ff9ea568c7253 /roundcubemail/program/js
parent2814773cc83c46ff523fc19390539827d7c07652 (diff)
Focus search box or first edit field on page load
git-svn-id: https://svn.roundcube.net/trunk@3997 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js')
-rw-r--r--roundcubemail/program/js/app.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js
index c42b62c9c..64cc7c631 100644
--- a/roundcubemail/program/js/app.js
+++ b/roundcubemail/program/js/app.js
@@ -301,10 +301,14 @@ function rcube_webmail()
if (this.env.cid)
this.enable_command('show', 'edit', true);
- if ((this.env.action=='add' || this.env.action=='edit') && this.gui_objects.editform)
+ if ((this.env.action=='add' || this.env.action=='edit') && this.gui_objects.editform) {
this.enable_command('save', true);
- else
+ $("input[type='text']").first().select();
+ }
+ else if (this.gui_objects.qsearchbox) {
this.enable_command('search', 'reset-search', 'moveto', true);
+ $(this.gui_objects.qsearchbox).select();
+ }
if (this.contact_list && this.contact_list.rowcount > 0)
this.enable_command('export', true);