mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-25 06:43:09 +01:00
Fix selection tab plugin data
This commit is contained in:
parent
4d3caf78fa
commit
3102550f37
@ -277,10 +277,12 @@ class calendar_export_csv implements importexport_iface_export_plugin {
|
|||||||
'content' => array(
|
'content' => array(
|
||||||
'plugin_override' => true, // Plugin overrides preferences
|
'plugin_override' => true, // Plugin overrides preferences
|
||||||
'selection' => $prefs['selection'] ? $prefs['selection'] : 'criteria',
|
'selection' => $prefs['selection'] ? $prefs['selection'] : 'criteria',
|
||||||
|
'criteria' => array(
|
||||||
'start' => is_object($start) ? $start->format('ts') : $start,
|
'start' => is_object($start) ? $start->format('ts') : $start,
|
||||||
'end' => $end,
|
'end' => $end,
|
||||||
'owner' => $states['owner']
|
'owner' => $states['owner']
|
||||||
)
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
@ -150,13 +150,8 @@ class calendar_export_ical extends calendar_export_csv {
|
|||||||
* returns selectors of this plugin
|
* returns selectors of this plugin
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function get_selectors_etpl() {
|
public function get_selectors_etpl($definition = null) {
|
||||||
return array(
|
$data = parent::get_selectors_etpl($definition);
|
||||||
'name' => 'calendar.export_csv_select',
|
return $data;
|
||||||
'content' => array(
|
|
||||||
'start' => time(),
|
|
||||||
'end' => time()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -173,24 +173,6 @@ class importexport_export_ui {
|
|||||||
$content['plugin_options_template'] = $options;
|
$content['plugin_options_template'] = $options;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$content['filter'] = $definition->filter;
|
|
||||||
$content['filter']['fields'] = importexport_helper_functions::get_filter_fields($_appname, $selected_plugin);
|
|
||||||
if(!$content['filter']['fields'])
|
|
||||||
{
|
|
||||||
$this->js->set_onload("\$j('input[value=\"filter\"]').parent().hide();");
|
|
||||||
$content['no_filter'] = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Process relative dates into the current absolute date
|
|
||||||
foreach($content['filter']['fields'] as $field => $settings)
|
|
||||||
{
|
|
||||||
if($content['filter'][$field] && strpos($settings['type'],'date') === 0)
|
|
||||||
{
|
|
||||||
$content['filter'][$field] = importexport_helper_functions::date_rel2abs($content['filter'][$field]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// fill selection tab
|
// fill selection tab
|
||||||
@ -209,7 +191,7 @@ class importexport_export_ui {
|
|||||||
} else {
|
} else {
|
||||||
$options = $plugin_object->get_selectors_etpl($definition);
|
$options = $plugin_object->get_selectors_etpl($definition);
|
||||||
if(is_array($options)) {
|
if(is_array($options)) {
|
||||||
$content['selection'] = $options['content'];
|
$content += is_array($options['content']) ? $options['content'] : array('selection' => $options['content']);
|
||||||
$sel_options += (array)$options['sel_options'];
|
$sel_options += (array)$options['sel_options'];
|
||||||
$readonlys['selection'] = (array)$options['readonlys'];
|
$readonlys['selection'] = (array)$options['readonlys'];
|
||||||
$preserv['selection'] = (array)$options['preserv'];
|
$preserv['selection'] = (array)$options['preserv'];
|
||||||
@ -221,6 +203,24 @@ class importexport_export_ui {
|
|||||||
if(!$content['plugin_selectors_html'] && !$content['plugin_selectors_template']) {
|
if(!$content['plugin_selectors_html'] && !$content['plugin_selectors_template']) {
|
||||||
$readonlys[$tabs]['selection_tab'] = true;
|
$readonlys[$tabs]['selection_tab'] = true;
|
||||||
}
|
}
|
||||||
|
$content['filter'] = $definition->filter;
|
||||||
|
$content['filter']['fields'] = importexport_helper_functions::get_filter_fields($_appname, $selected_plugin);
|
||||||
|
if(!$content['filter']['fields'])
|
||||||
|
{
|
||||||
|
$this->js->set_onload("\$j('input[value=\"filter\"]').parent().hide();");
|
||||||
|
$content['no_filter'] = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Process relative dates into the current absolute date
|
||||||
|
foreach($content['filter']['fields'] as $field => $settings)
|
||||||
|
{
|
||||||
|
if($content['filter'][$field] && strpos($settings['type'],'date') === 0)
|
||||||
|
{
|
||||||
|
$content['filter'][$field] = importexport_helper_functions::date_rel2abs($content['filter'][$field]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
} elseif (!$_selection) {
|
} elseif (!$_selection) {
|
||||||
$this->js->set_onload("
|
$this->js->set_onload("
|
||||||
disable_button('exec[preview]');
|
disable_button('exec[preview]');
|
||||||
|
Loading…
Reference in New Issue
Block a user