mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
changed export ui to be focused on definitions
This commit is contained in:
parent
19127495f3
commit
2b3ce8669b
@ -99,6 +99,10 @@ class bodefinitions {
|
||||
public function delete($keys)
|
||||
{
|
||||
$this->so_sql->delete(array('definition_id' => $keys));
|
||||
// clear private cach
|
||||
foreach ($keys as $key) {
|
||||
unset($this->definitions[array_search($key,$this->definitions)]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -161,7 +165,7 @@ class bodefinitions {
|
||||
{
|
||||
$export_data = array('metainfo' => array(
|
||||
'type' => 'importexport definitions',
|
||||
'charset' => 'bal',
|
||||
'charset' => $GLOBALS['egw']->translation->charset(),
|
||||
'entries' => count($keys),
|
||||
));
|
||||
|
||||
@ -184,6 +188,7 @@ class bodefinitions {
|
||||
|
||||
public function import($import_file)
|
||||
{
|
||||
// read given file and check if its a valid definition
|
||||
if (!is_file($import_file['tmp_name'])) return false;
|
||||
$f = fopen($import_file['tmp_name'],'r');
|
||||
$data = fread($f,100000);
|
||||
@ -192,14 +197,12 @@ class bodefinitions {
|
||||
$metainfo = $data['metainfo'];
|
||||
unset($data['metainfo']);
|
||||
|
||||
// convert charset into internal used charset
|
||||
$data = $GLOBALS['egw']->translation->convert($data,$metainfo['charset'],$GLOBALS['egw']->translation->charset());
|
||||
|
||||
// save definition(s) into internal table
|
||||
foreach ($data as $name => $definition)
|
||||
{
|
||||
error_log(print_r($definition,true));
|
||||
//if (($ext = $this->search(array('name' => $name),'definition_id')) !== false)
|
||||
//{
|
||||
// error_log(print_r($ext,true));
|
||||
// $definition['definition_id'] = $ext[0]['definition_id'];
|
||||
//}
|
||||
$this->save($definition);
|
||||
}
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ class definition implements iface_egw_record {
|
||||
'allowed_users' => 'array',
|
||||
'options' => 'array',
|
||||
'owner' => 'int',
|
||||
'description' => 'string',
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -13,6 +13,7 @@
|
||||
require_once('class.iface_export_record.inc.php');
|
||||
require_once('class.import_export_helper_functions.inc.php');
|
||||
require_once('class.iface_egw_record.inc.php');
|
||||
require_once(EGW_INCLUDE_ROOT. '/phpgwapi/inc/class.translation.inc.php');
|
||||
|
||||
/**
|
||||
* class export_csv
|
||||
@ -90,7 +91,10 @@ class export_csv implements iface_export_record
|
||||
* @access public
|
||||
*/
|
||||
public function __construct( $_handle, $_charset, array $_options=array() ) {
|
||||
$this->translation &= $GLOBALS['egw']->translation;
|
||||
if (!is_object($GLOBALS['egw']->translation)) {
|
||||
$GLOBALS['egw']->translation = new translation();
|
||||
}
|
||||
$this->translation = &$GLOBALS['egw']->translation;
|
||||
$this->handle = $_handle;
|
||||
$this->csv_charset = $_charset;
|
||||
if (!empty($_options)) {
|
||||
@ -108,7 +112,7 @@ class export_csv implements iface_export_record
|
||||
throw new Exception('Error: Field mapping can\'t be set during ongoing export!');
|
||||
}
|
||||
foreach ($_mapping as $egw_filed => $csv_field) {
|
||||
$this->mapping[$egw_filed] = $this->translation->convert($csv_field, $this->csv_charset);
|
||||
$this->mapping[$egw_filed] = $this->translation->convert($csv_field, $this->translation->charset(), $this->csv_charset);
|
||||
}
|
||||
}
|
||||
|
||||
@ -136,6 +140,9 @@ class export_csv implements iface_export_record
|
||||
$this->mapping = array_combine(array_keys($record_data),array_keys($record_data));
|
||||
}
|
||||
|
||||
// just for debug...
|
||||
$this->mapping = $this->translation->convert($this->mapping, 'utf-8', 'iso-8859-1');//$this->translation->charset());
|
||||
|
||||
if ($this->num_of_records == 0 && $this->csv_options['begin_with_fieldnames'] && !empty($this->mapping)) {
|
||||
fputcsv($this->handle,array_values($this->mapping),$this->csv_options['delimiter'],$this->csv_options['enclosure']);
|
||||
}
|
||||
@ -145,6 +152,9 @@ class export_csv implements iface_export_record
|
||||
$record_data[$egw_field] = import_export_helper_functions::conversion($record_data,$this->conversion);
|
||||
}
|
||||
|
||||
// do charset translation
|
||||
$record_data = $this->translation->convert($record_data, $this->translation->charset(), $this->csv_charset);
|
||||
|
||||
// do fieldmapping
|
||||
foreach ($this->mapping as $egw_field => $csv_field) {
|
||||
$this->record[$csv_field] = $record_data[$egw_field];
|
||||
|
@ -21,7 +21,7 @@
|
||||
* to attend the importexport framwork with your export.
|
||||
*
|
||||
* NOTE: This is an easy interface, cause plugins live in theire own
|
||||
* space. Means that they are respnsible for generationg a defintion AND
|
||||
* space. Means that they are responsible for generating a defintion AND
|
||||
* working on that definition.
|
||||
* So this interface just garanties the interaction with userinterfaces. It
|
||||
* has nothing to do with datatypes.
|
||||
@ -78,7 +78,6 @@ interface iface_export_plugin {
|
||||
* preserv => array,
|
||||
* )
|
||||
*/
|
||||
|
||||
public static function get_options_etpl();
|
||||
|
||||
/**
|
||||
|
@ -27,12 +27,8 @@ class import_export_helper_functions
|
||||
|
||||
/**
|
||||
* nothing to construct here, only static functions!
|
||||
*
|
||||
* @return bool false
|
||||
*/
|
||||
public function __construct() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* converts accound_lid to account_id
|
||||
*
|
||||
@ -154,6 +150,7 @@ class import_export_helper_functions
|
||||
* @return bool
|
||||
* @static
|
||||
* @access public
|
||||
* @todo replace this function with a function dealing with reg expressions!
|
||||
*/
|
||||
public static function conversion( $_record, $_conversion ) {
|
||||
|
||||
|
@ -40,6 +40,7 @@ class uiexport {
|
||||
|
||||
public function __construct() {
|
||||
$this->js = $GLOBALS['egw']->js = is_object($GLOBALS['egw']->js) ? $GLOBALS['egw']->js : CreateObject('phpgwapi.javascript');
|
||||
$this->js->validate_file('.','export_dialog','importexport');
|
||||
$this->user = $GLOBALS['egw_info']['user']['user_id'];
|
||||
$this->export_plugins = import_export_helper_functions::get_plugins('all','export');
|
||||
$GLOBALS['egw_info']['flags']['include_xajax'] = true;
|
||||
@ -47,7 +48,7 @@ class uiexport {
|
||||
}
|
||||
|
||||
public function export_dialog($_content=array()) {
|
||||
$tabs = 'general_tab|selection_tab|options_tab|templates_tab';
|
||||
$tabs = 'general_tab|selection_tab|options_tab';
|
||||
$content = array();
|
||||
$sel_options = array();
|
||||
$readonlys = array();
|
||||
@ -56,38 +57,76 @@ class uiexport {
|
||||
if(empty($_content)) {
|
||||
$et = new etemplate(self::_appname. '.export_dialog');
|
||||
$_appname = $_GET['appname'];
|
||||
$_plugin = $_GET['plugin'];
|
||||
$_definition =$_GET['definition'];
|
||||
$_plugin = $_GET['plugin']; // NOTE: definition _must_ be 'expert' if for plugin to be used!
|
||||
$_selection = $_GET['selection'];
|
||||
|
||||
// if appname is given and valid, list available plugins (if no plugin is given)
|
||||
// if appname is given and valid, list available definitions (if no definition is given)
|
||||
if (!empty($_appname) && $GLOBALS['egw']->acl->check('run',1,$_appname)) {
|
||||
$content['appname'] = $_appname;
|
||||
$preserv['appname'] = $_appname;
|
||||
$readonlys['appname'] = true;
|
||||
$this->js->set_onload("set_style_by_class('tr','select_appname','display','none');");
|
||||
|
||||
(array)$plugins = $this->export_plugins[$_appname]['export'];
|
||||
if(isset($plugins[$_plugin])) {
|
||||
// fill definitions
|
||||
$sel_options['definition'] = array();
|
||||
$definitions = new bodefinitions(array(
|
||||
'type' => 'export',
|
||||
'application' => isset($content['appname']) ? $content['appname'] : '%'
|
||||
));
|
||||
foreach ((array)$definitions->get_definitions() as $identifier) {
|
||||
$definition = new definition($identifier);
|
||||
if ($title = $definition->get_title()) {
|
||||
$sel_options['definition'][$title] = $title;
|
||||
}
|
||||
unset($definition);
|
||||
}
|
||||
unset($definitions);
|
||||
$sel_options['definition']['expert'] = lang('Expert options');
|
||||
|
||||
if(isset($_definition) && array_key_exists($_definition,$sel_options[$_definition])) {
|
||||
$content['definition'] = $_definition;
|
||||
}
|
||||
else {
|
||||
$defdescs = array_keys($sel_options['definition']);
|
||||
$content['definition'] = $sel_options['definition'][$defdescs[0]];
|
||||
unset($defdescs);
|
||||
}
|
||||
|
||||
// fill plugins
|
||||
$sel_options['plugin'] = $this->export_plugins[$_appname]['export'];
|
||||
|
||||
// show definitions or plugins in ui?
|
||||
if($content['defintion'] == 'expert') {
|
||||
if(isset($_plugin) && array_key_exists($_plugin,$sel_options['plugin'])) {
|
||||
$content['plugin'] = $_plugin;
|
||||
$selected_plugin = $_plugin;
|
||||
$this->js->set_onload("set_style_by_class('tr','select_plugin','display','none');");
|
||||
}
|
||||
else {
|
||||
$plugins_classnames = array_keys($plugins);
|
||||
$selected_plugin = $plugins_classnames[0];
|
||||
$sel_options['plugin'] = $plugins;
|
||||
}
|
||||
$this->js->set_onload("set_style_by_class('tr','select_definition','display','none');");
|
||||
}
|
||||
else {
|
||||
$this->js->set_onload("set_style_by_class('tr','select_plugin','display','none');");
|
||||
$this->js->set_onload("set_style_by_class('tr','save_definition','display','none');");
|
||||
|
||||
if (!empty($selected_plugin)) {
|
||||
$plugin_object = new $selected_plugin;
|
||||
$definition = new definition($content['definition']);
|
||||
$content['description'] = $definition->description;
|
||||
}
|
||||
|
||||
$content['plugin_description'] = $plugin_object->get_description();
|
||||
// handle selector
|
||||
//$plugin_object = new $selected_plugin;
|
||||
|
||||
//$content['description'] = $plugin_object->get_description();
|
||||
|
||||
// fill options tab
|
||||
// TODO: do we need all options templates online?
|
||||
// NO, we can manipulate the session array of template id on xajax request
|
||||
// however, there might be other solutions... we solve this in 1.3
|
||||
$content['plugin_options_html'] = $plugin_object->get_options_etpl();
|
||||
//$content['plugin_options_html'] = $plugin_object->get_options_etpl();
|
||||
|
||||
// fill selection tab
|
||||
if ($_selection) {
|
||||
@ -99,10 +138,9 @@ class uiexport {
|
||||
// ToDo: I need to think abaout it...
|
||||
// are selectors abstracted in the iface_egw_record_entity ?
|
||||
// if so, we might not want to have html here ?
|
||||
$content['plugin_selectors_html'] = $plugin_object->get_selectors_html();
|
||||
}
|
||||
unset ($plugin_object);
|
||||
//$content['plugin_selectors_html'] = $plugin_object->get_selectors_html();
|
||||
}
|
||||
//unset ($plugin_object);
|
||||
}
|
||||
// if no appname is supplied, list apps which can export
|
||||
else {
|
||||
@ -120,23 +158,6 @@ class uiexport {
|
||||
");
|
||||
}
|
||||
|
||||
// fill templates_tab
|
||||
$sel_options['templates'] = array();
|
||||
$definitions = new bodefinitions(array(
|
||||
'type' => 'export',
|
||||
'application' => isset($content['appname']) ? $content['appname'] : '%'
|
||||
));
|
||||
foreach ((array)$definitions->get_definitions() as $identifier) {
|
||||
$definition = new definition($identifier);
|
||||
if ($title = $definition->get_title()) {
|
||||
$sel_options['templates'][$title] = $title;
|
||||
}
|
||||
unset($definition);
|
||||
}
|
||||
unset($definitions);
|
||||
if (empty($sel_options['templates'])) {
|
||||
$readonlys[$tabs]['templates_tab'] = true;
|
||||
}
|
||||
// disable preview box
|
||||
$this->js->set_onload("set_style_by_class('tr','preview-box','display','none');");
|
||||
}
|
||||
@ -146,6 +167,7 @@ class uiexport {
|
||||
//error_log(__LINE__.__FILE__.'$_content: '.print_r($_content,true));
|
||||
$response =& new xajaxResponse();
|
||||
|
||||
if ($_content['defintion'] == 'expert') {
|
||||
$definition = new definition();
|
||||
$definition->definition_id = $_content['definition_id'] ? $_content['definition_id'] : '';
|
||||
$definition->name = $_content['name'] ? $_content['name'] : '';
|
||||
@ -154,17 +176,27 @@ class uiexport {
|
||||
$definition->type = 'export';
|
||||
$definition->allowed_users = $_content['allowed_users'] ? $_content['allowed_users'] : $this->user;
|
||||
$definition->owner = $_content['owner'] ? $_content['owner'] : $this->user;
|
||||
}
|
||||
else {
|
||||
$definition = new definition($_content['definition']);
|
||||
}
|
||||
|
||||
if (isset($definition->options['selection'])) {
|
||||
//$definition->options = parse(...)
|
||||
$definition->options = array(
|
||||
'selection' => $_content['selection'],
|
||||
}
|
||||
else {
|
||||
$definition->options = array_merge(
|
||||
$definition->options,
|
||||
array('selection' => $_content['selection'])
|
||||
);
|
||||
}
|
||||
|
||||
$tmpfname = tempnam('/tmp','export');
|
||||
$file = fopen($tmpfname, "w+");
|
||||
if (! $charset = $definition->options['charset']) {
|
||||
$charset = $GLOBALS['egw']->translation->charset();
|
||||
}
|
||||
$plugin_object = new $_content['plugin'];
|
||||
$plugin_object = new $definition->plugin;
|
||||
$plugin_object->export($file, $charset, $definition);
|
||||
|
||||
if($_content['export'] == 'pressed') {
|
||||
@ -190,6 +222,7 @@ class uiexport {
|
||||
|
||||
fclose($file);
|
||||
unlink($tmpfname);
|
||||
$preview = $GLOBALS['egw']->translation->convert($preview,'iso-8859-1','utf-8');
|
||||
$response->addAssign('exec[preview-box]','innerHTML',$preview);
|
||||
$response->addAssign('divPoweredBy','style.display','none');
|
||||
$response->addAssign('exec[preview-box]','style.display','inline');
|
||||
|
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* eGroupWare - eTemplates for Application importexport
|
||||
* http://www.egroupware.org
|
||||
* generated by soetemplate::dump4setup() 2006-11-10 16:25
|
||||
* generated by soetemplate::dump4setup() 2006-11-16 12:03
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package importexport
|
||||
@ -14,7 +14,7 @@ $templ_version=1;
|
||||
|
||||
$templ_data[] = array('name' => 'importexport.definition_index','template' => '','lang' => '','group' => '0','version' => '0.0.1','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:1:{s:2:"h1";s:6:",!@msg";}i:1;a:1:{s:1:"A";a:4:{s:4:"span";s:13:"all,redItalic";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";s:4:"type";s:5:"label";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:2:{s:2:"c1";s:2:"th";s:2:"c2";s:7:"row,top";}i:1;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:4:"Type";s:4:"span";s:11:",lr_padding";}s:1:"B";a:3:{s:4:"type";s:5:"label";s:5:"label";s:4:"Name";s:4:"span";s:11:",lr_padding";}s:1:"C";a:3:{s:4:"type";s:5:"label";s:5:"label";s:11:"Application";s:4:"span";s:11:",lr_padding";}s:1:"D";a:4:{s:5:"align";s:6:"center";s:4:"type";s:5:"label";s:5:"label";s:13:"Allowed users";s:4:"span";s:11:",lr_padding";}s:1:"E";a:5:{s:5:"label";s:3:"Add";s:5:"align";s:6:"center";s:4:"type";s:6:"button";s:4:"span";s:11:",lr_padding";s:7:"onclick";s:213:"window.open(egw::link(\'/index.php\',\'menuaction=importexport.uidefinitions.wizzard\'),\'\',\'dependent=yes,width=400,height=400,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false; return false;";}s:1:"F";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:6:{s:5:"label";s:6:"Delete";s:4:"name";s:15:"delete_selected";s:4:"type";s:6:"button";s:4:"help";s:31:"delete ALL selected definitions";s:4:"size";s:6:"delete";s:7:"onclick";s:65:"return confirm(\'Do you really want to DELETE this definitions?\');";}i:2;a:5:{s:5:"label";s:6:"Export";s:4:"name";s:15:"export_selected";s:4:"type";s:6:"button";s:4:"help";s:31:"export ALL selected definitions";s:4:"size";s:10:"fileexport";}}}i:2;a:6:{s:1:"A";a:4:{s:7:"no_lang";s:1:"1";s:4:"type";s:5:"image";s:4:"span";s:11:",lr_padding";s:4:"name";s:12:"${row}[type]";}s:1:"B";a:4:{s:7:"no_lang";s:1:"1";s:4:"name";s:12:"${row}[name]";s:4:"type";s:5:"label";s:4:"span";s:11:",lr_padding";}s:1:"C";a:4:{s:7:"no_lang";s:1:"1";s:4:"name";s:19:"${row}[application]";s:4:"type";s:5:"label";s:4:"span";s:11:",lr_padding";}s:1:"D";a:6:{s:7:"no_lang";s:1:"1";s:4:"type";s:14:"select-account";s:4:"span";s:11:",lr_padding";s:8:"readonly";s:1:"1";s:4:"name";s:21:"${row}[allowed_users]";s:4:"size";s:1:"5";}s:1:"E";a:5:{s:5:"align";s:6:"center";s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:5:"label";s:4:"Edit";s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:7:"onclick";s:237:"window.open(egw::link(\'/index.php\',\'menuaction=importexport.uidefinitions.edit&definition=$row_cont[name]\'),\'\',\'dependent=yes,width=400,height=400,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false; return false;";}i:2;a:6:{s:5:"label";s:6:"Delete";s:7:"onclick";s:41:"return confirm(\'Delete this definition\');";s:4:"name";s:32:"delete[$row_cont[definition_id]]";s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:4:"help";s:21:"Delete this eTemplate";}}s:1:"F";a:4:{s:5:"align";s:6:"center";s:4:"name";s:34:"selected[$row_cont[definition_id]]";s:4:"type";s:8:"checkbox";s:4:"help";s:34:"select this eTemplate to delete it";}}}s:4:"cols";i:6;s:4:"rows";i:2;}}}s:4:"cols";i:1;s:4:"rows";i:2;s:4:"size";s:4:"100%";}}','size' => '100%','style' => '.redItalic { color:red; font-style:italic;} td.lr_padding { padding-left: 5px; padding-right: 5px; }','modified' => '1145972373',);
|
||||
|
||||
$templ_data[] = array('name' => 'importexport.export_dialog','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"name";s:3:"msg";}}i:2;a:1:{s:1:"A";a:3:{s:4:"type";s:3:"tab";s:5:"label";s:35:"General|Selection|Options|Templates";s:4:"name";s:51:"general_tab|selection_tab|options_tab|templates_tab";}}i:3;a:1:{s:1:"A";a:3:{s:4:"type";s:8:"checkbox";s:5:"label";s:16:"Save as template";s:4:"name";s:16:"save_as_template";}}i:4;a:1:{s:1:"A";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";s:4:"span";s:3:"all";i:1;a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Export";s:4:"name";s:6:"export";s:7:"onclick";s:36:"xajax_eT_wrapper(this);return false;";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:7:"Preview";s:4:"name";s:7:"preview";s:7:"onclick";s:36:"xajax_eT_wrapper(this);return false;";}}i:2;a:5:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:5:"align";s:5:"right";s:4:"name";s:6:"cancel";s:7:"onclick";s:29:"window.close(); return false;";}}}i:5;a:1:{s:1:"A";a:6:{s:4:"type";s:3:"box";s:4:"size";s:1:"1";s:4:"name";s:11:"preview-box";s:6:"needed";s:1:"1";i:1;a:1:{s:4:"type";s:5:"label";}s:4:"span";s:12:",preview-box";}}i:6;a:1:{s:1:"A";a:7:{s:4:"type";s:3:"box";s:4:"size";s:1:"1";s:4:"span";s:20:",preview-box-buttons";s:4:"name";s:19:"preview-box-buttons";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:2:"OK";s:5:"align";s:6:"center";s:7:"onclick";s:230:"document.getElementById(\'divPoweredBy\').style.display=\'block\'; document.getElementById(form::name(\'preview-box\')).style.display=\'none\'; document.getElementById(form::name(\'preview-box-buttons\')).style.display=\'none\'; return false;";}s:6:"needed";s:1:"1";s:5:"align";s:6:"center";}}}s:4:"rows";i:6;s:4:"cols";i:1;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '.preview-box {
|
||||
$templ_data[] = array('name' => 'importexport.export_dialog','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:1:{s:2:"c3";s:15:"save_definition";}i:1;a:1:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"name";s:3:"msg";}}i:2;a:1:{s:1:"A";a:3:{s:4:"type";s:3:"tab";s:5:"label";s:25:"General|Selection|Options";s:4:"name";s:37:"general_tab|selection_tab|options_tab";}}i:3;a:1:{s:1:"A";a:3:{s:4:"type";s:8:"checkbox";s:5:"label";s:18:"Save as definition";s:4:"name";s:18:"save_as_definition";}}i:4;a:1:{s:1:"A";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";s:4:"span";s:3:"all";i:1;a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Export";s:4:"name";s:6:"export";s:7:"onclick";s:36:"xajax_eT_wrapper(this);return false;";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:7:"Preview";s:4:"name";s:7:"preview";s:7:"onclick";s:36:"xajax_eT_wrapper(this);return false;";}}i:2;a:5:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:5:"align";s:5:"right";s:4:"name";s:6:"cancel";s:7:"onclick";s:29:"window.close(); return false;";}}}i:5;a:1:{s:1:"A";a:6:{s:4:"type";s:3:"box";s:4:"size";s:1:"1";s:4:"name";s:11:"preview-box";s:6:"needed";s:1:"1";i:1;a:1:{s:4:"type";s:5:"label";}s:4:"span";s:12:",preview-box";}}i:6;a:1:{s:1:"A";a:7:{s:4:"type";s:3:"box";s:4:"size";s:1:"1";s:4:"span";s:20:",preview-box-buttons";s:4:"name";s:19:"preview-box-buttons";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:2:"OK";s:5:"align";s:6:"center";s:7:"onclick";s:230:"document.getElementById(\'divPoweredBy\').style.display=\'block\'; document.getElementById(form::name(\'preview-box\')).style.display=\'none\'; document.getElementById(form::name(\'preview-box-buttons\')).style.display=\'none\'; return false;";}s:6:"needed";s:1:"1";s:5:"align";s:6:"center";}}}s:4:"rows";i:6;s:4:"cols";i:1;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '.preview-box {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
@ -38,14 +38,12 @@ $templ_data[] = array('name' => 'importexport.export_dialog','template' => '','l
|
||||
|
||||
$templ_data[] = array('name' => 'importexport.export_dialog.general_tab','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:1:{s:2:"c1";s:4:",top";}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"image";s:4:"name";s:6:"export";}s:1:"B";a:2:{s:4:"type";s:8:"template";s:4:"name";s:46:"importexport.export_dialog.general_tab_content";}}}s:4:"rows";i:1;s:4:"cols";i:2;s:4:"size";s:6:",200px";s:7:"options";a:1:{i:1;s:5:"200px";}}}','size' => ',200px','style' => '','modified' => '1158223670',);
|
||||
|
||||
$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:5:{i:0;a:2:{s:2:"c2";s:14:"select_appname";s:2:"c3";s:13:"select_plugin";}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:5:"label";s:14:"some nice text";}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";s:69:"xajax_doXMLHTTP(\'importexport.uiexport.ajax_get_plugins\',this.value);";}}i:3;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:13:"Select format";}s:1:"B";a:4:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:6:"plugin";s:8:"onchange";s:76:"xajax_doXMLHTTP(\'importexport.uiexport.ajax_get_plugin_options\',this.value);";}}i:4;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:18:"plugin_description";s:7:"no_lang";s:1:"1";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:4;s:4:"cols";i:2;}}','size' => '','style' => '','modified' => '1158223021',);
|
||||
$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:3:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:5:"label";s:14:"some nice text";}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";s:69:"xajax_doXMLHTTP(\'importexport.uiexport.ajax_get_plugins\',this.value);";}}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";s:52:"export_dialog.change_definition(this); return false;";}}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";s:80:"xajax_doXMLHTTP(\'importexport.uiexport.ajax_get_definition_options\',this.value);";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:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:1:{s:2:"c1";s:4:",top";}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:4:"html";s:4:"name";s:19:"plugin_options_html";s:7:"no_lang";s:1:"1";}}}s:4:"rows";i:1;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' => '1158223824',);
|
||||
|
||||
$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:2:{i:0;a:1:{s:2:"c1";s:4:",top";}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";}}}s:4:"rows";i:1;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',);
|
||||
|
||||
$templ_data[] = array('name' => 'importexport.export_dialog.templates_tab','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:17:"Select a template";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:9:"templates";s:4:"size";s:1:"5";}}i:3;a:1:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:11:"Description";}}i:4;a:1:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"name";s:11:"description";}}i:5;a:1:{s:1:"A";a:3:{s:4:"type";s:6:"button";s:5:"label";s:4:"Load";s:4:"name";s:4:"load";}}}s:4:"rows";i:5;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' => '1158223945',);
|
||||
|
||||
$templ_data[] = array('name' => 'importexport.import_definition','template' => '','lang' => '','group' => '0','version' => '0.0.1','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:92:"Import definitions (Attension: Existing definitions with equal names will be overwritten!!!)";}}i:2;a:1:{s:1:"A";a:2:{s:4:"type";s:4:"file";s:4:"name";s:11:"import_file";}}i:3;a:1:{s:1:"A";a:3:{s:4:"type";s:6:"button";s:5:"label";s:6:"Import";s:4:"name";s:6:"import";}}}s:4:"rows";i:3;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1150533844',);
|
||||
|
||||
$templ_data[] = array('name' => 'importexport.wizzardbox','template' => '','lang' => '','group' => '0','version' => '0.0.1','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:3:{s:2:"c2";s:7:",bottom";s:2:"c1";s:4:",top";s:1:"A";s:4:"100%";}i:1;a:1:{s:1:"A";a:5:{s:4:"type";s:4:"hbox";s:7:"no_lang";s:1:"1";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:4:"hbox";s:7:"no_lang";s:1:"1";s:4:"size";s:1:"1";i:1;a:3:{s:4:"type";s:5:"image";s:7:"no_lang";s:1:"1";s:4:"name";s:12:"importexport";}}i:2;a:4:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"1";i:1;a:2:{s:4:"type";s:8:"template";s:4:"name";s:15:"wizzard_content";}s:4:"span";s:16:",wizzard_content";}}}i:2;a:1:{s:1:"A";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";s:4:"span";s:3:"all";i:1;a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:4:{s:4:"type";s:6:"button";s:4:"name";s:16:"button[previous]";s:5:"label";s:8:"previous";s:7:"onclick";s:37:"xajax_eT_wrapper(this); return false;";}i:2;a:4:{s:4:"type";s:6:"button";s:4:"name";s:12:"button[next]";s:5:"label";s:4:"next";s:7:"onclick";s:37:"xajax_eT_wrapper(this); return false;";}i:3;a:4:{s:4:"type";s:6:"button";s:4:"name";s:14:"button[finish]";s:5:"label";s:6:"finish";s:7:"onclick";s:37:"xajax_eT_wrapper(this); return false;";}}i:2;a:5:{s:4:"type";s:6:"button";s:4:"name";s:14:"button[cancel]";s:5:"label";s:6:"cancel";s:7:"onclick";s:29:"window.close(); return false;";s:5:"align";s:5:"right";}s:5:"align";s:5:"right";}}}s:4:"rows";i:2;s:4:"cols";i:1;s:4:"size";s:4:",400";s:7:"options";a:1:{i:1;s:3:"400";}}}','size' => ',400','style' => '.wizzard_content fieldset {
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
$setup_info['importexport']['name'] = 'importexport';
|
||||
$setup_info['importexport']['version'] = '0.002';
|
||||
$setup_info['importexport']['version'] = '0.003';
|
||||
$setup_info['importexport']['app_order'] = 2;
|
||||
$setup_info['importexport']['enable'] = 2;
|
||||
$setup_info['importexport']['tables'] = array('egw_importexport_definitions');
|
||||
@ -44,3 +44,4 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -23,7 +23,8 @@
|
||||
'type' => array('type' => 'varchar','precision' => '20'),
|
||||
'allowed_users' => array('type' => 'varchar','precision' => '255'),
|
||||
'plugin_options' => array('type' => 'longtext'),
|
||||
'owner' => array('type' => 'int','precision' => '20')
|
||||
'owner' => array('type' => 'int','precision' => '20'),
|
||||
'description' => array('type' => 'varchar','precision' => '255')
|
||||
),
|
||||
'pk' => array('definition_id'),
|
||||
'fk' => array(),
|
||||
|
Loading…
Reference in New Issue
Block a user