~kosova/+junk/tuxfamily-twiki

« back to all changes in this revision

Viewing changes to foswiki/data/System/VarEDITTABLE.txt

  • Committer: James Michael DuPont
  • Date: 2009-07-18 19:58:49 UTC
  • Revision ID: jamesmikedupont@gmail.com-20090718195849-vgbmaht2ys791uo2
added foswiki

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%META:TOPICINFO{author="ProjectContributor" date="1191744279" format="1.1" version="1"}%
 
2
%META:TOPICPARENT{name="Macros"}%
 
3
#VarEDITTABLE
 
4
---+++ EDITTABLE{ _attributes_ } -- edit tables using edit fields and other input fields
 
5
   * The =%<nop>EDITTABLE{}%= macro is handled by the EditTablePlugin
 
6
   * Syntax: =%<nop>EDITTABLE{ _attributes_ }%=
 
7
%STARTSECTION{"edittable_attributes"}%
 
8
   * Supported attributes:
 
9
     | *Attribute* | *Comment* | *Default* |
 
10
     | =header= | Specify the header format of a new table like ="%VBAR%*Food*%VBAR%*Drink*%VBAR%"=. Useful to start a table with only a button | (no header) |
 
11
     | =format= | The format of one column when editing the table. A cell can be a text input field, or any of these edit field types:%BR% %BB% Text input field (1 line):%BR% &nbsp; =%VBAR% text, &lt;size&gt;, &lt;initial value&gt; %VBAR%= %BR% %BB% Textarea input field:%BR% &nbsp; =%VBAR% textarea, &lt;rows&gt;x&lt;columns&gt;, &lt;initial value&gt; %VBAR%= %BR% %BB% Drop down box: %BR% &nbsp; =%VBAR% select, &lt;size&gt;, &lt;option 1&gt;, &lt;option 2&gt;, etc*<nop> %VBAR%= %BR% &nbsp; =*= only one item can be selected %BR% %BB% Radio buttons: %BR% &nbsp; =%VBAR% radio, &lt;size*&gt;, &lt;option 1&gt;, &lt;option 2&gt;, etc %VBAR%= %BR% &nbsp; =*= size indicates the number of buttons per line in edit mode %BR% %BB% Checkboxes: %BR% &nbsp; =%VBAR% checkbox, &lt;size*&gt;, &lt;option 1&gt;, &lt;option 2&gt;, etc %VBAR%= %BR% &nbsp; =*= size indicates the number of checkboxes per line in edit mode  %BR% %BB% Fixed label: %BR% &nbsp; =%VBAR% label, 0, &lt;label text&gt; %VBAR%= %BR% %BB% Row number: %BR% &nbsp; =%VBAR% row, &lt;offset&gt; %VBAR%= %BR% %BB% Date: %BR% &nbsp; =%VBAR% date, &lt;size&gt;, &lt;initial value&gt;, &lt;DHTML date format&gt; %VBAR%= (see [[#DateField][Date Field Type]]) | ="text, 16"= %BR% for all cells |
 
12
     | =changerows= | Rows can be added and removed if ="on"= <br /> Rows can be added but not removed if ="add"= <br /> Rows cannot be added or removed if ="off"= | =CHANGEROWS= %BR% plugin setting |
 
13
     | =quietsave= | Quiet Save button is shown if ="on"=, hidden if ="off"= | =QUIETSAVE= %BR% plugin setting |
 
14
     | =include= | Other topic defining the EDITTABLE parameters. The first %<nop>EDITTABLE% in the topic is used. This is useful if you have many topics with the same table format and you want to update the format in one place. | (none) |
 
15
     | =helptopic= | Topic name containing help text shown below the table when editing a table. The %<nop>STARTINCLUDE% and %<nop>STOPINCLUDE% macros can be used in the topic to specify what is shown. | (no help text) |
 
16
     | =headerislabel= | Table header cells are read-only (labels) if ="on"=; header cells can be edited if ="off"= or "0" | ="on"= |
 
17
     | =editbutton= | Set edit button text, e.g. ="Edit this table"=; set button image with alt text, e.g. ="Edit table, %<nop>PUBURL%/%<nop>SYSTEMWEB%/DocumentGraphics/edittopic.gif"=; hide edit button at the end of the table with ="hide"= (Note: Button is automatically hidden if an edit button is present in a cell) | =EDITBUTTON= %BR% plugin setting |
 
18
     | =buttonrow= | Set to =top= to put the edit buttons above the table. | =bottom= |
 
19
     | =javascriptinterface= | Use javascript to directly move and delete row without page refresh. Enable with ="on"=, disable with ="off"=. | =JAVASCRIPTINTERFACE= %BR% plugin setting |
 
20
%ENDSECTION{"edittable_attributes"}%
 
21
   * Example:%BR%
 
22
     =%<nop>EDITTABLE{ format="| text, 20 | select, 1, one, two, three |" changerows="on" }%= %BR%
 
23
     =| <nop>*Name*<nop> | <nop>*Type*<nop> |= %BR%
 
24
     =| Foo | two |=
 
25
   * Related: See EditTablePlugin for more details