forked from extern/egroupware
- 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
|
||||
$labels = array_combine($definition->plugin_options['field_mapping'], $definition->plugin_options['field_mapping']);
|
||||
|
||||
$plugin = get_called_class();
|
||||
$wizard_name = $definition->application . '_wizard_' . str_replace($definition->application . '_', '', $plugin);
|
||||
try {
|
||||
|
@ -219,6 +219,7 @@ class importexport_definitions_ui
|
||||
'icon' => 'importexport/navbar',
|
||||
'allowOnMultiple' => false,
|
||||
'group' => $group,
|
||||
'onExecute' => 'javaScript:app.importexport.run_definition'
|
||||
),
|
||||
'schedule' => array(
|
||||
'caption' => 'Schedule',
|
||||
|
@ -126,6 +126,8 @@
|
||||
$preview = $this->preview($plugin, $file, $definition_obj);
|
||||
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);
|
||||
return;
|
||||
}
|
||||
@ -205,7 +207,7 @@
|
||||
|
||||
$sel_options = self::get_select_options($data);
|
||||
|
||||
$data['msg'] = $this->message;
|
||||
$data['message'] = $this->message;
|
||||
$GLOBALS['egw']->js->validate_file('.','importexport','importexport');
|
||||
|
||||
if($_GET['appname']) $readonlys['appname'] = true;
|
||||
|
@ -93,5 +93,26 @@ app.classes.importexport = AppJS.extend(
|
||||
.removeClass('loading');
|
||||
},this));
|
||||
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/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row disabled="!@msg">
|
||||
<html id="msg" span="all" class="message"/>
|
||||
<row disabled="!@message">
|
||||
<html id="message" span="all" class="message"/>
|
||||
<description/>
|
||||
</row>
|
||||
<row>
|
||||
@ -38,8 +38,8 @@
|
||||
<file id="file"/>
|
||||
</row>
|
||||
<row>
|
||||
<box id="preview_box" readonly="true" span="all" class="preview">
|
||||
<html id="preview" readonly="true" class="content"/>
|
||||
<box id="preview_box" span="all" class="preview">
|
||||
<html id="preview" class="content"/>
|
||||
<box align="center" id="buttons">
|
||||
<buttononly align="center" label="OK" onclick="jQuery(this).parents('div.preview').css('display','none'); return false;"/>
|
||||
</box>
|
||||
|
Loading…
Reference in New Issue
Block a user