New feature to export only selected contacts from addressbook (by Phil Weir)
| | |
| | | CHANGELOG Roundcube Webmail |
| | | =========================== |
| | | |
| | | - Feature to export only selected contacts from addressbook (by Phil Weir) |
| | | - Force autocommit mode in mysql database driver (#1488902) |
| | | |
| | | RELEASE 0.9-beta |
| | |
| | | } |
| | | 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; |
| | |
| | | // 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); |
| | | |
| | |
| | | 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': |
| | |
| | | $labels['contactsfromto'] = 'Contacts $from to $to of $count'; |
| | | $labels['print'] = 'Print'; |
| | | $labels['export'] = 'Export'; |
| | | $labels['exportall'] = 'Export all'; |
| | | $labels['exportsel'] = 'Export selected'; |
| | | $labels['exportvcards'] = 'Export contacts in vCard format'; |
| | | $labels['newcontactgroup'] = 'Create new contact group'; |
| | | $labels['grouprename'] = 'Rename group'; |
| | |
| | | $result = new rcube_result_set($count); |
| | | $result->records = array_values($records); |
| | | } |
| | | // selected contacts |
| | | else if (!empty($_REQUEST['_cid'])) { |
| | | $sort_col = $RCMAIL->config->get('addressbook_sort_col', 'name'); |
| | | $records = array(); |
| | | |
| | | $cids = explode(',', get_input_value('_cid', RCUBE_INPUT_GET)); |
| | | $CONTACTS = rcmail_contact_source(null, true); |
| | | |
| | | // Get records from all sources |
| | | foreach ($cids as $cid) { |
| | | $record = $CONTACTS->get_record($cid, true); |
| | | $key = rcmail_contact_key($record, $sort_col); |
| | | $records[$key] = $record; |
| | | unset($record); |
| | | } |
| | | |
| | | ksort($records, SORT_LOCALE_STRING); |
| | | |
| | | // create resultset object |
| | | $count = count($records); |
| | | $result = new rcube_result_set($count); |
| | | $result->records = array_values($records); |
| | | } |
| | | // selected directory/group |
| | | else { |
| | | $CONTACTS = rcmail_contact_source(null, true); |
| | |
| | | background-position: -128px -32px; |
| | | } |
| | | |
| | | #abooktoolbar a.exportAll { |
| | | background-position: -128px 0; |
| | | } |
| | | |
| | | #abooktoolbar a.exportAllSel { |
| | | background-position: -128px -32px; |
| | | } |
| | | |
| | | #abooktoolbar span.separator { |
| | | width: 5px; |
| | | background-position: -162px 0; |
| | |
| | | <roundcube:button command="delete" type="link" class="buttonPas delete" classAct="button delete" classSel="button deleteSel" title="deletecontact" content=" " /> |
| | | <span class="separator"> </span> |
| | | <roundcube:button command="import" type="link" class="buttonPas import" classAct="button import" classSel="button importSel" title="importcontacts" content=" " /> |
| | | <span class="dropbutton"> |
| | | <roundcube:button command="export" type="link" class="buttonPas export" classAct="button export" classSel="button exportSel" title="exportvcards" content=" " /> |
| | | <span id="exportmenulink" onclick="rcmail_ui.show_popup('exportmenu');return false"></span> |
| | | </span> |
| | | <roundcube:button command="advanced-search" type="link" class="buttonPas search" classAct="button search" classSel="button searchSel" title="advsearch" content=" " /> |
| | | <roundcube:container name="toolbar" id="abooktoolbar" /> |
| | | </div> |
| | |
| | | <roundcube:button command="reset-search" id="searchreset" image="/images/icons/reset.gif" title="resetsearch" width="13" height="13" /> |
| | | </div> |
| | | |
| | | <div id="exportmenu" class="popupmenu"> |
| | | <ul> |
| | | <li><roundcube:button command="export" label="exportall" prop="sub" classAct="exportalllink active" class="exportalllink" /></li> |
| | | <li><roundcube:button command="export-selected" label="exportsel" prop="sub" classAct="exportsellink active" class="exportsellink" /></li> |
| | | </ul> |
| | | </div> |
| | | |
| | | <div id="searchmenu" class="popupmenu"> |
| | | <ul class="toolbarmenu"> |
| | | <li><label><input type="checkbox" name="s_mods[]" value="name" id="s_mod_name" onclick="rcmail_ui.set_searchmod(this)" /> <span><roundcube:label name="name" /></span></label></li> |
| | |
| | | } |
| | | |
| | | .toolbar a.button.export { |
| | | min-width: 74px; |
| | | background-position: center -1054px; |
| | | } |
| | | |
| | |
| | | .toolbar a.button.close { |
| | | background-position: 0 -1745px; |
| | | } |
| | | |
| | | |
| | | a.menuselector { |
| | | display: inline-block; |
| | |
| | | <!-- toolbar --> |
| | | <div id="addressbooktoolbar" class="toolbar"> |
| | | <roundcube:button command="import" type="link" class="button import disabled" classAct="button import" classSel="button import pressed" label="import" title="importcontacts" /> |
| | | <roundcube:button command="export" type="link" class="button export disabled" classAct="button export" classSel="button export pressed" label="export" title="exportvcards" /> |
| | | <span class="dropbutton"> |
| | | <roundcube:button command="export" type="link" class="button export disabled" classAct="button export" classSel="button export pressed" label="export" title="exportvcards" /> |
| | | <span class="dropbuttontip" id="exportmenulink" onclick="UI.show_popup('exportmenu');return false"></span> |
| | | </span> |
| | | |
| | | <span class="spacer"></span> |
| | | <roundcube:button command="compose" type="link" class="button compose disabled" classAct="button compose" classSel="button compose pressed" label="compose" title="writenewmessage" /> |
| | | <roundcube:button command="advanced-search" type="link" class="button search disabled" classAct="button search" classSel="button search pressed" label="advanced" title="advsearch" /> |
| | |
| | | |
| | | </div><!-- end mainscreen --> |
| | | |
| | | <div id="exportmenu" class="popupmenu"> |
| | | <ul class="toolbarmenu"> |
| | | <li><roundcube:button command="export" label="exportall" prop="sub" class="exportalllink" classAct="exportalllink active" /></li> |
| | | <li><roundcube:button command="export-selected" label="exportsel" prop="sub" class="exportsellink" classAct="exportsellink active" /></li> |
| | | </ul> |
| | | </div> |
| | | |
| | | <div id="searchmenu" class="popupmenu"> |
| | | <ul class="toolbarmenu"> |