diff options
author | thomascube <thomas@roundcube.net> | 2008-09-02 17:22:00 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2008-09-02 17:22:00 +0000 |
commit | ed132eddea4a5a21f6f0c1454efa14c5ebe79520 (patch) | |
tree | ddca59a3305bc72f414a9b9a3ba5794126822e0b /program/js | |
parent | 82bac871fa626e82a593f7ab5a4ca3509261049f (diff) |
New feature to import contacts from a vcard file + mark form buttons that provide the most obvious operation
Diffstat (limited to 'program/js')
-rw-r--r-- | program/js/app.js | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/program/js/app.js b/program/js/app.js index d64b58c50..ff6ff8cf3 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -281,7 +281,7 @@ function rcube_webmail() if ((this.env.action=='add' || this.env.action=='edit') && this.gui_objects.editform) this.enable_command('save', true); else - this.enable_command('search', 'reset-search', 'moveto', true); + this.enable_command('search', 'reset-search', 'moveto', 'import', true); this.enable_command('list', true); break; @@ -972,7 +972,7 @@ function rcube_webmail() break; } - // reset quicksearch + // reset quicksearch case 'reset-search': var s = this.env.search_request; this.reset_qsearch(); @@ -983,6 +983,21 @@ function rcube_webmail() this.list_contacts(this.env.source); break; + case 'import': + if (this.env.action == 'import' && this.gui_objects.importform) { + var file = document.getElementById('rcmimportfile'); + if (file && !file.value) { + alert(this.get_label('selectimportfile')); + break; + } + this.gui_objects.importform.submit(); + this.set_busy(true, 'importwait'); + this.lock_form(this.gui_objects.importform, true); + } + else + this.goto_url('import'); + break + // collapse/expand folder case 'collapse-folder': if (props) |