diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-09-02 17:22:00 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-09-02 17:22:00 +0000 |
| commit | 48ac9b2adc7a4e37dd934a5c45e6ffb112dff299 (patch) | |
| tree | af4afd13427d5bbf5b9c5b6a406f3be3dcf8112e /roundcubemail/program/js/app.js | |
| parent | 7ea6112e4580bf3c1a73c015275d60c5acf39225 (diff) | |
New feature to import contacts from a vcard file + mark form buttons that provide the most obvious operation
git-svn-id: https://svn.roundcube.net/trunk@1716 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js/app.js')
| -rw-r--r-- | roundcubemail/program/js/app.js | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index d64b58c50..ff6ff8cf3 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/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) |
