mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 17:38:19 +01:00
allow to load widget specific edit-template from the app the widget belongs too, eg. infolog-value --> infolog.widget.infolog-value
This commit is contained in:
parent
e8354276e1
commit
220492880d
@ -1341,7 +1341,9 @@ class editor
|
|||||||
$type_tmpl =& new etemplate;
|
$type_tmpl =& new etemplate;
|
||||||
|
|
||||||
list($ext_type) = explode('-',$widget['type']);
|
list($ext_type) = explode('-',$widget['type']);
|
||||||
if ($type_tmpl->read('etemplate.editor.widget.'.$widget['type']) ||
|
// allow to read template of app-specific widgets from their app: eg. "infolog-value" --> "infolog.widget.infolog-value"
|
||||||
|
if (isset($GLOBALS['egw_info']['apps'][$ext_type]) && $type_tmpl->read($ext_type.'.widget.'.$widget['type']) ||
|
||||||
|
$type_tmpl->read('etemplate.editor.widget.'.$widget['type']) ||
|
||||||
$type_tmpl->read('etemplate.editor.widget.'.$ext_type))
|
$type_tmpl->read('etemplate.editor.widget.'.$ext_type))
|
||||||
{
|
{
|
||||||
$editor->set_cell_attribute('etemplate.editor.widget.generic','obj',$type_tmpl);
|
$editor->set_cell_attribute('etemplate.editor.widget.generic','obj',$type_tmpl);
|
||||||
|
File diff suppressed because one or more lines are too long
@ -21,6 +21,9 @@
|
|||||||
.leftPad5 {
|
.leftPad5 {
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
|
.inputFullWidth input {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* mark input as required
|
* mark input as required
|
||||||
|
48
etemplate/templates/default/editor.widget.contact.xet
Normal file
48
etemplate/templates/default/editor.widget.contact.xet
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- $Id$ -->
|
||||||
|
<overlay>
|
||||||
|
<template id="etemplate.editor.widget.contact" template="" lang="" group="0" version="1.7.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>
|
||||||
|
<contact-fields id="size" statustext="Contact field to show" span="all" label="Field"/>
|
||||||
|
</row>
|
||||||
|
<row class="row">
|
||||||
|
<description options=",,,label" value="Label"/>
|
||||||
|
<textbox id="label" statustext="displayed in front of input or input is inserted for a '%s' in the label (label of the Submitbutton or Image-filename)"/>
|
||||||
|
<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)" label="Span, Class" span="2"/>
|
||||||
|
<description value="Align" align="center"/>
|
||||||
|
<menulist>
|
||||||
|
<menupopup id="align" statustext="alignment of label and input-field in table-cell"/>
|
||||||
|
</menulist>
|
||||||
|
</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="all"/>
|
||||||
|
</row>
|
||||||
|
<row class="row" disabled="!@type=button">
|
||||||
|
<description options="onclick" value="onClick"/>
|
||||||
|
<hbox options="0,0" span="all">
|
||||||
|
<menulist>
|
||||||
|
<menupopup id="onclick_type" statustext="confirmation necesary or custom java-script"/>
|
||||||
|
</menulist>
|
||||||
|
<textbox span="all" class="leftPad5 inputFullWidth" id="onclick" statustext="confirmation message or custom javascript (returning true or false)" align="right"/>
|
||||||
|
</hbox>
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
|
</template>
|
||||||
|
</overlay>
|
@ -1,10 +1,10 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!-- $Id$ -->
|
<!-- $Id$ -->
|
||||||
<overlay>
|
<overlay>
|
||||||
<template id="etemplate.editor.widget.generic" template="" lang="" group="0" version="1.3.001">
|
<template id="etemplate.editor.widget.generic" template="" lang="" group="0" version="1.7.001">
|
||||||
<grid>
|
<grid width="100%">
|
||||||
<columns>
|
<columns>
|
||||||
<column/>
|
<column width="70"/>
|
||||||
<column/>
|
<column/>
|
||||||
<column/>
|
<column/>
|
||||||
<column/>
|
<column/>
|
||||||
@ -50,31 +50,35 @@
|
|||||||
</row>
|
</row>
|
||||||
<row class="row">
|
<row class="row">
|
||||||
<description options=",,,help" value="Help"/>
|
<description options=",,,help" value="Help"/>
|
||||||
<textbox size="71" span="all" id="help" statustext="displayed in statusline of browser if input-field gets focus"/>
|
<textbox size="71" span="all" class="inputFullWidth" id="help" statustext="displayed in statusline of browser if input-field gets focus"/>
|
||||||
|
<description/>
|
||||||
|
<description/>
|
||||||
|
<description/>
|
||||||
|
<description/>
|
||||||
</row>
|
</row>
|
||||||
<row class="row" disabled="@type=label">
|
<row class="row" disabled="@type=label">
|
||||||
<description value="onChange"/>
|
<description value="onChange"/>
|
||||||
<hbox span="all">
|
<hbox options="0,0" span="all">
|
||||||
<menulist>
|
<menulist>
|
||||||
<menupopup id="onchange_type" statustext="Should the form be submitted or any custom javascript be executed"/>
|
<menupopup id="onchange_type" statustext="Should the form be submitted or any custom javascript be executed"/>
|
||||||
</menulist>
|
</menulist>
|
||||||
<textbox size="50" span="all" id="onchange" statustext="custom javascript for onChange"/>
|
<textbox size="50" span="all" class="leftPad5 inputFullWidth" id="onchange" statustext="custom javascript for onChange" align="right"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</row>
|
</row>
|
||||||
<row class="row">
|
<row class="row">
|
||||||
<description options="onclick" value="onClick"/>
|
<description options="onclick" value="onClick"/>
|
||||||
<hbox span="all">
|
<hbox options="0,0" span="all">
|
||||||
<menulist>
|
<menulist>
|
||||||
<menupopup id="onclick_type" statustext="confirmation necesary or custom java-script"/>
|
<menupopup id="onclick_type" statustext="confirmation necesary or custom java-script"/>
|
||||||
</menulist>
|
</menulist>
|
||||||
<textbox size="53" span="all" id="onclick" statustext="confirmation message or custom javascript (returning true or false)"/>
|
<textbox size="53" span="all" class="leftPad5 inputFullWidth" id="onclick" statustext="confirmation message or custom javascript (returning true or false)" align="right"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
</template>
|
</template>
|
||||||
<template id="etemplate.editor.widget" template="" lang="" group="0" version="1.7.001">
|
<template id="etemplate.editor.widget" template="" lang="" group="0" version="1.7.001">
|
||||||
<grid>
|
<grid width="100%">
|
||||||
<columns>
|
<columns>
|
||||||
<column/>
|
<column/>
|
||||||
<column/>
|
<column/>
|
||||||
@ -89,10 +93,10 @@
|
|||||||
<menupopup options="Box..." id="box_menu" onchange="1" statustext="all operations save the template!"/>
|
<menupopup options="Box..." id="box_menu" onchange="1" statustext="all operations save the template!"/>
|
||||||
</menulist>
|
</menulist>
|
||||||
<menulist>
|
<menulist>
|
||||||
<menupopup options="Row..." id="row_menu" onchange="1" statustext="all operations save the template!"/>
|
<menupopup options="Row..." id="row_menu" onchange="1" statustext="all operations save the template!" disabled="true"/>
|
||||||
</menulist>
|
</menulist>
|
||||||
<menulist>
|
<menulist>
|
||||||
<menupopup options="Column..." id="column_menu" onchange="1" statustext="all operations save the template!"/>
|
<menupopup options="Column..." id="column_menu" onchange="1" statustext="all operations save the template!" disabled="true"/>
|
||||||
</menulist>
|
</menulist>
|
||||||
</hbox>
|
</hbox>
|
||||||
</row>
|
</row>
|
||||||
|
Loading…
Reference in New Issue
Block a user