mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-23 14:29:02 +01:00
- Fix Execute context menu action
- Fix missing import preview OK button - Fix message mangled by et2 - Try to prevent session/request collection from destroying
This commit is contained in:
parent
71790459b2
commit
e6eda6ddc8
@ -296,6 +296,7 @@ abstract class importexport_basic_import_csv implements importexport_iface_impor
|
|||||||
|
|
||||||
// Get labels from wizard, if possible
|
// Get labels from wizard, if possible
|
||||||
$labels = array_combine($definition->plugin_options['field_mapping'], $definition->plugin_options['field_mapping']);
|
$labels = array_combine($definition->plugin_options['field_mapping'], $definition->plugin_options['field_mapping']);
|
||||||
|
|
||||||
$plugin = get_called_class();
|
$plugin = get_called_class();
|
||||||
$wizard_name = $definition->application . '_wizard_' . str_replace($definition->application . '_', '', $plugin);
|
$wizard_name = $definition->application . '_wizard_' . str_replace($definition->application . '_', '', $plugin);
|
||||||
try {
|
try {
|
||||||
|
@ -219,6 +219,7 @@ class importexport_definitions_ui
|
|||||||
'icon' => 'importexport/navbar',
|
'icon' => 'importexport/navbar',
|
||||||
'allowOnMultiple' => false,
|
'allowOnMultiple' => false,
|
||||||
'group' => $group,
|
'group' => $group,
|
||||||
|
'onExecute' => 'javaScript:app.importexport.run_definition'
|
||||||
),
|
),
|
||||||
'schedule' => array(
|
'schedule' => array(
|
||||||
'caption' => 'Schedule',
|
'caption' => 'Schedule',
|
||||||
|
@ -126,6 +126,8 @@
|
|||||||
$preview = $this->preview($plugin, $file, $definition_obj);
|
$preview = $this->preview($plugin, $file, $definition_obj);
|
||||||
if(trim($this->message) == '')
|
if(trim($this->message) == '')
|
||||||
{
|
{
|
||||||
|
// Clear first, to prevent request from being collected if the result is the same
|
||||||
|
$template->setElementAttribute('preview', 'value', '');
|
||||||
$template->setElementAttribute('preview', 'value', $preview);
|
$template->setElementAttribute('preview', 'value', $preview);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -205,7 +207,7 @@
|
|||||||
|
|
||||||
$sel_options = self::get_select_options($data);
|
$sel_options = self::get_select_options($data);
|
||||||
|
|
||||||
$data['msg'] = $this->message;
|
$data['message'] = $this->message;
|
||||||
$GLOBALS['egw']->js->validate_file('.','importexport','importexport');
|
$GLOBALS['egw']->js->validate_file('.','importexport','importexport');
|
||||||
|
|
||||||
if($_GET['appname']) $readonlys['appname'] = true;
|
if($_GET['appname']) $readonlys['appname'] = true;
|
||||||
|
@ -93,5 +93,26 @@ app.classes.importexport = AppJS.extend(
|
|||||||
.removeClass('loading');
|
.removeClass('loading');
|
||||||
},this));
|
},this));
|
||||||
return false;
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open a popup to run a given definition
|
||||||
|
*
|
||||||
|
* @param {egwAction} action
|
||||||
|
* @param {egwActionObject[]} selected
|
||||||
|
*/
|
||||||
|
run_definition: function(action, selected)
|
||||||
|
{
|
||||||
|
if(!selected || selected.length != 1) return;
|
||||||
|
|
||||||
|
var id = selected[0].id||null;
|
||||||
|
var data = egw.dataGetUIDdata(id).data;
|
||||||
|
if(!data || !data.type) return;
|
||||||
|
|
||||||
|
egw.open_link(egw.link('/index.php',{
|
||||||
|
menuaction: 'importexport.importexport_' + data.type + '_ui.' + data.type + '_dialog',
|
||||||
|
appname: data.application,
|
||||||
|
definition: data.definition_id
|
||||||
|
}), false, '850x440', app);
|
||||||
}
|
}
|
||||||
});
|
});
|
@ -8,8 +8,8 @@
|
|||||||
<column/>
|
<column/>
|
||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
<row disabled="!@msg">
|
<row disabled="!@message">
|
||||||
<html id="msg" span="all" class="message"/>
|
<html id="message" span="all" class="message"/>
|
||||||
<description/>
|
<description/>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
@ -38,8 +38,8 @@
|
|||||||
<file id="file"/>
|
<file id="file"/>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<box id="preview_box" readonly="true" span="all" class="preview">
|
<box id="preview_box" span="all" class="preview">
|
||||||
<html id="preview" readonly="true" class="content"/>
|
<html id="preview" class="content"/>
|
||||||
<box align="center" id="buttons">
|
<box align="center" id="buttons">
|
||||||
<buttononly align="center" label="OK" onclick="jQuery(this).parents('div.preview').css('display','none'); return false;"/>
|
<buttononly align="center" label="OK" onclick="jQuery(this).parents('div.preview').css('display','none'); return false;"/>
|
||||||
</box>
|
</box>
|
||||||
|
Loading…
Reference in New Issue
Block a user