%EDITTABLE{...}% variable. Each column can be a text field, a drop down box or a row number. Multiple tables per topic can be editable, but only one at a time canbe edited.
%<plugin>_<setting>%, for example, %INTERWIKIPLUGIN_SHORTDESCRIPTION%
data/debug.txt. Default: 0
%EDITTABLE{...}% variable just before an existing table to make it editable, or add the variable anywhere in a topic to start a new table. Parameters:
| Parameter | Comment | Default | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
header | Enable static header if "on", e.g. disable editing of the first row;Else specify the header format of a new table like "|*Food*|*Drink*|". | (no header) | ||||||||||||
format | The format of one row when editing the table. A cell can be a text input field, a drop down box, a fixed label, or a row number. Cell definitions:
| "text, 16" for all cells | ||||||||||||
changerows | Rows can be added and removed if "on";Rows can be added but not removed if "add" | "on" | ||||||||||||
include | Other topic defining the EDITTABLE parameters. The first %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) | ||||||||||||
helptopic | Topic name containing help text shown below the table when editing a table. The %STARTINCLUDE% and %STARTINCLUDE% variables can be used in the topic to specify what is shown. | (no help text) |
<initial value> (of text input field) and <label text> (of fixed label) get expanded when a new row is added. This can be used for example to add a timestamp to a label. You can escape characters if you do not want that:
| Text: | To Escape: |
|---|---|
$quot | Double quote ("). Alternatively write \" to escape it |
$percnt | Percent sign (%) |
$dollar | Dollar sign ($) |
$nop or $nop() | Is a "no operation" |
%EDITTABLE{ header="|*Nr*|*Text field sandbox*|*Drop down sandbox*|*Timestamp*|" format="| row, -1 | text, 20, init | select, 1, one, two, three, four | label, 0, %SERVERTIME{"$day $mon $year $hour:$min"}% |" changerows="on" }%
If this plugin is installed you will see an [ Edit table ] button above; when you click on it you get this form:
| ... ||) and cell justification (e.g. | centered | right |).
%ATTACHURL% get expanded unless they are in a label.
select,1,%<nop>X%,%<nop>Y%
date field type for the format parameter adds a button popping a javascript
calendar to choose the date
on browsers supporting it.
It uses the nice Mishoo DHTML calendar at http://dynarch.com/mishoo/calendar.epl,
that should be included in Cairo release, or see TWiki:Codev/JavaScriptDatePickerForForm
for installing it on Beijing Release
EditTablePlugin.zip in your twiki installation directory. Content:
| File: | Description: |
|---|---|
data/TWiki/EditTablePlugin.txt | Plugin topic |
data/TWiki/EditTablePlugin.txt,v | Plugin topic repository |
lib/TWiki/Plugins/EditTablePlugin.pm | Plugin Perl module |
viewauth script to authenticate the user. As described in TWikiAccessControl, copy the view script to viewauth (or better, create a symbolic link) and add viewauth to the list of authenticated scripts in the .htaccess file.
| Plugin Author: | PeterThoeny |
| Plugin Version: | 16 Oct 2003 |
| Change History: | |
| 16 Oct 2003: | small typo fixed (garbled if ---+ header on top) |
| 15 Oct 2003: | new date field type with javascript calendar - CN |
| 14 Oct 2003: | docfix: the documentation page was an old one - CN |
| 13 Oct 2003: | bugfix: %-vars in select were resetted to first on add/del row - CN |
| 18 Sep 2003: | incompatibility: changed default of changerows to =on=support for %-vars, Quietsave for saving without notification, all other fixes in Dev topic integrated - CN |
| 08 Nov 2002: | Prevent variable expansion in label text; added escape characters |
| 27 Jun 2002: | New helptopic parameter |
| 26 Jun 2002: | Support for variables in included EDITTABLE parameters; fixed problem with HTML in cells |
| 21 May 2002: | Added fixed label format; new changerows="add" parameter |
| 27 Apr 2002: | Fixed bug where text after a double quote in a cell disappeared |
| 18 Apr 2002: | Fixed bug where table was breaking when pasting multiple lines into an edit field using Netscape on Unix |
| 08 Apr 2002: | Check for change permission and edit lock of topic |
| 05 Apr 2002: | Initial version |
| CPAN Dependencies: | none |
| Other Dependencies: | none |
| Perl Version: | 5.0 |
| Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/EditTablePlugin |
| Feedback: | http://TWiki.org/cgi-bin/view/Plugins/EditTablePluginDev |
| Topic EditTablePlugin . { Edit | Attach | Ref-By | Printable | Diffs | r1.4 | > | r1.3 | > | r1.2 | More } |
| Revision r1.4 - 27 Apr 2007 - 21:19 GMT - SpiderAlien? | Copyright © 2003 by the contributing authors. All material on this collaboration tool is the property of the contributing authors. Ideas, requests, problems regarding TWiki? Send feedback |