From 9a6c38e14895bd093627e12f2fcf2c6ff1e3af3c Mon Sep 17 00:00:00 2001 From: Thomas Bruederli <thomas@roundcube.net> Date: Fri, 11 Jan 2013 08:39:23 -0500 Subject: [PATCH] New feature to export only selected contacts from addressbook (by Phil Weir) --- program/js/app.js | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index c627983..2804e88 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -1090,6 +1090,12 @@ } break; + case 'export-selected': + if (this.contact_list.rowcount > 0) { + this.goto_url('export', { _source: this.env.source, _gid: this.env.group, _cid: this.contact_list.get_selection().join(',') }); + } + break; + case 'upload-photo': this.upload_contact_photo(props || this.gui_objects.uploadform); break; @@ -4115,6 +4121,7 @@ // thend we can enable the group-remove-selected command this.enable_command('group-remove-selected', this.env.group && list.selection.length > 0); this.enable_command('compose', this.env.group || list.selection.length > 0); + this.enable_command('export-selected', list.selection.length > 0); this.enable_command('edit', id && writable); this.enable_command('delete', list.selection.length && writable); @@ -6238,6 +6245,7 @@ this.enable_command('compose', (uid && this.contact_list.rows[uid])); this.enable_command('delete', 'edit', writable); this.enable_command('export', (this.contact_list && this.contact_list.rowcount > 0)); + this.enable_command('export-selected', false); } case 'moveto': -- Gitblit v1.9.1