Change addressbook Export CSV context menu option to use importexport

This commit is contained in:
Nathan Gray 2012-02-27 16:06:10 +00:00
parent 354e344a1c
commit d67191841b
2 changed files with 9 additions and 3 deletions

View File

@ -593,7 +593,12 @@ class addressbook_ui extends addressbook_bo
'icon' => 'filesave',
'group' => ++$group,
'children' => array(
'csv' => 'Export as CSV',
'csv' => array(
'caption' => 'Export as CSV',
'url' => 'menuaction=importexport.importexport_export_ui.export_dialog&appname=addressbook&selection=$id',
'popup' => '850x440',
'allowOnMultiple' => true,
),
'vcard' => 'Export as VCard',
),
);

View File

@ -53,6 +53,7 @@ class importexport_export_ui {
$_definition = $_content['definition'] ? $_content['definition'] : $_GET['definition'];
$_plugin = $_content['plugin'] ? $_content['plugin'] : $_GET['plugin'];
$_selection = $_content['selection'] ? $_content['selection'] : $_GET['selection'];
if($_GET['selection'] || $_content['selection_passed']) $content['selection_passed'] = $preserv['selection_passed'] = true;
// Check global setting
if(!bo_merge::is_export_limit_excepted()) {
@ -175,11 +176,11 @@ class importexport_export_ui {
}
// fill selection tab
if($definition && $definition->plugin_options['selection']) {
if($definition && $definition->plugin_options['selection'] && !$content['selection_passed']) {
$_selection = $definition->plugin_options['selection'];
}
if ($_selection && $content['old_definition'] == $content['definition']) {
if ($_selection && ($content['old_definition'] == $content['definition'] || $content['selection_passed'])) {
$readonlys[$tabs]['selection_tab'] = true;
$content['selection'] = $_selection;
$preserv['selection'] = $_selection;