Edit TWiki tables using edit fields, date pickers and drop down boxes
Added:
> >
Introduction
Edit TWiki tables in place, using edit fields and drop down boxes, without having to edit the complete topic.
Simply add an [ Edit table ] button to an existing table by writing %EDITTABLE{}% directly above the table. This can be added to tables that are formatted with TablePlugin: add the EDITTABLE variable just above or below the TABLE tag. It can also be used without any TABLE tag.
Line: 15 to 21
Multiple tables per topic are editable, but only one at a time can be edited.
Specify the header format of a new table like "|*Food*|*Drink*|". Useful to start a table with only a button
(no header)
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: • Text input field (1 line): | text, <size>, <initial value> | • Textarea input field: | textarea, <rows>x<columns>, <initial value> | • Drop down box: | select, <size>, <option 1>, <option 2>, etc* | * only one item can be selected • Radio buttons: | radio, <size*>, <option 1>, <option 2>, etc | * size indicates the number of buttons per line in edit mode • Checkboxes: | checkbox, <size*>, <option 1>, <option 2>, etc | * size indicates the number of checkboxes per line in edit mode • Fixed label: | label, 0, <label text> | • Row number: | row, <offset> | • Date: | date, <size>, <initial value>, <DHTML date format*> | * see Date Field Type
"text, 16" for all cells
changerows
Rows can be added and removed if "on" Rows can be added but not removed if "add" Rows cannot be added or removed if "off"
CHANGEROWS plugin setting
quietsave
Quiet Save button is shown if "on", hidden if "off"
QUIETSAVE plugin setting
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 %STOPINCLUDE% variables can be used in the topic to specify what is shown.
(no help text)
headerislabel
Table header cells are read-only (labels) if "on"; header cells can be edited if "off" or "0"
"on"
editbutton
Set edit button text, e.g. "Edit this table"; set button image with alt text, e.g. "Edit table, %PUBURL%/%SYSTEMWEB%/TWikiDocGraphics/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 plugin setting
buttonrow
Set to top to put the edit buttons above the table.
bottom
javascriptinterface
Use javascript to directly move and delete row without page refresh. Enable with "on", disable with "off".
JAVASCRIPTINTERFACE plugin setting
redirectto
Set up a return page after saving changes. e.g By setting redirectto="%BASEPAGE%", you can return to base page if your editable table is included by another page.
Specify the header format of a new table like "|*Food*|*Drink*|". Useful to start a table with only a button
(no header)
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: • Text input field (1 line): | text, <size>, <initial value> | • Textarea input field: | textarea, <rows>x<columns>, <initial value> | • Drop down box: | select, <size>, <option 1>, <option 2>, etc* | * only one item can be selected • Radio buttons: | radio, <size*>, <option 1>, <option 2>, etc | * size indicates the number of buttons per line in edit mode • Checkboxes: | checkbox, <size*>, <option 1>, <option 2>, etc | * size indicates the number of checkboxes per line in edit mode • Fixed label: | label, 0, <label text> | • Row number: | row, <offset> | • Date: | date, <size>, <initial value>, <DHTML date format*> | * see Date Field Type
"text, 16" for all cells
changerows
Rows can be added and removed if "on" Rows can be added but not removed if "add" Rows cannot be added or removed if "off"
CHANGEROWS plugin setting
quietsave
Quiet Save button is shown if "on", hidden if "off"
QUIETSAVE plugin setting
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 %STOPINCLUDE% variables can be used in the topic to specify what is shown.
(no help text)
headerislabel
Table header cells are read-only (labels) if "on"; header cells can be edited if "off" or "0"
"on"
editbutton
Set edit button text, e.g. "Edit this table"; set button image with alt text, e.g. "Edit table, %PUBURL%/%SYSTEMWEB%/TWikiDocGraphics/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 plugin setting
buttonrow
Set to top to put the edit buttons above the table.
bottom
javascriptinterface
Use javascript to directly move and delete row without page refresh. Enable with "on", disable with "off".
JAVASCRIPTINTERFACE plugin setting
redirectto
Set up a return page after saving changes. e.g By setting redirectto="%BASEPAGE%", you can return to base page if your editable table is included by another page.
(none)
Changed:
< <
Using TWiki Variables in the Format Parameter
> >
Using TWiki Variables in the Format Parameter
By default, variables in <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 with format tokens if you do not want that.
Line: 41 to 44
Date Field Type
Changed:
< <
> >
The date field type allows one to choose a date with a popup calendar. Popup calendar works with all modern browsers. The date picker button is inactive if the browser cannot support the popup calendar or if Javascript is disabled.
Changed:
< <
The date field type allows one to choose a date with a popup calendar. Popup calendar works with all modern browsers. The date picker button is inactive if the browser cannot support the popup calendar or if javascript is disabled.
> >
The date format can be defined; the default is taken from the {JSCalendarContrib}{format} configure setting. Date specifiers are described in JSCalendarContrib. Example format for ISO date: format="| date, 10, , %Y-%m-%d |".
Added:
> >
Per Cell Settings
Line: 65 to 69
- add row to the table (if enabled)
- remove last row from the table (if enabled)
- cancel without saving and release edit lock
Changed:
< <
- Move a row by clicking this button next to the row to be moved, then at a destination.
> >
- Move a row by clicking this button next to the row to be moved, then at a destination.
- Deletes the row next to this button.
Line: 154 to 157
Plugin Settings
Changed:
< <
Plugin settings are stored as preferences variables. To reference
a plugin setting write %<plugin>_<setting>%, for example, %EDITTABLEPLUGIN_SHORTDESCRIPTION%
> >
Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, for example, %EDITTABLEPLUGIN_SHORTDESCRIPTION%
Set SHORTDESCRIPTION = Edit TWiki tables using edit fields, date pickers and drop down boxes
Line: 198 to 198
Installation Instructions
Added:
> >
Note: This is a pre-installed TWiki plugin. You should not need to install the plugin unless it is for an upgrade.
Download the ZIP file from the Plugin web (see below)
Unzip EditTablePlugin.zip in your ($TWIKI_ROOT) directory.
Alternatively,
Manually resolve the dependencies listed below. None
The Plugin depends on the 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.
Changed:
< <
(Dakar) Visit configure in your TWiki installation, and enable the plugin in the {Plugins} section.
> >
Visit configure in your TWiki installation, and enable the plugin in the {Plugins} section.
Test if the Plugin is correctly installed:
Check above example if there is an [ Edit table ] button below the table in above example
Click on [ Edit table ], make changes and save the table
5.0: TWikibug:Item6433 - doc improvements; replacing TWIKIWEB with SYSTEMWEB
17 Apr 2009:
4.9.1: Save of table can only be done with http POST method, not GET
01 Nov 2008:
4.9: Arthur Clemens: Fixed rendering of verbatim blocks when editing. Added parameter buttonrow="top" to allow the buttons to be positioned at the top of the table.
26 Sep 2008:
4.8.7: Arthur Clemens: Let empty table initialize more than one column from header parameter
Line: 235 to 234
01 Dec 2007:
4.3: Arthur Clemens: added support for TablePluginheaderrows and footerrows; updated edit button
Arthur Clemens: Fixed eating of double newlines; icons for javascript buttons and interface improvements. By default the javascript interface is turned off, set JAVASCRIPTINTERFACE to use it in edit mode.
> >
15 Mar 2007:
Arthur Clemens: Fixed eating of double newlines; icons for Javascript buttons and interface improvements. By default the Javascript interface is turned off, set JAVASCRIPTINTERFACE to use it in edit mode.
05 Mar 2007:
Byron Darrah: Added ability to dynamically move and delete rows.
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, Quiet save for saving without notification; all other fixes in Dev topic integrated - CN
Specify the header format of a new table like "|*Food*|*Drink*|". Useful to start a table with only a button
(no header)
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: • Text input field (1 line): | text, <size>, <initial value> | • Textarea input field: | textarea, <rows>x<columns>, <initial value> | • Drop down box: | select, <size>, <option 1>, <option 2>, etc* | * only one item can be selected • Radio buttons: | radio, <size*>, <option 1>, <option 2>, etc | * size indicates the number of buttons per line in edit mode • Checkboxes: | checkbox, <size*>, <option 1>, <option 2>, etc | * size indicates the number of checkboxes per line in edit mode • Fixed label: | label, 0, <label text> | • Row number: | row, <offset> | • Date: | date, <size>, <initial value>, <DHTML date format*> | * see Date Field Type
"text, 16" for all cells
changerows
Rows can be added and removed if "on" Rows can be added but not removed if "add" Rows cannot be added or removed if "off"
CHANGEROWS plugin setting
quietsave
Quiet Save button is shown if "on", hidden if "off"
QUIETSAVE plugin setting
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 %STOPINCLUDE% variables can be used in the topic to specify what is shown.
(no help text)
headerislabel
Table header cells are read-only (labels) if "on"; header cells can be edited if "off" or "0"
"on"
editbutton
Set edit button text, e.g. "Edit this table"; set button image with alt text, e.g. "Edit table, %PUBURL%/%SYSTEMWEB%/TWikiDocGraphics/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 plugin setting
buttonrow
Set to top to put the edit buttons above the table.
bottom
javascriptinterface
Use javascript to directly move and delete row without page refresh. Enable with "on", disable with "off".
JAVASCRIPTINTERFACE plugin setting
redirectto
Set up a return page after saving changes. e.g By setting redirectto="%BASEPAGE%", you can return to base page if your editable table is included by another page.
Specify the header format of a new table like "|*Food*|*Drink*|". Useful to start a table with only a button
(no header)
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: • Text input field (1 line): | text, <size>, <initial value> | • Textarea input field: | textarea, <rows>x<columns>, <initial value> | • Drop down box: | select, <size>, <option 1>, <option 2>, etc* | * only one item can be selected • Radio buttons: | radio, <size*>, <option 1>, <option 2>, etc | * size indicates the number of buttons per line in edit mode • Checkboxes: | checkbox, <size*>, <option 1>, <option 2>, etc | * size indicates the number of checkboxes per line in edit mode • Fixed label: | label, 0, <label text> | • Row number: | row, <offset> | • Date: | date, <size>, <initial value>, <DHTML date format*> | * see Date Field Type
"text, 16" for all cells
changerows
Rows can be added and removed if "on" Rows can be added but not removed if "add" Rows cannot be added or removed if "off"
CHANGEROWS plugin setting
quietsave
Quiet Save button is shown if "on", hidden if "off"
QUIETSAVE plugin setting
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 %STOPINCLUDE% variables can be used in the topic to specify what is shown.
(no help text)
headerislabel
Table header cells are read-only (labels) if "on"; header cells can be edited if "off" or "0"
"on"
editbutton
Set edit button text, e.g. "Edit this table"; set button image with alt text, e.g. "Edit table, %PUBURL%/%SYSTEMWEB%/TWikiDocGraphics/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 plugin setting
buttonrow
Set to top to put the edit buttons above the table.
bottom
javascriptinterface
Use javascript to directly move and delete row without page refresh. Enable with "on", disable with "off".
JAVASCRIPTINTERFACE plugin setting
redirectto
Set up a return page after saving changes. e.g By setting redirectto="%BASEPAGE%", you can return to base page if your editable table is included by another page.
(none)
Using TWiki Variables in the Format Parameter
Line: 22 to 28
Any TWiki variable inside a table cell will be preserved. For instance, %TOPIC% will not get expanded to the current topic name.
Plugin settings are stored as preferences variables. To reference
a plugin setting write %<plugin>_<setting>%, for example, %EDITTABLEPLUGIN_SHORTDESCRIPTION%
Set SHORTDESCRIPTION = Edit TWiki tables using edit fields, date pickers and drop down boxes
Set DEBUG to 1 to get debug messages in data/debug.txt. Default: 0
Line: 197 to 203
Alternatively,
Manually resolve the dependencies listed below. None
Changed:
< <
The Plugin depends on the 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.
> >
The Plugin depends on the 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.
(Dakar) Visit configure in your TWiki installation, and enable the plugin in the {Plugins} section.
Test if the Plugin is correctly installed:
Check above example if there is an [ Edit table ] button below the table in above example
4.9.1: Save of table can only be done with http POST method, not GET
01 Nov 2008:
4.9: Arthur Clemens: Fixed rendering of verbatim blocks when editing. Added parameter buttonrow="top" to allow the buttons to be positioned at the top of the table.
26 Sep 2008:
4.8.7: Arthur Clemens: Let empty table initialize more than one column from header parameter
24 Sep 2008:
4.8.6: Arthur Clemens: Fix parsing of header labels
Line: 227 to 234
16 Dec 2007:
4.6: Kenneth Lavrsen: The plugin prevents TablePlugin from initsorting the table being edited. This is done by temporarily appending the attribute disableallsort="on" to the TABLE tag of a table being edited. Additionally all header sorting is disabled while editing a table by setting a hidden formfield sort to "off". Disabling sorting while editing is needed now that the EditTablePlugin supports moving rows up and down.
01 Dec 2007:
4.3: Arthur Clemens: added support for TablePluginheaderrows and footerrows; updated edit button
Arthur Clemens: Fixed eating of double newlines; icons for javascript buttons and interface improvements. By default the javascript interface is turned off, set JAVASCRIPTINTERFACE to use it in edit mode.
05 Mar 2007:
Byron Darrah: Added ability to dynamically move and delete rows.
4.9: Arthur Clemens: Fixed rendering of verbatim blocks when editing. Added parameter buttonrow="top" to allow the buttons to be positioned at the top of the table.
26 Sep 2008:
4.8.7: Arthur Clemens: Let empty table initialize more than one column from header parameter
24 Sep 2008:
4.8.6: Arthur Clemens: Fix parsing of header labels
21 Sep 2008:
4.8.5: Arthur Clemens: Fix rendering of TML inside label
03 Aug 2008:
4.8.4: TWiki 4.2.1 release version
19 Jul 2008:
4.8.3: Bugfix release
20 Mar 2008:
4.8: Arthur Clemens: Code refactoring; disabled table sort when editing; removed usage of $percnt to prevent variable expansion (is now done automatically); made Javascript interface aware of headers and footers, and of changerows="off"; improved feedback on row move.
25 Dec 2007:
4.7.1: Arthur Clemens: Added warning if include parameter topic does not exist.
22 Dec 2007:
4.7: Arthur Clemens: Changed handling of escaped variables. To escape TWiki variable, use formatting tokens such as $percnt.
Edit TWiki tables in place, using edit fields and drop down boxes, without having to edit the complete topic.
Line: 18 to 18
Using TWiki Variables in the Format Parameter
Changed:
< <
TWiki variables like %Y% in <initial value> (of text input field) and <label text> (of fixed label) will get expanded when a new row is added.
> >
By default, variables in <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 with format tokens if you do not want that.
Changed:
< <
This is useful to write variables like dates into the table.
4.8: Arthur Clemens: Code refactoring; disabled table sort when editing; removed usage of $percnt to prevent variable expansion (is now done automatically); made Javascript interface aware of headers and footers, and of changerows="off"; improved feedback on row move.
25 Dec 2007:
4.7.1: Arthur Clemens: Added warning if include parameter topic does not exist.
22 Dec 2007:
4.7: Arthur Clemens: Changed handling of escaped variables. To escape TWiki variable, use formatting tokens such as $percnt.
16 Dec 2007:
4.6: Kenneth Lavrsen: The plugin prevents TablePlugin from initsorting the table being edited. This is done by temporarily appending the attribute disableallsort="on" to the TABLE tag of a table being edited. Additionally all header sorting is disabled while editing a table by setting a hidden formfield sort to "off". Disabling sorting while editing is needed now that the EditTablePlugin supports moving rows up and down.
This plugin allows you to edit TWiki tables using edit fields and drop down boxes. Tables have an [ Edit table ] button if preceeded by an %EDITTABLE{...}% variable. Each column can be a text field, a drop down box, a date field, etc. Multiple tables per topic are editable, but only one at a time can be edited.
> >
Edit TWiki tables in place, using edit fields and drop down boxes, without having to edit the complete topic.
Added:
> >
Simply add an [ Edit table ] button to an existing table by writing %EDITTABLE{}% directly above the table. This can be added to tables that are formatted with TablePlugin: add the EDITTABLE variable just above or below the TABLE tag. It can also be used without any TABLE tag.
Customize entry fields by specifying the format: use a text field, a drop down box, a date field, radio buttons or checkboxes.
Multiple tables per topic are editable, but only one at a time can be edited.
Add a %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:
> >
Add a %EDITTABLE{...}% variable just before an existing table to make it editable, or add the variable anywhere in a topic to start a new table.
Specify the header format of a new table like "|*Food*|*Drink*|". Useful to start a table with only a button
(no header)
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: • Text input field (1 line): | text, <size>, <initial value> | • Textarea input field: | textarea, <rows>x<columns>, <initial value> | • Drop down box: | select, <size>, <option 1>, <option 2>, etc* | * only one item can be selected • Radio buttons: | radio, <size*>, <option 1>, <option 2>, etc | * size indicates the number of buttons per line in edit mode • Checkboxes: | checkbox, <size*>, <option 1>, <option 2>, etc | * size indicates the number of checkboxes per line in edit mode • Fixed label: | label, 0, <label text> | • Row number: | row, <offset> | • Date: | date, <size>, <initial value>, <DHTML date format*> | * see Date Field Type
"text, 16" for all cells
changerows
Rows can be added and removed if "on" Rows can be added but not removed if "add" Rows cannot be added or removed if "off"
CHANGEROWS plugin setting
quietsave
Quiet Save button is shown if "on", hidden if "off"
QUIETSAVE plugin setting
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 %STOPINCLUDE% variables can be used in the topic to specify what is shown.
(no help text)
headerislabel
Table header cells are read-only (labels) if "on"; header cells can be edited if "off" or "0"
"on"
editbutton
Set edit button text, e.g. "Edit this table"; set button image with alt text, e.g. "Edit table, %PUBURL%/%SYSTEMWEB%/TWikiDocGraphics/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 plugin setting
buttonrow
Set to top to put the edit buttons above the table.
bottom
javascriptinterface
Use javascript to directly move and delete row without page refresh. Enable with "on", disable with "off".
JAVASCRIPTINTERFACE plugin setting
redirectto
Set up a return page after saving changes. e.g By setting redirectto="%BASEPAGE%", you can return to base page if your editable table is included by another page.
Specify the header format of a new table like "|*Food*|*Drink*|". Useful to start a table with only a button
(no header)
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: • Text input field (1 line): | text, <size>, <initial value> | • Textarea input field: | textarea, <rows>x<columns>, <initial value> | • Drop down box: | select, <size>, <option 1>, <option 2>, etc* | * only one item can be selected • Radio buttons: | radio, <size*>, <option 1>, <option 2>, etc | * size indicates the number of buttons per line in edit mode • Checkboxes: | checkbox, <size*>, <option 1>, <option 2>, etc | * size indicates the number of checkboxes per line in edit mode • Fixed label: | label, 0, <label text> | • Row number: | row, <offset> | • Date: | date, <size>, <initial value>, <DHTML date format> | * see Mishoo documentation for more infos about the DHTML date format
"text, 16" for all cells
changerows
Rows can be added and removed if "on"; Rows can be added but not removed if "add"
CHANGEROWS Plugin setting
quietsave
Quiet Save button is shown if "on", hidden if "off"
QUIETSAVE Plugin setting
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 %STOPINCLUDE% variables can be used in the topic to specify what is shown.
(no help text)
headerislabel
Table header cells are read-only (labels) if "on"; header cells can be edited if "off" or "0"
"on"
editbutton
Set edit button text, e.g. "Edit this table"; set button image with alt text, e.g. "Edit table, %PUBURL%/%TWIKIWEB%/TWikiDocGraphics/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 Plugin setting
> >
Using TWiki Variables in the Format Parameter
Changed:
< <
Initial Values
> >
TWiki variables like %Y% in <initial value> (of text input field) and <label text> (of fixed label) will get expanded when a new row is added.
Changed:
< <
By default, variables in <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:
... will create a new row with $percntY$percnt. In view mode this is temporarily translated to %Y% and subsequent rendered as .
Date Field Type
Changed:
< <
The date field type allows one to choose a date with a popup calendar. Popup calendar works for Netscape 6.0 or better, all other Gecko-based browsers, Internet Explorer 5.0 or better for Windows, Opera 7 and Konqueror 3.1.2. The ... button is inactive if the browser cannot support the popup calendar. It uses the nice Mishoo DHTML calendar, see also TWiki:Codev/JavaScriptDatePickerForForm
> >
Added:
> >
The date field type allows one to choose a date with a popup calendar. Popup calendar works with all modern browsers. The date picker button is inactive if the browser cannot support the popup calendar or if javascript is disabled.
Per Cell Settings
Line: 46 to 60
Changed:
< <
- turn the table into edit mode
> >
- turn the table into edit mode
In edit mode:
Changed:
< <
- save your changes
- save your changes without alerting subscribed WebNotify users
- add row to the table (if enabled)
- remove last row from the table (if enabled)
- cancel without saving and release edit lock
> >
- save your changes
- save your changes without alerting subscribed WebNotify users
- add row to the table (if enabled)
- remove last row from the table (if enabled)
- cancel without saving and release edit lock
- Move a row by clicking this button next to the row to be moved, then at a destination.
- Deletes the row next to this button.
Examples
Line: 67 to 84
If this plugin is installed you will see an [ Edit table ] button above; if you were to click on it (please don't, use TWiki:Sandbox.EditTablePluginTesting for testing) you get this form:
The following example shows a simple table with key/value rows. The default edit field type for the value column is a text field. This is overloaded by a selector for the Gender, and a date picker for the DOB. This is typically used by TWiki applications where new topics with tables are created based on a template topic.
Default edit button: Specify button text, or specify alternate text, image URL. Note: Texts inside %MAKETEXT{}% are translated into other languages.
#Set EDIT_BUTTON = Edit table
Set EDIT_BUTTON = Edit this table,
Set SAVE_BUTTON = Save table
Set QUIET_SAVE_BUTTON = Quiet save
Set ADD_ROW_BUTTON = Add row
Set DELETE_LAST_ROW_BUTTON = Delete last row
Set CANCEL_BUTTON = Cancel
Added:
> >
Default help texts
Set INCLUDED_TOPIC_DOES_NOT_EXIST = Warning: 'include' topic does not exist!
Note: The Plugin uses base settings like date format, language and style from the JSCalendarContrib.
Limitations and Known Issues
Line: 132 to 196
You can include %-vars now in select values, by quoting them with <nop>, as in %<nop>X% for %X%, say for instance: select,1,%<nop>X%,%<nop>Y%
Deleted:
< <
Plugin Installation Instructions
Deleted:
< <
Note: You do not need to install anything on the browser to use this Plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.
Added:
> >
Installation Instructions
Download the ZIP file from the Plugin web (see below)
Changed:
< <
Unzip EditTablePlugin.zip in your twiki installation directory. Content:
Unzip EditTablePlugin.zip in your ($TWIKI_ROOT) directory.
Alternatively,
Manually resolve the dependencies listed below. None
The Plugin depends on the 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.
Deleted:
< <
The Mishoo DHTML calendar 0.9.5 is preinstalled and should work without any configuration. If you wish to use another language, specify the in the Plugin settings, or create a new language files, attach it to the Plugin topic, and change the Plugin settings
(Dakar) Visit configure in your TWiki installation, and enable the plugin in the {Plugins} section.
Test if the Plugin is correctly installed:
Check above example if there is an [ Edit table ] button below the table in above example
4.7.1: Arthur Clemens: Added warning if include parameter topic does not exist.
22 Dec 2007:
4.7: Arthur Clemens: Changed handling of escaped variables. To escape TWiki variable, use formatting tokens such as $percnt.
16 Dec 2007:
4.6: Kenneth Lavrsen: The plugin prevents TablePlugin from initsorting the table being edited. This is done by temporarily appending the attribute disableallsort="on" to the TABLE tag of a table being edited. Additionally all header sorting is disabled while editing a table by setting a hidden formfield sort to "off". Disabling sorting while editing is needed now that the EditTablePlugin supports moving rows up and down.
01 Dec 2007:
4.3: Arthur Clemens: added support for TablePluginheaderrows and footerrows; updated edit button
Arthur Clemens: Fixed eating of double newlines; icons for javascript buttons and interface improvements. By default the javascript interface is turned off, set JAVASCRIPTINTERFACE to use it in edit mode.
05 Mar 2007:
Byron Darrah: Added ability to dynamically move and delete rows.
This plugin allows you to edit TWiki tables using edit fields and drop down boxes. Tables have an [ Edit table ] button if preceeded by an %EDITTABLE{...}% variable. Each column can be a text field, a drop down box, a date field, etc. Multiple tables per topic are editable, but only one at a time can be edited.
Specify the header format of a new table like "|*Food*|*Drink*|". Useful to start a table with only a button
(no header)
Changed:
< <
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: • Text input field (1 line): | text, <size>, <initial value> | • Textarea input field: | textarea, <rows>x<columns>, <initial value> | • Drop down box: | select, <size>, <option 1>, <option 2>, etc | • Radio buttons: | radio, <size*>, <option 1>, <option 2>, etc | * size indicates the number of buttons per line in edit mode • Checkboxes: | checkbox, <size*>, <option 1>, <option 2>, etc | * size indicates the number of checkboxes per line in edit mode • Fixed label: | label, 0, <label text> | • Row number: | row, <offset> | • Date: | date, <size>, <initial value>, <DHTML date format> | * see Mishoo documentation for more infos about the DHTML date format
"text, 16" for all cells
> >
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: • Text input field (1 line): | text, <size>, <initial value> | • Textarea input field: | textarea, <rows>x<columns>, <initial value> | • Drop down box: | select, <size>, <option 1>, <option 2>, etc* | * only one item can be selected • Radio buttons: | radio, <size*>, <option 1>, <option 2>, etc | * size indicates the number of buttons per line in edit mode • Checkboxes: | checkbox, <size*>, <option 1>, <option 2>, etc | * size indicates the number of checkboxes per line in edit mode • Fixed label: | label, 0, <label text> | • Row number: | row, <offset> | • Date: | date, <size>, <initial value>, <DHTML date format> | * see Mishoo documentation for more infos about the DHTML date format
"text, 16" for all cells
changerows
Rows can be added and removed if "on"; Rows can be added but not removed if "add"
CHANGEROWS Plugin setting
quietsave
Quiet Save button is shown if "on", hidden if "off"
QUIETSAVE Plugin setting
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.
This plugin allows you to edit TWiki tables using edit fields and drop down boxes. Tables have an [ Edit table ] button if preceeded by an %EDITTABLE{...}% variable. Each column can be a text field, a drop down box, a date field, etc. Multiple tables per topic are editable, but only one at a time can be edited.
Line: 121 to 121
#Set EDITBUTTON = Edit table
Set EDITBUTTON = Edit this table,
Changed:
< <
Note: The Plugin uses base settings like language and style from the JSCalendarContrib. The standard date format is '%e %B %Y' and is defined within this plugin.
> >
Note: The Plugin uses base settings like date format, language and style from the JSCalendarContrib.
Limitations and Known Issues
Line: 150 to 150
pub/TWiki/EditTablePlugin/calendar-system.css
Mishoo DHTML calendar stylesheet
The Plugin depends on the 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.
The Mishoo DHTML calendar 0.9.5 is preinstalled and should work without any configuration. If you wish to use another language, specify the in the Plugin settings, or create a new language files, attach it to the Plugin topic, and change the Plugin settings
Added:
> >
(Dakar) Visit configure in your TWiki installation, and enable the plugin in the {Plugins} section.
Test if the Plugin is correctly installed:
Check above example if there is an [ Edit table ] button below the table in above example
Click on [ Edit table ], make changes and save the table
This plugin allows you to edit TWiki tables using edit fields and drop down boxes. Tables have an [ Edit table ] button if preceeded by an %EDITTABLE{...}% variable. Each column can be a text field, a drop down box, a date field, etc. Multiple tables per topic are editable, but only one at a time can be edited.
Specify the header format of a new table like "|*Food*|*Drink*|". Useful to start a table with only a button
(no header)
Changed:
< <
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: • Text input field (1 line): | text, <size>, <initial value> | • Textarea input field: | textarea, <rows>x<columns>, <initial value> | • Drop down box: | select, <size>, <option 1>, <option 2>, etc | • Radio buttons: | radio, <size*>, <option 1>, <option 2>, etc | * size indicates the number of buttons per line in edit mode • Checkboxes: | checkbox, <size*>, <option 1>, <option 2>, etc | * size indicates the number of checkboxes per line in edit mode • Fixed label: | label, 0, <label text> | • Row number: | row, <offset> | • Date: | date, <size>, <initial value>, <DHTML date format> |
"text, 16" for all cells
> >
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: • Text input field (1 line): | text, <size>, <initial value> | • Textarea input field: | textarea, <rows>x<columns>, <initial value> | • Drop down box: | select, <size>, <option 1>, <option 2>, etc | • Radio buttons: | radio, <size*>, <option 1>, <option 2>, etc | * size indicates the number of buttons per line in edit mode • Checkboxes: | checkbox, <size*>, <option 1>, <option 2>, etc | * size indicates the number of checkboxes per line in edit mode • Fixed label: | label, 0, <label text> | • Row number: | row, <offset> | • Date: | date, <size>, <initial value>, <DHTML date format> | * see Mishoo documentation for more infos about the DHTML date format
"text, 16" for all cells
changerows
Rows can be added and removed if "on"; Rows can be added but not removed if "add"
CHANGEROWS Plugin setting
quietsave
Quiet Save button is shown if "on", hidden if "off"
QUIETSAVE Plugin setting
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.
Note: The Plugin uses base settings like language and style from the JSCalendarContrib. The standard date format is '%e %B %Y' and is defined within this plugin.
Deleted:
< <
Language of DHTML calendar, pointing to attached calendar-<code>.js language file: en, af, br, ca, cs-win, da, de, du, el, es, fr, hr, hr-utf8, hu, it, jp, nl, no, pl, pt, ro, ru, sk, sp, sv, tr, zh
Set JSCALENDARLANGUAGE = en
Additional options of DHTML calendar:
Set JSCALENDAROPTIONS =
Note: The Plugin looks for the JSCALENDAR* settings first in the TWiki Preferences, then in above Plugin settings
Limitations and Known Issues
This Plugin does not support TWiki table formatting like Multi-span cells (e.g. | ... ||) and cell justification (e.g. | centered | right |)
This plugin allows you to edit TWiki tables using edit fields and drop down boxes. Tables have an [ Edit table ] button if preceeded by an %EDITTABLE{...}% variable. Each column can be a text field, a drop down box, a date field, etc. Multiple tables per topic are editable, but only one at a time can be edited.
Specify the header format of a new table like "|*Food*|*Drink*|". Useful to start a table with only a button
(no header)
Changed:
< <
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: - Text input field (1 line): | text, <size>, <initial value> | - Textarea input field: | textarea, <rows>x<columns>, <initial value> | - Drop down box: | select, <size>, <option 1>, <option 2>, etc | - Fixed label: | label, 0, <label text> | - Row number: | row, <offset> | - Date: | date, <size>, <initial value>, <DHTML date format> |
"text, 16" for all cells
> >
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: • Text input field (1 line): | text, <size>, <initial value> | • Textarea input field: | textarea, <rows>x<columns>, <initial value> | • Drop down box: | select, <size>, <option 1>, <option 2>, etc | • Radio buttons: | radio, <size*>, <option 1>, <option 2>, etc | * size indicates the number of buttons per line in edit mode • Checkboxes: | checkbox, <size*>, <option 1>, <option 2>, etc | * size indicates the number of checkboxes per line in edit mode • Fixed label: | label, 0, <label text> | • Row number: | row, <offset> | • Date: | date, <size>, <initial value>, <DHTML date format> |
"text, 16" for all cells
changerows
Rows can be added and removed if "on"; Rows can be added but not removed if "add"
CHANGEROWS Plugin setting
quietsave
Quiet Save button is shown if "on", hidden if "off"
QUIETSAVE Plugin setting
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)
Line: 57 to 57
Examples
Changed:
< <
Line before table: %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; if you were to click on it (please don't, use TWiki:Sandbox.EditTablePluginTesting for testing) you get this form:
This plugin allows you to edit TWiki tables using edit fields and drop down boxes. Tables have an [ Edit table ] button if preceeded by an %EDITTABLE{...}% variable. Each column can be a text field, a drop down box, a date field, etc. Multiple tables per topic are editable, but only one at a time can be edited.
Line: 46 to 46
Changed:
< <
- turn the table into edit mode
> >
- turn the table into edit mode
In edit mode:
Changed:
< <
- save your changes
- save your changes without alerting subscribed WebNotify users
- add row to the table (if enabled)
- remove last row from the table (if enabled)
- cancel without saving and release edit lock
> >
- save your changes
- save your changes without alerting subscribed WebNotify users
If this plugin is installed you will see an [ Edit table ] button above; when you click on it you get this form:
> >
If this plugin is installed you will see an [ Edit table ] button above; if you were to click on it (please don't, use TWiki:Sandbox.EditTablePluginTesting for testing) you get this form:
Line: 73 to 73
1
26 Jun 2002 12:30
2
27 Jun 2002 12:40
Changed:
< <
(demo only, these buttons do not work)
> >
(demo only, these buttons do not work)
The following example shows a simple table with key/value rows. The default edit field type for the value column is a text field. This is overloaded by a selector for the Gender, and a date picker for the DOB. This is typically used by TWiki applications where new topics with tables are created based on a template topic.
Line: 134 to 134
Limitations and Known Issues
Deleted:
< <
Bug: The Plugin fails if the table is at the very end of the topic (without a new line) Always ensure there is a newline after the table
This Plugin does not support TWiki table formatting like Multi-span cells (e.g. | ... ||) and cell justification (e.g. | centered | right |)
There is a performance issue when editing a large table, say, with more then 50 rows
Variables like %ATTACHURL% get expanded unless they are in a label
This plugin allows you to edit TWiki tables using edit fields and drop down boxes. Tables have an [ Edit table ] button if preceeded by an %EDITTABLE{...}% variable. Each column can be a text field, a drop down box, a date field, etc. Multiple tables per topic are editable, but only one at a time can be edited.
This plugin allows you to edit TWiki tables using edit fields and drop down boxes. Tables have an [ Edit table ] button if preceeded by an %EDITTABLE{...}% variable. Each column can be a text field, a drop down box, a date field, etc. Multiple tables per topic are editable, but only one at a time can be edited.
This plugin allows you to edit TWiki tables using edit fields and drop down boxes. Tables have an [ Edit table ] button if preceeded by an %EDITTABLE{...}% variable. Each column can be a text field, a drop down box, a date field, etc. Multiple tables per topic are editable, but only one at a time can be edited.
Line: 13 to 13
header
Specify the header format of a new table like "|*Food*|*Drink*|". Useful to start a table with only a button
(no header)
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: - Text input field (1 line): | text, <size>, <initial value> | - Textarea input field: | textarea, <rows>x<columns>, <initial value> | - Drop down box: | select, <size>, <option 1>, <option 2>, etc | - Fixed label: | label, 0, <label text> | - Row number: | row, <offset> | - Date: | date, <size>, <initial value>, <DHTML date format> |
"text, 16" for all cells
changerows
Rows can be added and removed if "on"; Rows can be added but not removed if "add"
CHANGEROWS Plugin setting
Added:
> >
quietsave
Quiet Save button is shown if "on", hidden if "off"
QUIETSAVE Plugin setting
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 %STOPINCLUDE% variables can be used in the topic to specify what is shown.
(no help text)
headerislabel
Table header cells are read-only (labels) if "on"; header cells can be edited if "off" or "0"
"on"
Line: 111 to 112
Default for change rows flag: on, off, add
Set CHANGEROWS = on
Changed:
< <
Default text for edit button:
Set EDITBUTTON = Edit table
> >
Default flag for quiet save option: on to show the Quiet Save button, off to hide
This plugin allows you to edit TWiki tables using edit fields and drop down boxes. Tables have an [ Edit table ] button if preceeded by an %EDITTABLE{...}% variable. Each column can be a text field, a drop down box, a date field, etc. Multiple tables per topic are editable, but only one at a time can be edited.
Line: 10 to 10
Add a %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:
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)
> >
header
Specify the header format of a new table like "|*Food*|*Drink*|". Useful to start a table with only a button
(no header)
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: - Text input field (1 line): | text, <size>, <initial value> | - Textarea input field: | textarea, <rows>x<columns>, <initial value> | - Drop down box: | select, <size>, <option 1>, <option 2>, etc | - Fixed label: | label, 0, <label text> | - Row number: | row, <offset> | - Date: | date, <size>, <initial value>, <DHTML date format> |
"text, 16" for all cells
changerows
Rows can be added and removed if "on"; Rows can be added but not removed if "add"
CHANGEROWS Plugin setting
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 %STOPINCLUDE% variables can be used in the topic to specify what is shown.
(no help text)
headerislabel
Table header cells are read-only (labels) if "on"; header cells can be edited if "off" or "0"
"on"
Changed:
< <
editbutton
Set edit button text, e.g. "Edit this table"; set button image with alt text, e.g. "Edit table, %PUBURL%/%TWIKIWEB%/TWikiDocGraphics/edittopic.gif"; hide button, e.g. "hide" (Note: Automatically hidden if edit button is present in a cell)
EDITBUTTON Plugin setting
> >
editbutton
Set edit button text, e.g. "Edit this table"; set button image with alt text, e.g. "Edit table, %PUBURL%/%TWIKIWEB%/TWikiDocGraphics/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 Plugin setting
Initial Values
Line: 35 to 35
Per Cell Settings
Changed:
< <
The edit field type can be defined for each table cell by placing an %EDITCELL{ "type, ..." }% variable after the cell content. This is useful to override the per column %EDITTABLE{ format="..." }% settings, or to create tables with key/value rows. All edit field types of the format="..." parameter are supported, e.g. to define a text field, type: | cell content %EDITCELL{ "text, 20" }% |
> >
An individual edit field type can be defined for each table cell. Place an %EDITCELL{ "type, ..." }% variable at the end of the cell content. This is useful to override the per column %EDITTABLE{ format="..." }% settings, or to create tables with key/value rows. All edit field types of the format="..." parameter are supported. For example, to define a text field, type: | cell content %EDITCELL{ "text, 20" }% |
Changed:
< <
It is also possible to place the edit button into a cell instead of default location below the table. Type | %EDITCELL{ "editbutton, 1, Edit this table" }% | to show a button, or | %EDITCELL{ "editbutton, 1, Edit table, Image-URL" }% | to show a button image with alternate text.
> >
It is also possible to place the edit button inside a cell instead of default location below the table. Type | %EDITCELL{ "editbutton, 1, Edit this table" }% | to show a button, or | %EDITCELL{ "editbutton, 1, Edit table, Image-URL" }% | to show a button image with alternate text.
Changed:
< <
Note: The EDITCELL variable cannot be used by itself; place an EDITTABLE variable at the beginning of a table where you want to use EDITCELL variables.
> >
Note: The %EDITCELL{ }%=variable cannot be used by itself; place an =%EDITTABLE{ }%=variable at the beginning of a table where you want to use =%EDITCELL{ }% variables.
Table Buttons
Line: 90 to 90
City:
New York
Changed:
< <
You get:
<-- /editTable -->
> >
Screenshot:
Screenshot in edit mode:
Plugin Settings
Line: 147 to 145
Download the ZIP file from the Plugin web (see below)
Unzip EditTablePlugin.zip in your twiki installation directory. Content:
The Plugin depends on the 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.
The Mishoo DHTML calendar 0.9.5 is preinstalled and should work without any configuration. If you wish to use another language, specify the in the Plugin settings, or create a new language files, attach it to the Plugin topic, and change the Plugin settings
This plugin allows you to edit TWiki tables using edit fields and drop down boxes. Tables have an [ Edit table ] button if preceeded by an %EDITTABLE{...}% variable. Each column can be a text field, a drop down box or a row number. Multiple tables per topic are editable, but only one at a time can be edited.
> >
This plugin allows you to edit TWiki tables using edit fields and drop down boxes. Tables have an [ Edit table ] button if preceeded by an %EDITTABLE{...}% variable. Each column can be a text field, a drop down box, a date field, etc. Multiple tables per topic are editable, but only one at a time can be edited.
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)
Changed:
< <
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 input field (1 line): | text, <size>, <initial value> | - Textarea input field: | textarea, <rows>x<columns>, <initial value> | - Drop down box: | select, <size>, <option 1>, <option 2>, etc | - Fixed label: | label, 0, <label text> | - Row number: | row, <offset> | - Date: | date, <size>, <initial value>, <DHTML date format> |
"text, 16" for all cells
> >
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: - Text input field (1 line): | text, <size>, <initial value> | - Textarea input field: | textarea, <rows>x<columns>, <initial value> | - Drop down box: | select, <size>, <option 1>, <option 2>, etc | - Fixed label: | label, 0, <label text> | - Row number: | row, <offset> | - Date: | date, <size>, <initial value>, <DHTML date format> |
"text, 16" for all cells
changerows
Rows can be added and removed if "on"; Rows can be added but not removed if "add"
CHANGEROWS Plugin setting
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 %STOPINCLUDE% variables can be used in the topic to specify what is shown.
(no help text)
Added:
> >
headerislabel
Table header cells are read-only (labels) if "on"; header cells can be edited if "off" or "0"
"on"
editbutton
Set edit button text, e.g. "Edit this table"; set button image with alt text, e.g. "Edit table, %PUBURL%/%TWIKIWEB%/TWikiDocGraphics/edittopic.gif"; hide button, e.g. "hide" (Note: Automatically hidden if edit button is present in a cell)
EDITBUTTON Plugin setting
Changed:
< <
Note: By default, variables in <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:
> >
Initial Values
By default, variables in <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:
Double quote ("). Alternatively write \" to escape it
$percnt
Percent sign (%)
$dollar
Dollar sign ($)
$nop or $nop()
Is a "no operation"
Added:
> >
Date Field Type
The date field type allows one to choose a date with a popup calendar. Popup calendar works for Netscape 6.0 or better, all other Gecko-based browsers, Internet Explorer 5.0 or better for Windows, Opera 7 and Konqueror 3.1.2. The ... button is inactive if the browser cannot support the popup calendar. It uses the nice Mishoo DHTML calendar, see also TWiki:Codev/JavaScriptDatePickerForForm
Per Cell Settings
The edit field type can be defined for each table cell by placing an %EDITCELL{ "type, ..." }% variable after the cell content. This is useful to override the per column %EDITTABLE{ format="..." }% settings, or to create tables with key/value rows. All edit field types of the format="..." parameter are supported, e.g. to define a text field, type: | cell content %EDITCELL{ "text, 20" }% |
It is also possible to place the edit button into a cell instead of default location below the table. Type | %EDITCELL{ "editbutton, 1, Edit this table" }% | to show a button, or | %EDITCELL{ "editbutton, 1, Edit table, Image-URL" }% | to show a button image with alternate text.
Note: The EDITCELL variable cannot be used by itself; place an EDITTABLE variable at the beginning of a table where you want to use EDITCELL variables.
Table Buttons
Line: 59 to 77
(demo only, these buttons do not work)
Changed:
< <
Date Field Type
> >
The following example shows a simple table with key/value rows. The default edit field type for the value column is a text field. This is overloaded by a selector for the Gender, and a date picker for the DOB. This is typically used by TWiki applications where new topics with tables are created based on a template topic.
Changed:
< <
The date field type allows one to choose a date with a popup calendar. Popup calendar works for Netscape 6.0 or better, all other Gecko-based browsers, Internet Explorer 5.0 or better for Windows, Opera 7 and Konqueror 3.1.2. The ... button is inactive if the browser cannot support the popup calendar. It uses the nice Mishoo DHTML calendar, see also TWiki:Codev/JavaScriptDatePickerForForm
> >
You type:
%EDITTABLE{ format="| label | text, 40 |" }%
|*Key*|*Value*|
| Name: | John Smith |
| Gender: | M %EDITCELL{select, 1, , F, M}% |
| DOB: | 1999/12/31 %EDITCELL{date, 10}% |
| City: | New York |
You get:
<-- /editTable -->
Plugin Settings
Line: 70 to 105
a plugin setting write %<plugin>_<setting>%, for example, %EDITTABLEPLUGIN_SHORTDESCRIPTION%
The Plugin fails if the table is at the very end of the topic (without a new line) Always ensure there is a newline after the table
Variables like %ATTACHURL% get expanded unless they are in a label.
Deleted:
< <
Warning: This plugin uses undocumented functions to read, save and lock a topic. The plugin will likely break in a future TWiki release.
You cannot put two %EDITTABLE% statements on the same line in the source.
You can include %-vars now in select values, by quoting them with
Changed:
< <
<nop>, as in %<nop>X% for , say for instance:
> >
<nop>, as in %<nop>X% for %X%, say for instance:
select,1,%<nop>X%,%<nop>Y%
Plugin Installation Instructions
Line: 113 to 150
data/TWiki/EditTablePlugin.txt
Plugin topic
data/TWiki/EditTablePlugin.txt,v
Plugin topic repository
lib/TWiki/Plugins/EditTablePlugin.pm
Plugin Perl module
Changed:
< <
The plugin depends on the 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.
> >
The Plugin depends on the 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.
The Mishoo DHTML calendar 0.9.5 is preinstalled and should work without any configuration. If you wish to use another language, specify the in the Plugin settings, or create a new language files, attach it to the Plugin topic, and change the Plugin settings
Test if the Plugin is correctly installed:
Check above example if there is an [ Edit table ] button below the table in above example
This plugin allows you to edit TWiki tables using edit fields and drop down boxes. Tables have an [ Edit table ] button if preceeded by an %EDITTABLE{...}% variable. Each column can be a text field, a drop down box or a row number. Multiple tables per topic are editable, but only one at a time can be edited.
Language of DHTML calendar, pointing to attached calendar-<code>.js language file: en, de, es, fr, jp
> >
Language of DHTML calendar, pointing to attached calendar-<code>.js language file: en, af, br, ca, cs-win, da, de, du, el, es, fr, hr, hr-utf8, hu, it, jp, nl, no, pl, pt, ro, ru, sk, sp, sv, tr, zh
Set JSCALENDARLANGUAGE = en
Additional options of DHTML calendar:
Line: 114 to 114
data/TWiki/EditTablePlugin.txt,v
Plugin topic repository
lib/TWiki/Plugins/EditTablePlugin.pm
Plugin Perl module
The plugin depends on the 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.
Changed:
< <
The Mishoo DHTML calendar 0.9.5 is preinstalled and should work without any configuration. If you wish to use another language, attach the language files to the Plugin topic and change the Plugin settings
Test if the plugin is correctly installed:
> >
The Mishoo DHTML calendar 0.9.5 is preinstalled and should work without any configuration. If you wish to use another language, specify the in the Plugin settings, or create a new language files, attach it to the Plugin topic, and change the Plugin settings
Test if the Plugin is correctly installed:
Check above example if there is an [ Edit table ] button below the table in above example
Click on [ Edit table ], make changes and save the table
This plugin allows you to edit TWiki tables using edit fields and drop down boxes. Tables have an [ Edit table ] button if preceeded by an %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.
> >
This plugin allows you to edit TWiki tables using edit fields and drop down boxes. Tables have an [ Edit table ] button if preceeded by an %EDITTABLE{...}% variable. Each column can be a text field, a drop down box or a row number. Multiple tables per topic are editable, but only one at a time can be edited.
Plugin settings are stored as preferences variables. To reference
a plugin setting write %<plugin>_<setting>%, for example, %INTERWIKIPLUGIN_SHORTDESCRIPTION%
Set SHORTDESCRIPTION = Edit TWiki tables using edit fields and drop down boxes.
Set DEBUG to 1 to get debug messages in data/debug.txt. Default: 0
Set DEBUG = 0
Per Table Settings
Add a %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:
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)
Changed:
< <
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 input field (1 line):
| text, <size>, <initial value> |
-Textarea input field:
| textarea, <rows>x<columns>, <initial value> |
- Drop down box:
| select, <size>, <option 1>, <option 2>, etc |
- Fixed label:
| label, 0, <label text> |
- Row number:
| row, <offset> |
- Date:
| date, <sizet> |
"text, 16" for all cells
changerows
Rows can be added and removed if "on"; Rows can be added but not removed if "add"
"on"
> >
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 input field (1 line): | text, <size>, <initial value> | - Textarea input field: | textarea, <rows>x<columns>, <initial value> | - Drop down box: | select, <size>, <option 1>, <option 2>, etc | - Fixed label: | label, 0, <label text> | - Row number: | row, <offset> | - Date: | date, <size>, <initial value>, <DHTML date format> |
"text, 16" for all cells
changerows
Rows can be added and removed if "on"; Rows can be added but not removed if "add"
CHANGEROWS Plugin setting
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 %STOPINCLUDE% variables can be used in the topic to specify what is shown.
(no help text)
Line: 32 to 23
$dollar
Dollar sign ($)
$nop or $nop()
Is a "no operation"
Added:
> >
Table Buttons
Examples
Line before table: %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" }%
Line: 55 to 59
(demo only, these buttons do not work)
Added:
> >
Date Field Type
Added:
> >
The date field type allows one to choose a date with a popup calendar. Popup calendar works for Netscape 6.0 or better, all other Gecko-based browsers, Internet Explorer 5.0 or better for Windows, Opera 7 and Konqueror 3.1.2. The ... button is inactive if the browser cannot support the popup calendar. It uses the nice Mishoo DHTML calendar, see also TWiki:Codev/JavaScriptDatePickerForForm
Plugin Settings
Plugin settings are stored as preferences variables. To reference
a plugin setting write %<plugin>_<setting>%, for example, %EDITTABLEPLUGIN_SHORTDESCRIPTION%
Language of DHTML calendar, pointing to attached calendar-<code>.js language file: en, de, es, fr, jp
Set JSCALENDARLANGUAGE = en
Additional options of DHTML calendar:
Set JSCALENDAROPTIONS =
Note: The Plugin looks for the JSCALENDAR* settings first in the TWiki Preferences, then in above Plugin settings
Limitations and Known Issues
This Plugin does not support TWiki table formatting like Multi-span cells (e.g. | ... ||) and cell justification (e.g. | centered | right |).
Line: 69 to 102
You can include %-vars now in select values, by quoting them with <nop>, as in %<nop>X% for , say for instance: select,1,%<nop>X%,%<nop>Y%
Deleted:
< <
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
Plugin Installation Instructions
Added:
> >
Note: You do not need to install anything on the browser to use this Plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.
Download the ZIP file from the Plugin web (see below)
Unzip EditTablePlugin.zip in your twiki installation directory. Content:
The plugin depends on the 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.
Added:
> >
The Mishoo DHTML calendar 0.9.5 is preinstalled and should work without any configuration. If you wish to use another language, attach the language files to the Plugin topic and change the Plugin settings
Test if the plugin is correctly installed:
Check above example if there is an [ Edit table ] button below the table in above example
Click on [ Edit table ], make changes and save the table
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
Changed:
< <
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
> >
18 Sep 2003:
incompatibility: changed default of changerows to on; support for %-vars, Quiet save 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
Line: 109 to 145
08 Apr 2002:
Check for change permission and edit lock of topic
This plugin allows you to edit TWiki tables using edit fields and drop down boxes. Tables have an [ Edit table ] button if preceeded by an %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.
EditTablePlugin Global Settings
Plugin settings are stored as preferences variables. To reference
a plugin setting write %<plugin>_<setting>%, for example, %INTERWIKIPLUGIN_SHORTDESCRIPTION%
Set SHORTDESCRIPTION = Edit TWiki tables using edit fields and drop down boxes.
Set DEBUG to 1 to get debug messages in data/debug.txt. Default: 0
Set DEBUG = 0
Per Table Settings
Add a %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:
Rows can be added and removed if "on"; Rows can be added but not removed if "add"
"on"
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 input field (1 line):
| text, <size>, <initial value> |
-Textarea input field:
| textarea, <rows>x<columns>, <initial value> |
- Drop down box:
| select, <size>, <option 1>, <option 2>, etc |
- Fixed label:
| label, 0, <label text> |
- Row number:
| row, <offset> |
- Date:
| date, <sizet> |
"text, 16" for all cells
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)
helptopic
Topic name containing help text shown below the table when editing a table. The %STARTINCLUDE% and %STOPINCLUDE% variables can be used in the topic to specify what is shown.
(no help text)
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)
Note: By default, variables in <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:
Double quote ("). Alternatively write \" to escape it
$percnt
Percent sign (%)
$dollar
Dollar sign ($)
$nop or $nop()
Is a "no operation"
Examples
Line before table: %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" }%
<-- /editTable -->
If this plugin is installed you will see an [ Edit table ] button above; when you click on it you get this form:
Limitations and Known Issues
This Plugin does not support TWiki table formatting like Multi-span cells (e.g. | ... ||) and cell justification (e.g. | centered | right |).
There is a performance issue when editing a large table, say, with more then 50 rows.
The Plugin fails if the table is at the very end of the topic (without a new line) Always ensure there is a newline after the table
Variables like %ATTACHURL% get expanded unless they are in a label.
Warning: This plugin uses undocumented functions to read, save and lock a topic. The plugin will likely break in a future TWiki release.
You cannot put two %EDITTABLE% statements on the same line in the source.
You can include %-vars now in select values, by quoting them with <nop>, as in %<nop>X% for , say for instance: 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
Plugin Installation Instructions
Download the ZIP file from the Plugin web (see below)
Unzip EditTablePlugin.zip in your twiki installation directory. Content:
The plugin depends on the 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.
Test if the plugin is correctly installed:
Check above example if there is an [ Edit table ] button below the table in above example
Click on [ Edit table ], make changes and save the table
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