From 48ac9b2adc7a4e37dd934a5c45e6ffb112dff299 Mon Sep 17 00:00:00 2001 From: thomasb Date: Tue, 2 Sep 2008 17:22:00 +0000 Subject: 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 --- roundcubemail/program/js/app.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'roundcubemail/program/js') 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) -- cgit v1.2.3