mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-12 08:58:25 +01:00
Add options tab to export dialog so user can change delimiter when exporting
This commit is contained in:
parent
41493e7c51
commit
a3ad2a0392
@ -133,6 +133,24 @@ class importexport_export_ui {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Delimiter
|
||||
$sel_options['delimiter'] = array(
|
||||
';' => ';',
|
||||
',' => ',',
|
||||
'\t' => 'Tab',
|
||||
' ' => 'Space',
|
||||
'|' => '|',
|
||||
'' => lang('Other')
|
||||
);
|
||||
if(!$sel_options['delimiter'][$content['delimiter']]) $sel_options['delimiter'][$content['delimiter']] = $content['delimiter'];
|
||||
$sel_options['delimiter'][$content['delimiter']] = lang('Use default') . ' "' . $sel_options['delimiter'][$content['delimiter']] . '"';
|
||||
|
||||
if(!$_content['delimiter']) $this->js->set_onload('jQuery(\'[other_delimiter]\').hide();');
|
||||
|
||||
// Other delimiter (options)
|
||||
if($_content['other_delimiter']) $_content['delimiter'] = $_content['other_delimiter'];
|
||||
|
||||
// handle selector
|
||||
if($selected_plugin) {
|
||||
$plugin_object = new $selected_plugin;
|
||||
@ -154,9 +172,6 @@ class importexport_export_ui {
|
||||
$content['plugin_options_template'] = $options;
|
||||
}
|
||||
}
|
||||
if(!$content['plugin_options_html'] && !$content['plugin_options_template']) {
|
||||
$readonlys[$tabs]['options_tab'] = true;
|
||||
}
|
||||
}
|
||||
|
||||
// fill selection tab
|
||||
@ -215,6 +230,7 @@ class importexport_export_ui {
|
||||
// disable preview box
|
||||
$this->js->set_onload("set_style_by_class('tr','preview-box','display','none');");
|
||||
|
||||
|
||||
//xajax_eT_wrapper submit
|
||||
if(class_exists('xajaxResponse'))
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* EGroupware - eTemplates for Application importexport
|
||||
* http://www.egroupware.org
|
||||
* generated by soetemplate::dump4setup() 2011-10-26 13:06
|
||||
* generated by soetemplate::dump4setup() 2011-10-31 13:03
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package importexport
|
||||
@ -85,7 +85,9 @@ $templ_data[] = array('name' => 'importexport.export_dialog.general_tab','templa
|
||||
|
||||
$templ_data[] = array('name' => 'importexport.export_dialog.general_tab_content','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:3:{s:2:"c2";s:14:"select_appname";s:2:"c3";s:17:"select_definition";s:2:"c4";s:13:"select_plugin";}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:18:"Select application";}s:1:"B";a:4:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:7:"appname";s:8:"onchange";i:1;}}i:3;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:17:"Select definition";}s:1:"B";a:4:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:10:"definition";s:8:"onchange";i:1;}}i:4;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:13:"Select plugin";}s:1:"B";a:4:{s:4:"type";s:6:"select";s:8:"onchange";i:1;s:7:"no_lang";s:1:"1";s:4:"name";s:6:"plugin";}}i:5;a:2:{s:1:"A";a:6:{s:4:"type";s:3:"box";s:4:"span";s:3:"all";s:4:"name";s:18:"plugin_description";s:6:"needed";s:1:"1";s:4:"size";s:1:"1";i:1;a:7:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:6:"needed";s:1:"1";i:1;a:4:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:6:"needed";s:1:"1";s:5:"label";s:11:"Description";}i:2;a:2:{s:4:"type";s:5:"label";s:4:"name";s:18:"plugin_description";}s:4:"name";s:11:"description";s:7:"no_lang";s:1:"1";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:5;s:4:"cols";i:2;}}','size' => '','style' => '','modified' => '1158223021',);
|
||||
|
||||
$templ_data[] = array('name' => 'importexport.export_dialog.options_tab','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:2:{s:2:"c1";s:4:",top";s:2:"h1";s:25:",@plugin_options_template";}i:1;a:1:{s:1:"A";a:3:{s:7:"no_lang";s:1:"1";s:4:"name";s:19:"plugin_options_html";s:4:"type";s:4:"html";}}i:2;a:1:{s:1:"A";a:2:{s:4:"type";s:8:"template";s:4:"name";s:24:"@plugin_options_template";}}}s:4:"cols";i:1;s:4:"rows";i:2;s:4:"size";s:6:",200px";}}','size' => ',200px','style' => '','modified' => '1286482130',);
|
||||
$templ_data[] = array('name' => 'importexport.export_dialog.options_tab','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:2:{s:2:"c2";s:4:",top";s:2:"h2";s:25:",@plugin_options_template";}i:1;a:1:{s:1:"A";a:6:{s:4:"type";s:4:"grid";s:4:"span";s:3:"all";s:7:"options";a:0:{}s:4:"data";a:2:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"Delimiter";}s:1:"B";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";s:7:"no_lang";s:1:"1";i:1;a:4:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:9:"delimiter";s:8:"onchange";s:158:"var _this = jQuery(this); var text = _this.parent().parent().find(\'input\'); if(_this.val() ==\'\') {text.val(\'\');text.show(); text.focus();} else {text.hide();}";}i:2;a:4:{s:4:"type";s:4:"text";s:4:"name";s:15:"other_delimiter";s:4:"size";s:1:"2";s:4:"span";s:5:",hide";}}}}s:4:"rows";i:1;s:4:"cols";i:2;}}i:2;a:1:{s:1:"A";a:3:{s:7:"no_lang";s:1:"1";s:4:"name";s:19:"plugin_options_html";s:4:"type";s:4:"html";}}i:3;a:1:{s:1:"A";a:2:{s:4:"type";s:8:"template";s:4:"name";s:24:"@plugin_options_template";}}}s:4:"cols";i:1;s:4:"rows";i:3;s:4:"size";s:6:",200px";}}','size' => ',200px','style' => '.hide input {
|
||||
display: none;
|
||||
}','modified' => '1286482130',);
|
||||
|
||||
$templ_data[] = array('name' => 'importexport.export_dialog.selection_tab','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:2:{s:2:"c1";s:4:",top";s:2:"h1";s:27:",@plugin_selectors_template";}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:4:"html";s:4:"name";s:21:"plugin_selectors_html";s:7:"no_lang";s:1:"1";}}i:2;a:1:{s:1:"A";a:2:{s:4:"type";s:8:"template";s:4:"name";s:26:"@plugin_selectors_template";}}}s:4:"rows";i:2;s:4:"cols";i:1;s:4:"size";s:6:",200px";s:7:"options";a:1:{i:1;s:5:"200px";}}}','size' => ',200px','style' => '','modified' => '1158223796',);
|
||||
|
||||
|
@ -14,24 +14,24 @@
|
||||
<row class="select_appname">
|
||||
<description value="Select application"/>
|
||||
<menulist>
|
||||
<menupopup no_lang="1" id="appname" onchange="1"/>
|
||||
<menupopup id="appname" no_lang="1" onchange="1"/>
|
||||
</menulist>
|
||||
</row>
|
||||
<row class="select_definition">
|
||||
<description value="Select definition"/>
|
||||
<menulist>
|
||||
<menupopup no_lang="1" id="definition" onchange="1"/>
|
||||
<menupopup id="definition" no_lang="1" onchange="1"/>
|
||||
</menulist>
|
||||
</row>
|
||||
<row class="select_plugin">
|
||||
<description value="Select plugin"/>
|
||||
<menulist>
|
||||
<menupopup onchange="1" no_lang="1" id="plugin"/>
|
||||
<menupopup id="plugin" no_lang="1" onchange="1"/>
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<box span="all" id="plugin_description" needed="1">
|
||||
<description span="all" needed="1" id="description" no_lang="1"/>
|
||||
<box id="plugin_description" needed="1" span="all">
|
||||
<description id="description" needed="1" no_lang="1" span="all"/>
|
||||
</box>
|
||||
</row>
|
||||
</rows>
|
||||
@ -72,14 +72,38 @@
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<description value="Delimiter"/>
|
||||
<hbox no_lang="1">
|
||||
<menulist>
|
||||
<menupopup id="delimiter" no_lang="1" onchange="var _this = jQuery(this); var text = _this.parent().parent().find('input'); if(_this.val() =='') {text.val('');text.show(); text.focus();} else {text.hide();}"/>
|
||||
</menulist>
|
||||
<textbox id="other_delimiter" size="2" class="hide"/>
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</row>
|
||||
<row valign="top" disabled="@plugin_options_template">
|
||||
<html no_lang="1" id="plugin_options_html"/>
|
||||
<html id="plugin_options_html" no_lang="1"/>
|
||||
</row>
|
||||
<row>
|
||||
<template id="@plugin_options_template"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<styles>
|
||||
.hide input {
|
||||
display: none;
|
||||
}
|
||||
</styles>
|
||||
</template>
|
||||
<template id="importexport.export_dialog" template="" lang="" group="0" version="1.9.001">
|
||||
<grid width="100%">
|
||||
@ -93,9 +117,9 @@
|
||||
<row>
|
||||
<tabbox id="general_tab|selection_tab|options_tab">
|
||||
<tabs>
|
||||
<tab label="General" statustext=""/>
|
||||
<tab label="Selection" statustext=""/>
|
||||
<tab label="Options" statustext=""/>
|
||||
<tab id="general_tab" label="General"/>
|
||||
<tab id="selection_tab" label="Selection"/>
|
||||
<tab id="options_tab" label="Options"/>
|
||||
</tabs>
|
||||
<tabpanels>
|
||||
<template id="importexport.export_dialog.general_tab"/>
|
||||
@ -113,7 +137,7 @@
|
||||
<button label="Export" id="export" onclick="xajax_eT_wrapper(this);return false;"/>
|
||||
<button label="Preview" id="preview" onclick="xajax_eT_wrapper(this);return false;"/>
|
||||
</hbox>
|
||||
<button label="Cancel" align="right" id="cancel" onclick="window.close(); return false;"/>
|
||||
<button align="right" label="Cancel" id="cancel" onclick="window.close(); return false;"/>
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
@ -122,8 +146,8 @@
|
||||
</box>
|
||||
</row>
|
||||
<row>
|
||||
<box class="preview-box-buttons" id="preview-box-buttons" needed="1" align="center">
|
||||
<button label="OK" align="center" onclick="document.getElementById(form::name('preview-box')).style.display='none'; document.getElementById(form::name('preview-box-buttons')).style.display='none'; return false;"/>
|
||||
<box align="center" id="preview-box-buttons" needed="1" class="preview-box-buttons">
|
||||
<button align="center" label="OK" onclick="document.getElementById(form::name('preview-box')).style.display='none'; document.getElementById(form::name('preview-box-buttons')).style.display='none'; return false;"/>
|
||||
</box>
|
||||
</row>
|
||||
</rows>
|
||||
|
Loading…
Reference in New Issue
Block a user