mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 17:33:49 +01:00
own template to edit grids: has now separate fields and helptexts for the diverse values comulated in size/options
This commit is contained in:
parent
c59b7c4aca
commit
0793450251
@ -1068,6 +1068,20 @@
|
||||
{
|
||||
$path = $content['goto'] ? $content['goto'] : ($content['goto2'] ? $content['goto2'] : $content['path']);
|
||||
$Ok = $this->etemplate->read($content['name'],$content['template'],$content['lang'],0,$content['goto'] || $content['goto2'] ? $content['version'] : $content['old_version']);
|
||||
|
||||
// build size from options array, if applicable
|
||||
if (is_array($content['cell']['options']))
|
||||
{
|
||||
$size = '';
|
||||
for ($n = max(array_keys($content['cell']['options'])); $n >= 0; --$n)
|
||||
{
|
||||
if (strlen($content['cell']['options'][$n]) || strlen($size))
|
||||
{
|
||||
$size = $content['cell']['options'][$n].(strlen($size) ? ','.$size : '');
|
||||
}
|
||||
}
|
||||
$content['cell']['size'] = $size;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1233,6 +1247,8 @@
|
||||
$content['goto'] = $this->path_components($content['path']);
|
||||
$content['goto2'] = $this->parent_navigation($parent,$parent_path,$child_id,$widget);
|
||||
|
||||
$content['cell']['options'] = explode(',',$content['cell']['size']);
|
||||
|
||||
$editor =& new etemplate('etemplate.editor.widget');
|
||||
$type_tmpl =& new etemplate;
|
||||
if ($type_tmpl->read('etemplate.editor.widget.'.$widget['type']))
|
||||
@ -1248,24 +1264,28 @@
|
||||
$editor->disable_cells('row_menu');
|
||||
$editor->disable_cells('column_menu');
|
||||
}
|
||||
$GLOBALS['phpgw_info']['flags']['java_script'] = "<script>window.focus();</script>\n";
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Editable Templates - Editor');
|
||||
$editor->exec('etemplate.editor.widget',$content,array(
|
||||
'type' => array_merge($this->etemplate->types,$this->extensions),
|
||||
'align' => $this->aligns,
|
||||
'valign' => $this->valigns,
|
||||
'edit_menu' => $this->edit_menu,
|
||||
'box_menu' => $this->box_menu,
|
||||
'row_menu' => $this->row_menu,
|
||||
'column_menu'=> $this->column_menu,
|
||||
'onclick_type'=> $this->onclick_types,
|
||||
),'',$this->etemplate->as_array()+array(
|
||||
$preserv = $this->etemplate->as_array()+array(
|
||||
'path' => $content['path'],
|
||||
'old_version' => $this->etemplate->version,
|
||||
'opener' => $content['opener'],
|
||||
'cell' => $content['cell'],
|
||||
'goto' => $content['goto'],
|
||||
),2);
|
||||
);
|
||||
unset($preserv['cell']['options']); // otherwise we never know if content is returned via options array or size
|
||||
|
||||
$GLOBALS['phpgw_info']['flags']['java_script'] = "<script>window.focus();</script>\n";
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Editable Templates - Editor');
|
||||
$editor->exec('etemplate.editor.widget',$content,array(
|
||||
'type' => array_merge($this->etemplate->types,$this->extensions),
|
||||
'align' => &$this->aligns,
|
||||
'valign' => &$this->valigns,
|
||||
'edit_menu' => &$this->edit_menu,
|
||||
'box_menu' => &$this->box_menu,
|
||||
'row_menu' => &$this->row_menu,
|
||||
'column_menu'=> &$this->column_menu,
|
||||
'onclick_type'=>&$this->onclick_types,
|
||||
'options[6]' => &$this->overflows,
|
||||
),'',$preserv,2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// eTemplates for Application 'etemplate', generated by soetemplate::dump4setup() 2005-05-19 15:10
|
||||
// eTemplates for Application 'etemplate', generated by soetemplate::dump4setup() 2005-05-20 18:46
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
@ -53,6 +53,8 @@ $templ_data[] = array('name' => 'etemplate.editor.widget','template' => '','lang
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.editor.widget.generic','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:6:{s:2:"c1";s:3:"row";s:2:"c2";s:3:"row";s:2:"c3";s:3:"row";s:2:"c4";s:3:"row";s:2:"c5";s:3:"row";s:2:"h5";s:14:",!@type=button";}i:1;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,type";s:5:"label";s:4:"Type";}s:1:"B";a:4:{s:4:"type";s:6:"select";s:4:"name";s:4:"type";s:8:"onchange";s:1:"1";s:4:"help";s:57:"type of the field (select Label if field should be empty)";}s:1:"C";a:4:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,size";s:5:"label";s:7:"Options";s:5:"align";s:6:"center";}s:1:"D";a:4:{s:4:"type";s:4:"text";s:4:"size";s:2:"10";s:4:"name";s:4:"size";s:4:"help";s:187:"Label:[bold][italic] Text:[len][,max] Numbers:[min][,[max][,len]] T.area:[rows][,cols] Radiob.:value H.Rule:[width] Templ.:[IndexInContent] Select:[multiselect] Date:[values: eg. \'Y-m-d\']";}s:1:"E";a:4:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,span";s:5:"label";s:11:"Span, Class";s:5:"align";s:6:"center";}s:1:"F";a:4:{s:4:"type";s:4:"text";s:4:"size";s:2:"10";s:4:"name";s:4:"span";s:4:"help";s:111:"number of colums the field/cell should span or \'all\' for the remaining columns, CSS-class name (for the TD tag)";}}i:2;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:8:",,,label";s:5:"label";s:5:"Label";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"name";s:5:"label";s:4:"help";s:118:"displayed in front of input or input is inserted for a \'%s\' in the label (label of the Submitbutton or Image-filename)";}s:1:"C";a:6:{s:4:"type";s:8:"checkbox";s:4:"span";s:1:"2";s:5:"label";s:16:"%s NoTranslation";s:5:"align";s:6:"center";s:4:"name";s:7:"no_lang";s:4:"help";s:82:"select if content of field should not be translated (label gets always translated)";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:3:{s:4:"type";s:5:"label";s:5:"label";s:5:"Align";s:5:"align";s:6:"center";}s:1:"F";a:3:{s:4:"type";s:6:"select";s:4:"name";s:5:"align";s:4:"help";s:48:"alignment of label and input-field in table-cell";}}i:3;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,name";s:5:"label";s:4:"Name";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"name";s:4:"name";s:4:"help";s:78:"index/name of returned content (name of the Template, Link / Method for Image)";}s:1:"C";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";s:4:"span";s:1:"4";i:1;a:5:{s:4:"type";s:8:"checkbox";s:5:"label";s:9:"%s needed";s:5:"align";s:6:"center";s:4:"name";s:6:"needed";s:4:"help";s:39:"check if field has to be filled by user";}i:2;a:5:{s:4:"type";s:8:"checkbox";s:5:"label";s:11:"%s readonly";s:5:"align";s:6:"center";s:4:"name";s:8:"readonly";s:4:"help";s:94:"check if content should only be displayed but not altered (the content is not send back then!)";}i:3;a:5:{s:4:"type";s:8:"checkbox";s:5:"label";s:11:"%s disabled";s:5:"align";s:6:"center";s:4:"name";s:8:"disabled";s:4:"help";s:96:"if field is disabled an empty table-cell is displayed, for (temporal) removement of a field/cell";}i:4;a:5:{s:4:"type";s:8:"checkbox";s:5:"label";s:11:"%s onChange";s:5:"align";s:6:"center";s:4:"name";s:8:"onchange";s:4:"help";s:33:"enable JavaScript onChange submit";}}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:1:{s:4:"type";s:5:"label";}s:1:"F";a:1:{s:4:"type";s:5:"label";}}i:4;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,help";s:5:"label";s:4:"Help";}s:1:"B";a:5:{s:4:"type";s:4:"text";s:4:"size";s:2:"45";s:4:"span";s:1:"3";s:4:"name";s:4:"help";s:4:"help";s:60:"displayed in statusline of browser if input-field gets focus";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:4:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,blur";s:5:"label";s:8:"blurText";s:5:"align";s:6:"center";}s:1:"F";a:4:{s:4:"type";s:4:"text";s:4:"size";s:2:"10";s:4:"name";s:4:"blur";s:4:"help";s:76:"this text gets displayed if the input-field is empty and has no focus (blur)";}}i:5;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:7:"onclick";s:5:"label";s:7:"onClick";}s:1:"B";a:3:{s:4:"type";s:6:"select";s:4:"name";s:12:"onclick_type";s:4:"help";s:43:"confirmation necesary or custom java-script";}s:1:"C";a:5:{s:4:"type";s:4:"text";s:4:"size";s:2:"45";s:4:"span";s:3:"all";s:4:"name";s:7:"onclick";s:4:"help";s:67:"confirmation message or custom javascript (returning true or false)";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:1:{s:4:"type";s:5:"label";}s:1:"F";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:5;s:4:"cols";i:6;}}','size' => '','style' => '','modified' => '1108415433',);
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.editor.widget.grid','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:4:{s:2:"c1";s:3:"row";s:2:"c2";s:3:"row";s:2:"c3";s:3:"row";s:2:"c4";s:3:"row";}i:1;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,type";s:5:"label";s:4:"Type";}s:1:"B";a:4:{s:4:"type";s:6:"select";s:4:"name";s:4:"type";s:8:"onchange";s:1:"1";s:4:"help";s:57:"type of the field (select Label if field should be empty)";}s:1:"C";a:4:{s:4:"type";s:5:"label";s:4:"size";s:8:",,,align";s:5:"label";s:5:"Align";s:5:"align";s:5:"right";}s:1:"D";a:3:{s:4:"type";s:6:"select";s:4:"name";s:5:"align";s:4:"help";s:48:"alignment of label and input-field in table-cell";}s:1:"E";a:4:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,span";s:5:"label";s:4:"Span";s:5:"align";s:5:"right";}s:1:"F";a:4:{s:4:"type";s:4:"text";s:4:"size";s:2:"10";s:4:"name";s:4:"span";s:4:"help";s:111:"number of colums the field/cell should span or \'all\' for the remaining columns, CSS-class name (for the TD tag)";}}i:2;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,name";s:5:"label";s:4:"Name";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"name";s:4:"name";s:4:"help";s:78:"index/name of returned content (name of the Template, Link / Method for Image)";}s:1:"C";a:5:{s:4:"type";s:8:"checkbox";s:5:"label";s:11:"%s disabled";s:4:"name";s:8:"disabled";s:4:"help";s:96:"if field is disabled an empty table-cell is displayed, for (temporal) removement of a field/cell";s:4:"span";s:1:"2";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:4:{s:4:"type";s:5:"label";s:4:"size";s:13:",,,options[3]";s:5:"label";s:5:"Class";s:5:"align";s:5:"right";}s:1:"F";a:4:{s:4:"type";s:4:"text";s:4:"size";s:2:"10";s:4:"name";s:10:"options[3]";s:4:"help";s:27:"CSS class for the table-tag";}}i:3;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:13:",,,options[0]";s:5:"label";s:5:"Width";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:1:"5";s:4:"name";s:10:"options[0]";s:4:"help";s:71:" Width of the table in % or pixels for the table-tag and (optional) div";}s:1:"C";a:4:{s:4:"type";s:5:"label";s:4:"size";s:13:",,,options[1]";s:5:"label";s:6:"Height";s:5:"align";s:5:"right";}s:1:"D";a:4:{s:4:"type";s:4:"text";s:4:"size";s:1:"5";s:4:"name";s:10:"options[1]";s:4:"help";s:72:" Height of the table in % or pixels for the table-tag and (optional) div";}s:1:"E";a:4:{s:4:"type";s:5:"label";s:4:"size";s:13:",,,options[6]";s:5:"label";s:8:"Overflow";s:5:"align";s:5:"right";}s:1:"F";a:4:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:10:"options[6]";s:4:"help";s:96:"what happens with overflowing content: visible (default), hidden, scroll, auto (browser decides)";}}i:4;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:13:",,,options[4]";s:5:"label";s:7:"Spacing";}s:1:"B";a:4:{s:4:"type";s:13:"select-number";s:4:"name";s:10:"options[4]";s:4:"help";s:29:"Cellspacing for the table-tag";s:4:"size";s:14:"Default,0,10,1";}s:1:"C";a:3:{s:4:"type";s:5:"label";s:4:"size";s:13:",,,options[5]";s:5:"label";s:7:"Padding";}s:1:"D";a:4:{s:4:"type";s:13:"select-number";s:4:"size";s:14:"Default,0,10,1";s:4:"name";s:10:"options[5]";s:4:"help";s:29:"Cellpadding for the table-tag";}s:1:"E";a:4:{s:4:"type";s:5:"label";s:4:"size";s:13:",,,options[2]";s:5:"label";s:6:"Border";s:5:"align";s:5:"right";}s:1:"F";a:4:{s:4:"type";s:13:"select-number";s:4:"size";s:14:"Default,0,10,1";s:4:"name";s:10:"options[2]";s:4:"help";s:39:"Border-line-thickness for the table-tag";}}}s:4:"rows";i:4;s:4:"cols";i:6;}}','size' => '','style' => '','modified' => '1116599469',);
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.groupbox.test','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:5:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"2";s:5:"label";s:18:"Selection grouping";i:1;a:4:{s:4:"type";s:5:"radio";s:4:"size";s:1:"1";s:5:"label";s:18:"%s selection #1 or";s:4:"name";s:9:"selection";}i:2;a:4:{s:4:"type";s:5:"radio";s:4:"size";s:1:"2";s:5:"label";s:15:"%s selection #2";s:4:"name";s:9:"selection";}}}}s:4:"rows";i:1;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1107699792',);
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.groupbox.test-template','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"1";s:5:"label";s:8:"Template";i:1;a:2:{s:4:"type";s:8:"template";s:4:"name";s:25:"etemplate.tab_widget.test";}}}}s:4:"rows";i:1;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1107701431',);
|
||||
|
@ -296,6 +296,7 @@ showing etemplate de zeigt
|
||||
shows / allows you to enter values into the etemplate for testing etemplate de zeigt den Inhalt / Werte an und erlaubt welche zum Testen des eTemplates einzugeben
|
||||
shows/displays etemplate for testing, does not save it before etemplate de zeigt eTemplate zum Testen an, speichert es NICHT davor
|
||||
spacing etemplate de Zellenabstand
|
||||
span etemplate de Überspannt
|
||||
span, class etemplate de Span, Class
|
||||
stack etemplate de Stapel
|
||||
start a new search, cancel this link etemplate de neue Suche Starten, diese Verknüpfung abbrechen
|
||||
|
@ -296,6 +296,7 @@ showing etemplate en showing
|
||||
shows / allows you to enter values into the etemplate for testing etemplate en shows / allows you to enter values into the eTemplate for testing
|
||||
shows/displays etemplate for testing, does not save it before etemplate en shows/displays eTemplate for testing, does NOT save it before
|
||||
spacing etemplate en Spacing
|
||||
span etemplate en Span
|
||||
span, class etemplate en Span, Class
|
||||
stack etemplate en Stack
|
||||
start a new search, cancel this link etemplate en start a new search, cancel this link
|
||||
|
61
etemplate/templates/default/editor.widget.grid.xet
Normal file
61
etemplate/templates/default/editor.widget.grid.xet
Normal file
@ -0,0 +1,61 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id$ -->
|
||||
<overlay>
|
||||
<template id="etemplate.editor.widget.grid" template="" lang="" group="0" version="1.0.1.001">
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row class="row">
|
||||
<description options=",,,type" value="Type"/>
|
||||
<menulist>
|
||||
<menupopup id="type" onchange="1" statustext="type of the field (select Label if field should be empty)"/>
|
||||
</menulist>
|
||||
<description options=",,,align" value="Align" align="right"/>
|
||||
<menulist>
|
||||
<menupopup id="align" statustext="alignment of label and input-field in table-cell"/>
|
||||
</menulist>
|
||||
<description options=",,,span" value="Span" align="right"/>
|
||||
<textbox size="10" id="span" statustext="number of colums the field/cell should span or 'all' for the remaining columns, CSS-class name (for the TD tag)"/>
|
||||
</row>
|
||||
<row class="row">
|
||||
<description options=",,,name" value="Name"/>
|
||||
<textbox id="name" statustext="index/name of returned content (name of the Template, Link / Method for Image)"/>
|
||||
<checkbox label="%s disabled" id="disabled" statustext="if field is disabled an empty table-cell is displayed, for (temporal) removement of a field/cell" span="2"/>
|
||||
<description options=",,,options[3]" value="Class" align="right"/>
|
||||
<textbox size="10" id="options[3]" statustext="CSS class for the table-tag"/>
|
||||
</row>
|
||||
<row class="row">
|
||||
<description options=",,,options[0]" value="Width"/>
|
||||
<textbox size="5" id="options[0]" statustext=" Width of the table in % or pixels for the table-tag and (optional) div"/>
|
||||
<description options=",,,options[1]" value="Height" align="right"/>
|
||||
<textbox size="5" id="options[1]" statustext=" Height of the table in % or pixels for the table-tag and (optional) div"/>
|
||||
<description options=",,,options[6]" value="Overflow" align="right"/>
|
||||
<menulist>
|
||||
<menupopup no_lang="1" id="options[6]" statustext="what happens with overflowing content: visible (default), hidden, scroll, auto (browser decides)"/>
|
||||
</menulist>
|
||||
</row>
|
||||
<row class="row">
|
||||
<description options=",,,options[4]" value="Spacing"/>
|
||||
<menulist>
|
||||
<menupopup type="select-number" id="options[4]" statustext="Cellspacing for the table-tag" options="Default,0,10,1"/>
|
||||
</menulist>
|
||||
<description options=",,,options[5]" value="Padding"/>
|
||||
<menulist>
|
||||
<menupopup type="select-number" options="Default,0,10,1" id="options[5]" statustext="Cellpadding for the table-tag"/>
|
||||
</menulist>
|
||||
<description options=",,,options[2]" value="Border" align="right"/>
|
||||
<menulist>
|
||||
<menupopup type="select-number" options="Default,0,10,1" id="options[2]" statustext="Border-line-thickness for the table-tag"/>
|
||||
</menulist>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
</overlay>
|
Loading…
Reference in New Issue
Block a user