Difference: EditTablePlugin (4 vs. 5)

Revision 52004-02-19 - PeterThoeny

Line: 1 to 1
 

Edit Table Plugin

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:

Parameter Comment Default
Changed:
<
<
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)
>
>
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:

Key Value
Name: John Smith
Gender: M
DOB: 1999/12/31
City: New York
<-- /editTable -->
>
>
Screenshot: EDITCELL Example in view mode
Screenshot in edit mode: EDITCELL Example 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:
    File: Description:
Added:
>
>
lib/TWiki/Plugins/EditTablePlugin.pm Plugin Perl module
 
data/TWiki/EditTablePlugin.txt Plugin topic
data/TWiki/EditTablePlugin.txt,v Plugin topic repository
Changed:
<
<
lib/TWiki/Plugins/EditTablePlugin.pm Plugin Perl module
>
>
pub/TWiki/EditTablePlugin/*.gif Screenshots
pub/TWiki/EditTablePlugin/README Mishoo DHTML calendar README
pub/TWiki/EditTablePlugin/release-notes.html Mishoo DHTML calendar release notes
pub/TWiki/EditTablePlugin/*.js Mishoo DHTML calendar JavaScript files
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
  • Test if the Plugin is correctly installed:
Line: 165 to 168
 

Plugin Info

Plugin Author: TWiki:Main/PeterThoeny
Changed:
<
<
Plugin Version: 17 Feb 2004
>
>
Plugin Version: 18 Feb 2004
 
Change History:
<-- specify latest version first -->
 
Added:
>
>
18 Feb 2004: Doc fixes; allow edit button anywhere in a cell not just at the end of a cell
 
17 Feb 2004: Added per cell definition of edit field types with %EDITCELL{}% variable; added headerislabel and editbutton parameters
20 Dec 2003: Fixed bug where calendar did not work after adding a row (TWiki:Main/PaulineCheung); added all language files of Mishoo DHTML calendar 0.9.5
13 Dec 2003: Added CHANGEROWS, JSCALENDARDATEFORMAT, JSCALENDARLANGUAGE, JSCALENDAROPTIONS settings
Line: 186 to 190
 
CPAN Dependencies: none
Other Dependencies: Mishoo DHTML calendar (version 0.9.5 preinstalled); TWiki version 01 Feb 2003 or later
Perl Version: 5.0
Added:
>
>
TWiki:Plugins/Benchmark: GoodStyle 98%, FormattedSearch 98%, EditTablePlugin 95%
 
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/EditTablePlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/EditTablePluginDev

Related Topics: TWikiPreferences, TWikiPlugins

Changed:
<
<
-- TWiki:Main/PeterThoeny - 17 Feb 2004
>
>
-- TWiki:Main/PeterThoeny - 18 Feb 2004
 
META FILEATTACHMENT attr="h" comment="Screenshot" date="1071361684" name="EditTablePluginCalendarExample.gif" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\EditTablePluginCalendarExample.gif" size="7823" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071361959" name="README" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\README" size="823" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071361968" name="release-notes.html" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\release-notes.html" size="10593" user="PeterThoeny" version="1.1"
Line: 225 to 230
 
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904189" name="calendar-sv.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-sv.js" size="3177" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904199" name="calendar-tr.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-tr.js" size="1736" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904206" name="calendar-zh.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-zh.js" size="1058" user="PeterThoeny" version="1.1"
Added:
>
>
META FILEATTACHMENT attr="h" comment="Screenshot" date="1077169619" name="ScreenshotEditCell1.gif" path="C:\Data\Temp\ScreenshotEditCell1.gif" size="2017" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Screenshot" date="1077169561" name="ScreenshotEditCell2.gif" path="C:\Data\Temp\ScreenshotEditCell2.gif" size="3199" user="PeterThoeny" version="1.1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.EditTablePlugin.