forked from extern/egroupware
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"?>
|
||||
<span><!-- $Id$ --></span>
|
||||
<overlay>
|
||||
<grid id="et_media.edit" template="" lang="" group="" version="" width="100%">
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<description options="ib" span="all" value="eTemplates MediaDB" no_lang="1" id="msg"/>
|
||||
</row>
|
||||
<row>
|
||||
<hrule span="all"/>
|
||||
</row>
|
||||
<row>
|
||||
<template id="et_media.edit" template="" lang="" group="" version="">
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<description options="ib" span="all" value="eTemplates MediaDB" no_lang="1" id="msg"/>
|
||||
</row>
|
||||
<row>
|
||||
<hrule span="all"/>
|
||||
</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"/>
|
||||
</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"/>
|
||||
</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>
|
||||
</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>
|
||||
</template>
|
||||
</overlay>
|
||||
</pre>
|
||||
<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 />
|
||||
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.
|
||||
<li>xul-files can contain an unlimited number of nested elements, where as the eTemplates xml-root-node
|
||||
has to be a xul-grid and can not contain other grids as element (vbox and hbox are Ok).
|
||||
<i>This limitation might be removed in the near future, for now you have to use the non-xul-element
|
||||
<template id="app.template_name"/> us load an other template by its name.</i>
|
||||
<li>xul-files can contain an unlimited number of nested elements, the xml-root-node of an eTemplates has to
|
||||
be an overlay, containing multiple (non-xul) <template>'s. That templates can contain now (HEAD)
|
||||
a tree of other widgets, but not other templates direct. You can use <template id="app.template_name" />
|
||||
to load an other template by its name.</i>
|
||||
</ul>
|
||||
<p>Like XUL the eTemplate-xml-files are quite strict with the xml-syntax:</p>
|
||||
<ul>
|
||||
<li>All tags and attributes must be written in lowercase
|
||||
<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>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>
|
||||
<hr>
|
||||
<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 />
|
||||
a) general javascript: "window.close();"<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;"
|
||||
(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>] (note no quotes!) to pass further information to the popup via the content array.)
|
||||
c) popups: "window.open(egw::link('/index.php','menuaction=app.class.func&id=$cont[id]'),'_blank',
|
||||
'dependent=yes,width=600,height=450,scrollbars=yes,status=yes'); return false;"
|
||||
(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>
|
||||
</tr>
|
||||
<tr>
|
||||
|
Loading…
Reference in New Issue
Block a user