mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-24 20:01:36 +02:00
documentation update:
- fixed wrong / not working popup javascript - updated xet-file example to include <template> tags - updated the describtion: a (nested) widget tree is allowed in HEAD now and not just one grid as in the 1.0.0
This commit is contained in:
parent
389596faa8
commit
c84e492e91
@ -38,52 +38,54 @@ an eTemplate from the example app in the <a href="etemplate.html">Tutorial</a>
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<span><!-- $Id$ --></span>
|
<span><!-- $Id$ --></span>
|
||||||
<overlay>
|
<overlay>
|
||||||
<grid id="et_media.edit" template="" lang="" group="" version="" width="100%">
|
<template id="et_media.edit" template="" lang="" group="" version="">
|
||||||
<columns>
|
<grid width="100%">
|
||||||
<column/>
|
<columns>
|
||||||
<column/>
|
<column/>
|
||||||
<column/>
|
<column/>
|
||||||
<column/>
|
<column/>
|
||||||
</columns>
|
<column/>
|
||||||
<rows>
|
</columns>
|
||||||
<row>
|
<rows>
|
||||||
<description options="ib" span="all" value="eTemplates MediaDB" no_lang="1" id="msg"/>
|
<row>
|
||||||
</row>
|
<description options="ib" span="all" value="eTemplates MediaDB" no_lang="1" id="msg"/>
|
||||||
<row>
|
</row>
|
||||||
<hrule span="all"/>
|
<row>
|
||||||
</row>
|
<hrule span="all"/>
|
||||||
<row>
|
</row>
|
||||||
|
<row>
|
||||||
|
<description span="all"/>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<description value="Name"/>
|
||||||
|
<textbox size="100" maxlength="100" span="all" id="name" statustext="here goes the name of the publication / record"/>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<description value="Author"/>
|
||||||
|
<textbox size="100" maxlength="100" span="all" id="author" statustext="please use Name, First Name"/>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<description value="Type"/>
|
||||||
|
<menulist span="all" statustext="select the type fitting most">
|
||||||
|
<menupopup id="type"/>
|
||||||
|
</menulist>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<description value="Description"/>
|
||||||
|
<textbox ="" cols="3" rows="100" span="all" id="descr" statustext="we have a fulltext search using that description"/>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
<description span="all"/>
|
<description span="all"/>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<description value="Name"/>
|
<button label="Read" id="read" statustext="reads or searches for entries matching the criteria above"/>
|
||||||
<textbox size="100" maxlength="100" span="all" id="name" statustext="here goes the name of the publication / record"/>
|
<button label="Save" id="save" statustext="saves the change to the db"/>
|
||||||
</row>
|
<button label="Cancel" id="cancel" statustext="clears the form, without changing anything"/>
|
||||||
<row>
|
<button label="Delete" id="delete" statustext="deletes an entry"/>
|
||||||
<description value="Author"/>
|
</row>
|
||||||
<textbox size="100" maxlength="100" span="all" id="author" statustext="please use Name, First Name"/>
|
</rows>
|
||||||
</row>
|
</grid>
|
||||||
<row>
|
</template>
|
||||||
<description value="Type"/>
|
|
||||||
<menulist span="all" statustext="select the type fitting most">
|
|
||||||
<menupopup id="type"/>
|
|
||||||
</menulist>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<description value="Description"/>
|
|
||||||
<textbox ="" cols="3" rows="100" span="all" id="descr" statustext="we have a fulltext search using that description"/>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<description span="all"/>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<button label="Read" id="read" statustext="reads or searches for entries matching the criteria above"/>
|
|
||||||
<button label="Save" id="save" statustext="saves the change to the db"/>
|
|
||||||
<button label="Cancel" id="cancel" statustext="clears the form, without changing anything"/>
|
|
||||||
<button label="Delete" id="delete" statustext="deletes an entry"/>
|
|
||||||
</row>
|
|
||||||
</rows>
|
|
||||||
</grid>
|
|
||||||
</overlay>
|
</overlay>
|
||||||
</pre>
|
</pre>
|
||||||
<p>The tags / widget-names and attributes / parameters used are as close as possible to XUL. For more
|
<p>The tags / widget-names and attributes / parameters used are as close as possible to XUL. For more
|
||||||
@ -97,17 +99,17 @@ implement only a subset of XUL. Here are the main differences:</p>
|
|||||||
different template syntax to fill in content from a variable: <label value="?label"/><br />
|
different template syntax to fill in content from a variable: <label value="?label"/><br />
|
||||||
eTemplates get there content from an array passed to the exec or show-function of the template-object
|
eTemplates get there content from an array passed to the exec or show-function of the template-object
|
||||||
and reference to the content by the id / name-field of each widget.
|
and reference to the content by the id / name-field of each widget.
|
||||||
<li>xul-files can contain an unlimited number of nested elements, where as the eTemplates xml-root-node
|
<li>xul-files can contain an unlimited number of nested elements, the xml-root-node of an eTemplates has to
|
||||||
has to be a xul-grid and can not contain other grids as element (vbox and hbox are Ok).
|
be an overlay, containing multiple (non-xul) <template>'s. That templates can contain now (HEAD)
|
||||||
<i>This limitation might be removed in the near future, for now you have to use the non-xul-element
|
a tree of other widgets, but not other templates direct. You can use <template id="app.template_name" />
|
||||||
<template id="app.template_name"/> us load an other template by its name.</i>
|
to load an other template by its name.</i>
|
||||||
</ul>
|
</ul>
|
||||||
<p>Like XUL the eTemplate-xml-files are quite strict with the xml-syntax:</p>
|
<p>Like XUL the eTemplate-xml-files are quite strict with the xml-syntax:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>All tags and attributes must be written in lowercase
|
<li>All tags and attributes must be written in lowercase
|
||||||
<li>All strings must be double quoted, like id="string"
|
<li>All strings must be double quoted, like id="string"
|
||||||
<li>Every XUL widget must use close tags (either <tag></tag> or <tag/>) to be well-formed
|
<li>Every XUL widget must use close tags (either <tag></tag> or <tag/>) to be well-formed
|
||||||
<li>All attributes must have a value, no <tag attr> it has to be <tag attr="">
|
<li>All attributes must have a value, no <tag attr> it has to be <tag attr="1">
|
||||||
</ul>
|
</ul>
|
||||||
<hr>
|
<hr>
|
||||||
<a name="reference"></a>
|
<a name="reference"></a>
|
||||||
@ -497,9 +499,12 @@ implement only a subset of XUL. Here are the main differences:</p>
|
|||||||
<b>onclick</b>: specify some java-script to be called if the button gets pressed/clicked: <br />
|
<b>onclick</b>: specify some java-script to be called if the button gets pressed/clicked: <br />
|
||||||
a) general javascript: "window.close();"<br />
|
a) general javascript: "window.close();"<br />
|
||||||
b) confirmation: "return window.confirm('<message>');" (message get run through lang()!)<br />
|
b) confirmation: "return window.confirm('<message>');" (message get run through lang()!)<br />
|
||||||
c) popups: "window.open(egw::link('/index.php','menuaction=app.class.func&id=$cont[id]'), 'dependent=yes,width=600,height=450,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes'); return false;"
|
c) popups: "window.open(egw::link('/index.php','menuaction=app.class.func&id=$cont[id]'),'_blank',
|
||||||
(egw::link('<url>','<vars>') calls $GLOBALS['phpgw']->link() to allow eGW installtion relative links and to pass the session-id.
|
'dependent=yes,width=600,height=450,scrollbars=yes,status=yes'); return false;"
|
||||||
You can use $cont[<name>] (note no quotes!) to pass further information to the popup via the content array.)
|
(egw::link('<url>','<vars>') calls $GLOBALS['phpgw']->link() to allow eGW installtion relative links
|
||||||
|
and to pass the session-id.
|
||||||
|
You can use $cont[<name>] or $row_cont[<name>] (note no quotes!) to pass further information to the popup
|
||||||
|
via the content array.)
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user