Difference: EditTablePlugin (1 vs. 25)

Revision 252013-12-03 - TWikiContributor

Line: 1 to 1
 

Edit Table Plugin

Revision 242013-02-16 - TWikiContributor

Line: 1 to 1
 

Edit Table Plugin

Revision 232013-01-14 - TWikiContributor

Line: 1 to 1
 

Edit Table Plugin

Revision 222012-11-12 - TWikiContributor

Line: 1 to 1
 

Edit Table Plugin

Revision 212012-07-11 - TWikiContributor

Line: 1 to 1
 

Edit Table Plugin

Revision 202011-07-08 - TWikiContributor

Line: 1 to 1
 

Edit Table Plugin

Revision 192010-11-05 - TWikiContributor

Line: 1 to 1
 

Edit Table Plugin

Changed:
<
<
>
>
 
Changed:
<
<
>
>
 Edit TWiki tables using edit fields, date pickers and drop down boxes

Introduction

Revision 182010-05-26 - TWikiContributor

Line: 1 to 1
Added:
>
>

Edit Table Plugin

 
Changed:
<
<

Edit Table Plugin

>
>
Edit TWiki tables using edit fields, date pickers and drop down boxes

Introduction

  Edit TWiki tables in place, using edit fields and drop down boxes, without having to edit the complete topic.
Line: 15 to 21
  Multiple tables per topic are editable, but only one at a time can be edited.
Deleted:
<
<
 

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.

Changed:
<
<
  • Supported attributes:
    Attribute Comment Default
    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* |
      * 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)
>
>
  • Supported attributes:
    Attribute Comment Default
    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* |
      * 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:
<
<
Edit Table Calendar Example
>
>
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:
>
>
Edit Table Calendar Example
 

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%
 
  • One line description, shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Edit TWiki tables using edit fields, date pickers and drop down boxes
Line: 194 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:
<
<
 

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
Deleted:
<
<

License

  • The Edit Table Plugin is released under the GPL
 

Plugin Info

Plugin Author: Arthur Clemens, TWiki:Main/PeterThoeny
Changed:
<
<
Copyright: © 2008 Arthur Clemens, 2002-2009 TWiki:Main.PeterThoeny (TWIKI.NET) and TWiki Contributors
>
>
Copyright: © 2008 Arthur Clemens;
© 2002-2010 TWiki:Main/PeterThoeny, Twiki, Inc.;
© 2002-2010 TWiki:TWiki/TWikiContributor
 
License: GPL (GNU General Public License)
Changed:
<
<
Plugin Version: 4.9.1 (17 Apr 2009)
>
>
Plugin Version: 5.1 (2010-05-25)
 
Change History:
<-- specify latest version first -->
 
Added:
>
>
2010-05-25: 5.1: TWikibug:Item6324 - Fix for editing a table removing EDITCELL from another table - patch by TWiki:Main/NickThorpe
2010-05-16: 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 TablePlugin headerrows and footerrows; updated edit button
16 Oct 2007: 4.2: Arthur Clemens: refactoring, bug fixes.
07 Oct 2007: 15182: PTh: Added VarEDITTABLE to have it listed in TWikiVariables
Changed:
<
<
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.
>
>
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.
12 Oct 2006: Item2982 Use default date format from JSCalendarContrib
02 Oct 2006: Item2884 Check also for access permission in meta data; proper fix to not warn if oneself has a lock on topic
Line: 252 to 251
 
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
16 Oct 2003: small typo fixed (garbled if ---+ header on top)
Changed:
<
<
15 Oct 2003: new date field type with javascript calendar - CN
>
>
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, Quiet save for saving without notification; all other fixes in Dev topic integrated - CN
Line: 271 to 270
 
Feedback: http://TWiki.org/cgi-bin/view/Plugins/EditTablePluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/EditTablePluginAppraisal
Changed:
<
<
Related Topics: VarEDITTABLE, TWikiPreferences, TWikiPlugins
>
>
Related Topics: VarEDITTABLE, TWikiPreferences, TWikiPlugins
 
Changed:
<
<
META FILEATTACHMENT attr="h" comment="" date="1071283396" name="EditTablePluginCalendarExample.gif" path="EditTablePluginCalendarExample.gif" size="7823" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Screenshot" date="1077050633" name="ScreenshotEditCell1.gif" path="ScreenshotEditCell1.gif" size="2017" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Screenshot" date="1077050702" name="ScreenshotEditCell2.gif" path="ScreenshotEditCell2.gif" size="3199" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1077813483" name="img.gif" path="img.gif" size="145" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1077813470" name="menuarrow.gif" path="menuarrow.gif" size="68" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Edit table image button" date="1077933805" name="edittable.gif" path="edittable.gif" size="298" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Javascript button: move row" date="1077933805" name="btn_move.gif" path="btn_move.gif" size="298" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Javascript button: move target (animated)" date="1077933805" name="btn_target.gif" path="btn_target.gif" size="298" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Javascript button: delete row" date="1077933805" name="btn_delete.gif" path="btn_delete.gif" size="298" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Javascript button: delete (disabled)" date="1077933805" name="btn_delete_disabled.gif" path="btn_delete_disabled.gif" size="298" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Plugin Style Sheet" date="1077933805" name="edittable.css" path="edittable.css" size="298" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Javascript for table editing without page refresh" date="1077933805" name="edittable.js" path="edittable.js" size="298" user="TWikiContributor" version="1.1"
>
>
META FILEATTACHMENT attr="h" comment="" date="1071283396" name="EditTablePluginCalendarExample.gif" path="EditTablePluginCalendarExample.gif" size="7823" user="TWikiContributor" version="1"
META FILEATTACHMENT attr="h" comment="Screenshot" date="1077050633" name="ScreenshotEditCell1.gif" path="ScreenshotEditCell1.gif" size="2017" user="TWikiContributor" version="1"
META FILEATTACHMENT attr="h" comment="Screenshot" date="1077050702" name="ScreenshotEditCell2.gif" path="ScreenshotEditCell2.gif" size="3199" user="TWikiContributor" version="1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1077813483" name="img.gif" path="img.gif" size="145" user="TWikiContributor" version="1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1077813470" name="menuarrow.gif" path="menuarrow.gif" size="68" user="TWikiContributor" version="1"
META FILEATTACHMENT attr="h" comment="Edit table image button" date="1077933805" name="edittable.gif" path="edittable.gif" size="298" user="TWikiContributor" version="1"
META FILEATTACHMENT attr="h" comment="Javascript button: move row" date="1077933805" name="btn_move.gif" path="btn_move.gif" size="298" user="TWikiContributor" version="1"
META FILEATTACHMENT attr="h" comment="Javascript button: move target (animated)" date="1077933805" name="btn_target.gif" path="btn_target.gif" size="298" user="TWikiContributor" version="1"
META FILEATTACHMENT attr="h" comment="Javascript button: delete row" date="1077933805" name="btn_delete.gif" path="btn_delete.gif" size="298" user="TWikiContributor" version="1"
META FILEATTACHMENT attr="h" comment="Javascript button: delete (disabled)" date="1077933805" name="btn_delete_disabled.gif" path="btn_delete_disabled.gif" size="298" user="TWikiContributor" version="1"
META FILEATTACHMENT attr="h" comment="Plugin Style Sheet" date="1077933805" name="edittable.css" path="edittable.css" size="298" user="TWikiContributor" version="1"
META FILEATTACHMENT attr="h" comment="Javascript for table editing without page refresh" date="1077933805" name="edittable.js" path="edittable.js" size="298" user="TWikiContributor" version="1"

Revision 172009-04-18 - TWikiContributor

Line: 1 to 1
Added:
>
>
<--
   Contributions to this plugin are appreciated. Please update the plugin page
   at http://twiki.org/cgi-bin/view/Plugins/EditTablePlugin or provide feedback
   at http://twiki.org/cgi-bin/view/Plugins/EditTablePluginDev.
   If you are a TWiki contributor please update the plugin in the SVN repository.
-->
 

Edit Table Plugin

Edit TWiki tables in place, using edit fields and drop down boxes, without having to edit the complete topic.

Line: 14 to 20
 

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.

Changed:
<
<
  • Supported attributes:
    Attribute Comment Default
    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* |
      * 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)
>
>
  • Supported attributes:
    Attribute Comment Default
    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* |
      * 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.
Changed:
<
<
The format tokens are the same as with FormattedSearch:
>
>
The format tokens are the same as with FormattedSearch:
 
Escape: Expands To:
$n or $n() New line. Use $n() if followed by alphanumeric character, e.g. write Foo$n()Bar instead of Foo$nBar
Line: 82 to 88
 
Changed:
<
<
Nr Text field Drop down Mood Timestamp
>
>
Nr Text field Drop down Mood Timestamp
 
1
Changed:
<
<
smile indifferent frown
>
>
smile indifferent frown
 
26 Jun 2002 12:30
Line: 101 to 107
 

Changed:
<
<
smile indifferent frown
>
>
smile indifferent frown
 
27 Jun 2002 12:40
Line: 151 to 157
 Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, for example, %EDITTABLEPLUGIN_SHORTDESCRIPTION%
Changed:
<
<
>
>
 
    • 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
Line: 211 to 217
 

Plugin Info

Plugin Author: Arthur Clemens, TWiki:Main/PeterThoeny
Changed:
<
<
Copyright: © 2008 Arthur Clemens, 2002-2008 TWiki:Main.PeterThoeny (TWIKI.NET) and TWiki Contributors
>
>
Copyright: © 2008 Arthur Clemens, 2002-2009 TWiki:Main.PeterThoeny (TWIKI.NET) and TWiki Contributors
 
License: GPL (GNU General Public License)
Changed:
<
<
Plugin Version: 4.9 (01 Nov 2008)
>
>
Plugin Version: 4.9.1 (17 Apr 2009)
 
Change History:
<-- specify latest version first -->
 
Added:
>
>
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
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 TablePlugin headerrows and footerrows; updated edit button
16 Oct 2007: 4.2: Arthur Clemens: refactoring, bug fixes.
Changed:
<
<
07 Oct 2007: 15182: PTh: Added VarEDITTABLE to have it listed in TWikiVariables
>
>
07 Oct 2007: 15182: PTh: Added VarEDITTABLE to have it listed in TWikiVariables
 
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.
12 Oct 2006: Item2982 Use default date format from JSCalendarContrib
Line: 259 to 266
 
05 Apr 2002: Initial version
Dependencies: None
Perl Version: 5.0
Changed:
<
<
TWiki:Plugins/Benchmark: GoodStyle 98%, FormattedSearch 98%, EditTablePlugin 95%
>
>
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
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/EditTablePluginAppraisal
Changed:
<
<
Related Topics: VarEDITTABLE, TWikiPreferences, TWikiPlugins
>
>
Related Topics: VarEDITTABLE, TWikiPreferences, TWikiPlugins
 
META FILEATTACHMENT attr="h" comment="" date="1071283396" name="EditTablePluginCalendarExample.gif" path="EditTablePluginCalendarExample.gif" size="7823" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Screenshot" date="1077050633" name="ScreenshotEditCell1.gif" path="ScreenshotEditCell1.gif" size="2017" user="TWikiContributor" version="1.1"

Revision 162007-10-07 - TWikiContributor

Line: 1 to 1
 

Edit Table Plugin

Edit TWiki tables in place, using edit fields and drop down boxes, without having to edit the complete topic.

Line: 210 to 210
 

Plugin Info

Changed:
<
<
Plugin Author: TWiki:Main/PeterThoeny
Copyright: © 2002-2008, TWiki:Main.PeterThoeny (TWIKI.NET) and TWiki Contributors
>
>
Plugin Author: Arthur Clemens, TWiki:Main/PeterThoeny
Copyright: © 2008 Arthur Clemens, 2002-2008 TWiki:Main.PeterThoeny (TWIKI.NET) and TWiki Contributors
 
License: GPL (GNU General Public License)
Changed:
<
<
Plugin Version: 4.8.4 (03 Aug 2008)
>
>
Plugin Version: 4.9 (01 Nov 2008)
 
Change History:
<-- specify latest version first -->
 
Changed:
<
<
03 Aug 2008: 4.8.4 TWiki 4.2.1 release version
19 Jul 2008: 4.8.3 Bugfix release
>
>
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
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.

Revision 152007-10-07 - TWikiContributor

Line: 1 to 1
 

Edit Table Plugin

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.
For example:
%EDITTABLE{ format="| label, 0, %SERVERTIME{"$day $mon $year $hour:$min"}% |" }%
... will get expanded to 10 Nov 2024 14:48 when the new row is created.
>
>
Any TWiki variable inside a table cell will be preserved. For instance, %TOPIC% will not get expanded to the current topic name.
 
Changed:
<
<
To prevent variable expansion: escape the format variable with formatting tokens (particularly $percnt).
For example:
%EDITTABLE{ format="| text, 20, $percntY$percnt |" }%
... will create a new row with $percntY$percnt. In view mode this is temporarily translated to %Y% and subsequent rendered as DONE.
>
>
The format tokens are the same as with FormattedSearch:
 
Added:
>
>
Escape: Expands To:
$n or $n() New line. Use $n() if followed by alphanumeric character, e.g. write Foo$n()Bar instead of Foo$nBar
$nop or $nop() Is a "no operation".
$quot Double quote (")
$percnt Percent sign (%)
$dollar Dollar sign ($)
 

Line: 137 to 129
 
Added:
>
>
 
Key Value
Name: John Smith
<-- /editTable -->
Line: 164 to 157
 
  • Set DEBUG to 1 to get debug messages in data/debug.txt. Default: 0
    • Set DEBUG = 0
Changed:
<
<
  • Set JAVASCRIPTINTERFACE to 1 to be able to directly move and delete row without page refresh.
>
>
  • Set JAVASCRIPTINTERFACE to 1 to be able to directly move and delete row without page refresh. Can be overridden with parameter javascriptinterface.
 
    • Set JAVASCRIPTINTERFACE = 1

  • Default for change rows flag: on, off, add
Line: 191 to 184
 
  • 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
Deleted:
<
<
  • Variables like %ATTACHURL% get expanded unless they are in a label
 
  • 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 %X%, say for instance:
    select,1,%<nop>X%,%<nop>Y%
Line: 219 to 211
 

Plugin Info

Plugin Author: TWiki:Main/PeterThoeny
Changed:
<
<
Copyright: © 2002-2007, TWiki:Main.PeterThoeny (TWIKI.NET) and TWiki Contributors
>
>
Copyright: © 2002-2008, TWiki:Main.PeterThoeny (TWIKI.NET) and TWiki Contributors
 
License: GPL (GNU General Public License)
Changed:
<
<
Plugin Version: 4.7.10 (08 Jan 2008)
>
>
Plugin Version: 4.8.4 (03 Aug 2008)
 
Change History:
<-- specify latest version first -->
 
Added:
>
>
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.
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.
Line: 267 to 262
  Related Topics: VarEDITTABLE, TWikiPreferences, TWikiPlugins
Deleted:
<
<
-- TWiki:Main/PeterThoeny - 07 Oct 2007
 
META FILEATTACHMENT attr="h" comment="" date="1071283396" name="EditTablePluginCalendarExample.gif" path="EditTablePluginCalendarExample.gif" size="7823" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Screenshot" date="1077050633" name="ScreenshotEditCell1.gif" path="ScreenshotEditCell1.gif" size="2017" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Screenshot" date="1077050702" name="ScreenshotEditCell2.gif" path="ScreenshotEditCell2.gif" size="3199" user="TWikiContributor" version="1.1"

Revision 142007-10-07 - TWikiContributor

Line: 1 to 1
 

Edit Table Plugin

Changed:
<
<
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.

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.

 

Per Table Settings

Changed:
<
<
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.

  • Supported attributes:
    Attribute Comment Default
    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* |
      * 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

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.

This is useful to write variables like dates into the table.

For example:
%EDITTABLE{ format="| label, 0, %SERVERTIME{"$day $mon $year $hour:$min"}% |" }%
... will get expanded to 10 Nov 2024 14:48 when the new row is created.

To prevent variable expansion: escape the format variable with formatting tokens (particularly $percnt).

For example:
%EDITTABLE{ format="| text, 20, $percntY$percnt |" }%
... will create a new row with $percntY$percnt. In view mode this is temporarily translated to %Y% and subsequent rendered as DONE.
 
Deleted:
<
<
Parameter Comment Default
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* |
  * 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

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:

Text: To Escape:
$quot Double quote ("). Alternatively write \" to escape it
$percnt Percent sign (%)
$dollar Dollar sign ($)
$nop or $nop() Is a "no operation"
 
Added:
>
>
 

Date Field Type

Changed:
<
<
Edit Table Calendar Example 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
>
>
Edit Table Calendar Example

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
 
  • In page view mode:
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:
Changed:
<
<
Nr Text field Drop down Mood Timestamp
1 smile indifferent frown 26 Jun 2002 12:30
2 smile indifferent frown 27 Jun 2002 12:40
(demo only, these buttons do not work)
>
>

Nr Text field Drop down Mood Timestamp
1 smile indifferent frown 26 Jun 2002 12:30
2 smile indifferent frown 27 Jun 2002 12:40
<-- /editTable -->
  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:
<
<
>
>
 You type:
Changed:
<
<
%EDITTABLE{ format="| label | text, 40 |" }%

>
>
You get: Table in edit mode:
%EDITTABLE{ format="| label | text, 40 |" changerows="off" }%
 
Key Value
Name: John Smith
Changed:
<
<
Gender: M %EDITCELL{select, 1, , F, M}%
DOB: 1999/12/31 %EDITCELL{date, 10}%
>
>
Gender: M %EDITCELL{select, 1, , F, M}%
DOB: 1999/12/31 %EDITCELL{date, 10}%
 
City: New York
Changed:
<
<
Screenshot: EDITCELL Example in view mode Screenshot in edit mode: EDITCELL Example in edit mode
>
>
EDITCELL Example in view mode EDITCELL Example in edit mode
 

Plugin Settings

Line: 111 to 164
 
  • Set DEBUG to 1 to get debug messages in data/debug.txt. Default: 0
    • Set DEBUG = 0
Added:
>
>
  • Set JAVASCRIPTINTERFACE to 1 to be able to directly move and delete row without page refresh.
    • Set JAVASCRIPTINTERFACE = 1

 
  • Default for change rows flag: on, off, add
    • Set CHANGEROWS = on

  • Default flag for quiet save option: on to show the Quiet Save button, off to hide
    • Set QUIETSAVE = on
Changed:
<
<
  • Default edit button: Specify button text, or specify alternate text, image URL
    • #Set EDITBUTTON = Edit table
    • Set EDITBUTTON = Edit this table, edittable.gif
>
>
  • 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, edittable.gif
    • 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

  • 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.
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

 
Changed:
<
<
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.
>
>

Installation Instructions

 
  • Download the ZIP file from the Plugin web (see below)
Changed:
<
<
  • Unzip 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
    pub/TWiki/EditTablePlugin/edittable.gif Edit table button image
    pub/TWiki/EditTablePlugin/*.gif Screenshots and Mishoo DHTML calendar images
    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
>
>
  • 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
Line: 158 to 214
 

License

  • The Edit Table Plugin is released under the GPL
Deleted:
<
<
  • The Mishoo DHTML calendar bundled with this Plugin was created by Mihai Bazon and is released under the LGPL -- thanks Mihai for the great tool smile
 

Plugin Info

Changed:
<
<
Plugin Author: Peter Thoeny
Copyright: © 2002-2006, TWiki:Main.PeterThoeny
>
>
Plugin Author: TWiki:Main/PeterThoeny
Copyright: © 2002-2007, TWiki:Main.PeterThoeny (TWIKI.NET) and TWiki Contributors
 
License: GPL (GNU General Public License)
Changed:
<
<
Plugin Version: 12327
>
>
Plugin Version: 4.7.10 (08 Jan 2008)
 
Change History:
<-- specify latest version first -->
 
Added:
>
>
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.
01 Dec 2007: 4.3: Arthur Clemens: added support for TablePlugin headerrows and footerrows; updated edit button
16 Oct 2007: 4.2: Arthur Clemens: refactoring, bug fixes.
07 Oct 2007: 15182: PTh: Added VarEDITTABLE to have it listed in TWikiVariables
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.
 
12 Oct 2006: Item2982 Use default date format from JSCalendarContrib
02 Oct 2006: Item2884 Check also for access permission in meta data; proper fix to not warn if oneself has a lock on topic
30 Aug 2006: Item2829 Remove whitespace from select, radio and checkbox items; restored topic lock if $TWiki::Plugins::VERSION < 1.1
29 Jul 2006: Item2684 - Quietly ignore topic edit locks on table edit
21 Jan 2006: TWiki:Main.CrawfordCurrie ported to TWiki-4.0.0, changed to use JSCalendarContrib
Changed:
<
<
16 Sep 2004: Added radio buttons and checkbox controls; escaped "|" pipe symbol found in input fields to preserve tables
>
>
16 Sep 2004: Added radio buttons and checkbox controls; escaped "|" pipe symbol found in input fields to preserve tables
 
01 Aug 2004: Fixed bug where edittable did not work if at the end of a topic
07 Apr 2004: Fixed bug where two tables got updated when you edit and save a table included into a topic containing other edit tables
02 Mar 2004: Default for %EDITCELL{editbutton}% is EDITBUTTON preference
Line: 202 to 265
 
Feedback: http://TWiki.org/cgi-bin/view/Plugins/EditTablePluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/EditTablePluginAppraisal
Changed:
<
<
Related Topics: TWikiPreferences, TWikiPlugins
>
>
Related Topics: VarEDITTABLE, TWikiPreferences, TWikiPlugins
 
Changed:
<
<
-- TWiki:Main/PeterThoeny - 02 Oct 2006
>
>
-- TWiki:Main/PeterThoeny - 07 Oct 2007
 
Changed:
<
<
META FILEATTACHMENT attr="h" comment="" date="1071283396" name="EditTablePluginCalendarExample.gif" path="EditTablePluginCalendarExample.gif" size="7823" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Screenshot" date="1077050633" name="ScreenshotEditCell1.gif" path="ScreenshotEditCell1.gif" size="2017" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Screenshot" date="1077050702" name="ScreenshotEditCell2.gif" path="ScreenshotEditCell2.gif" size="3199" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1077813483" name="img.gif" path="img.gif" size="145" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1077813470" name="menuarrow.gif" path="menuarrow.gif" size="68" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Edit table image button" date="1077933805" name="edittable.gif" path="edittable.gif" size="298" user="PeterThoeny" version="1.1"
>
>
META FILEATTACHMENT attr="h" comment="" date="1071283396" name="EditTablePluginCalendarExample.gif" path="EditTablePluginCalendarExample.gif" size="7823" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Screenshot" date="1077050633" name="ScreenshotEditCell1.gif" path="ScreenshotEditCell1.gif" size="2017" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Screenshot" date="1077050702" name="ScreenshotEditCell2.gif" path="ScreenshotEditCell2.gif" size="3199" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1077813483" name="img.gif" path="img.gif" size="145" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1077813470" name="menuarrow.gif" path="menuarrow.gif" size="68" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Edit table image button" date="1077933805" name="edittable.gif" path="edittable.gif" size="298" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Javascript button: move row" date="1077933805" name="btn_move.gif" path="btn_move.gif" size="298" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Javascript button: move target (animated)" date="1077933805" name="btn_target.gif" path="btn_target.gif" size="298" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Javascript button: delete row" date="1077933805" name="btn_delete.gif" path="btn_delete.gif" size="298" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Javascript button: delete (disabled)" date="1077933805" name="btn_delete_disabled.gif" path="btn_delete_disabled.gif" size="298" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Plugin Style Sheet" date="1077933805" name="edittable.css" path="edittable.css" size="298" user="TWikiContributor" version="1.1"
META FILEATTACHMENT attr="h" comment="Javascript for table editing without page refresh" date="1077933805" name="edittable.js" path="edittable.js" size="298" user="TWikiContributor" version="1.1"

Revision 132006-12-14 - TWikiContributor

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: 11 to 11
 
Parameter
<-- -->
Sorted ascending
Comment Default
header 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. (none)
Line: 166 to 166
 
Plugin Author: Peter Thoeny
Copyright: © 2002-2006, TWiki:Main.PeterThoeny
License: GPL (GNU General Public License)
Changed:
<
<
Plugin Version: 11706
>
>
Plugin Version: 12327
 
Change History:
<-- specify latest version first -->
 
12 Oct 2006: Item2982 Use default date format from JSCalendarContrib
02 Oct 2006: Item2884 Check also for access permission in meta data; proper fix to not warn if oneself has a lock on topic

Revision 122006-10-03 - TWikiContributor

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: 121 to 121
 
    • #Set EDITBUTTON = Edit table
    • Set EDITBUTTON = Edit this table, edittable.gif
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
Line: 162 to 163
 

Plugin Info

Changed:
<
<
Plugin Author: TWiki:Main/PeterThoeny
Plugin Version: 9598
>
>
Plugin Author: Peter Thoeny
Copyright: © 2002-2006, TWiki:Main.PeterThoeny
License: GPL (GNU General Public License)
Plugin Version: 11706
 
Change History:
<-- specify latest version first -->
 
Added:
>
>
12 Oct 2006: Item2982 Use default date format from JSCalendarContrib
02 Oct 2006: Item2884 Check also for access permission in meta data; proper fix to not warn if oneself has a lock on topic
30 Aug 2006: Item2829 Remove whitespace from select, radio and checkbox items; restored topic lock if $TWiki::Plugins::VERSION < 1.1
29 Jul 2006: Item2684 - Quietly ignore topic edit locks on table edit
 
21 Jan 2006: TWiki:Main.CrawfordCurrie ported to TWiki-4.0.0, changed to use JSCalendarContrib
16 Sep 2004: Added radio buttons and checkbox controls; escaped "|" pipe symbol found in input fields to preserve tables
01 Aug 2004: Fixed bug where edittable did not work if at the end of a topic
Line: 193 to 200
 
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
Added:
>
>
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/EditTablePluginAppraisal
  Related Topics: TWikiPreferences, TWikiPlugins
Changed:
<
<
-- TWiki:Main/PeterThoeny - 16 Sep 2004
>
>
-- TWiki:Main/PeterThoeny - 02 Oct 2006
 
META FILEATTACHMENT attr="h" comment="" date="1071283396" name="EditTablePluginCalendarExample.gif" path="EditTablePluginCalendarExample.gif" size="7823" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Screenshot" date="1077050633" name="ScreenshotEditCell1.gif" path="ScreenshotEditCell1.gif" size="2017" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Screenshot" date="1077050702" name="ScreenshotEditCell2.gif" path="ScreenshotEditCell2.gif" size="3199" user="PeterThoeny" version="1.1"
Changed:
<
<
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1077813483" name="img.gif" path="C:\Data\Temp\img.gif" size="145" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1077813470" name="menuarrow.gif" path="C:\Data\Temp\menuarrow.gif" size="68" user="PeterThoeny" version="1.1"
>
>
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1077813483" name="img.gif" path="img.gif" size="145" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1077813470" name="menuarrow.gif" path="menuarrow.gif" size="68" user="PeterThoeny" version="1.1"
 
META FILEATTACHMENT attr="h" comment="Edit table image button" date="1077933805" name="edittable.gif" path="edittable.gif" size="298" user="PeterThoeny" version="1.1"

Revision 112004-09-17 - TWikiContributor

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: 11 to 11
 
Parameter Comment Default
header 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. (none)
Line: 121 to 121
 
    • #Set EDITBUTTON = Edit table
    • Set EDITBUTTON = Edit this table, edittable.gif
Changed:
<
<

  • 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

>
>
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.
 

Limitations and Known Issues

Line: 172 to 163
 

Plugin Info

Plugin Author: TWiki:Main/PeterThoeny
Changed:
<
<
Plugin Version: 8670
>
>
Plugin Version: 9598
 
Change History:
<-- specify latest version first -->
 
21 Jan 2006: TWiki:Main.CrawfordCurrie ported to TWiki-4.0.0, changed to use JSCalendarContrib
16 Sep 2004: Added radio buttons and checkbox controls; escaped "|" pipe symbol found in input fields to preserve tables

Revision 102004-09-17 - 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: 11 to 11
 
Parameter Comment Default
header 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" }%

Nr Text field sandbox Drop down sandbox Timestamp
1 hello table one 26 Jun 2002 12:30
2   two 27 Jun 2002 12:40
<-- /editTable -->
>
>
Line before table: %EDITTABLE{ format="| row, -1 | text, 20, init | select, 1, one, two, three, four | radio, 3,:-),:-I,:-( | label, 0, %SERVERTIME{"$day $mon $year $hour:$min"}% |" changerows="on" }%

Nr Text field Drop down Mood Timestamp
1 hello table one smile 26 Jun 2002 12:30
2   two frown 27 Jun 2002 12:40
<-- /editTable -->
 
Changed:
<
<
Note: Please use TWiki:Sandbox.EditTablePluginTesting if you want to try out this Plugin
>
>
Note: Please do not save this example table! Use TWiki:Sandbox.EditTablePluginTesting if you want to try out this Plugin
  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:

Changed:
<
<
Nr Text field sandbox Drop down sandbox Timestamp
1 26 Jun 2002 12:30
2 27 Jun 2002 12:40
>
>
Nr Text field Drop down Mood Timestamp
1 smile indifferent frown 26 Jun 2002 12:30
2 smile indifferent frown 27 Jun 2002 12:40
 
Line: 172 to 172
 

Plugin Info

Plugin Author: TWiki:Main/PeterThoeny
Changed:
<
<
Plugin Version: 01 Aug 2004
>
>
Plugin Version: 8670
 
Change History:
<-- specify latest version first -->
 
Added:
>
>
21 Jan 2006: TWiki:Main.CrawfordCurrie ported to TWiki-4.0.0, changed to use JSCalendarContrib
16 Sep 2004: Added radio buttons and checkbox controls; escaped "|" pipe symbol found in input fields to preserve tables
 
01 Aug 2004: Fixed bug where edittable did not work if at the end of a topic
07 Apr 2004: Fixed bug where two tables got updated when you edit and save a table included into a topic containing other edit tables
02 Mar 2004: Default for %EDITCELL{editbutton}% is EDITBUTTON preference
Line: 195 to 197
 
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
Changed:
<
<
CPAN Dependencies: none
Other Dependencies: Mishoo DHTML calendar (version 0.9.5 preinstalled); TWiki version 01 Feb 2003 or later
>
>
Dependencies: None
 
Perl Version: 5.0
TWiki:Plugins/Benchmark: GoodStyle 98%, FormattedSearch 98%, EditTablePlugin 95%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/EditTablePlugin
Line: 204 to 205
  Related Topics: TWikiPreferences, TWikiPlugins
Changed:
<
<
-- TWiki:Main/PeterThoeny - 01 Aug 2004
>
>
-- TWiki:Main/PeterThoeny - 16 Sep 2004
 
Changed:
<
<
META FILEATTACHMENT attr="h" comment="Screenshot" date="1078005196" name="EditTablePluginCalendarExample.gif" path="C:\Data\Temp\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"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071361980" name="calendar.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar.js" size="45484" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071361988" name="calendar-setup.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-setup.js" size="7244" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071361999" name="calendar-system.css" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-system.css" size="5506" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071362008" name="calendar-en.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-en.js" size="3151" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071362034" name="calendar-fr.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-fr.js" size="1148" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071362044" name="calendar-es.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-es.js" size="3365" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071362054" name="calendar-de.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-de.js" size="2493" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071362064" name="calendar-jp.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-jp.js" size="908" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071362076" name="calendar-pt.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-pt.js" size="1131" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071362089" name="calendar-ru.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-ru.js" size="1144" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904035" name="calendar-af.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-af.js" size="1011" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904042" name="calendar-br.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-br.js" size="1112" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904050" name="calendar-ca.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-ca.js" size="1148" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904063" name="calendar-cs-win.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-cs-win.js" size="1351" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904073" name="calendar-da.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-da.js" size="1086" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904083" name="calendar-du.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-du.js" size="1143" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904093" name="calendar-el.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-el.js" size="1237" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904102" name="calendar-hr.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-hr.js" size="3088" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904114" name="calendar-hr-utf8.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-hr-utf8.js" size="1553" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904128" name="calendar-hu.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-hu.js" size="1171" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904135" name="calendar-it.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-it.js" size="2111" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904142" name="calendar-nl.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-nl.js" size="1157" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904149" name="calendar-no.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-no.js" size="1084" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904156" name="calendar-pl.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-pl.js" size="1252" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904164" name="calendar-ro.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-ro.js" size="2016" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904174" name="calendar-sk.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-sk.js" size="2636" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904181" name="calendar-sp.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-sp.js" size="1111" user="PeterThoeny" version="1.1"
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"
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"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1078005090" name="img.gif" path="C:\Data\Temp\img.gif" size="145" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1078005104" name="menuarrow.gif" path="C:\Data\Temp\menuarrow.gif" size="68" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Edit button image" date="1078004977" name="edittable.gif" path="C:\Data\Temp\edittable.gif" size="298" user="PeterThoeny" version="1.1"
>
>
META FILEATTACHMENT attr="h" comment="" date="1071283396" name="EditTablePluginCalendarExample.gif" path="EditTablePluginCalendarExample.gif" size="7823" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Screenshot" date="1077050633" name="ScreenshotEditCell1.gif" path="ScreenshotEditCell1.gif" size="2017" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Screenshot" date="1077050702" name="ScreenshotEditCell2.gif" path="ScreenshotEditCell2.gif" size="3199" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1077813483" name="img.gif" path="C:\Data\Temp\img.gif" size="145" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1077813470" name="menuarrow.gif" path="C:\Data\Temp\menuarrow.gif" size="68" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Edit table image button" date="1077933805" name="edittable.gif" path="edittable.gif" size="298" user="PeterThoeny" version="1.1"

Revision 92004-08-02 - 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: 46 to 46
 
  • In page view mode:
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
 

Examples

Line: 63 to 63
 
1 hello table one 26 Jun 2002 12:30
2   two 27 Jun 2002 12:40
Changed:
<
<
Note: Please use TWiki:Sandbox.EditTablePluginTesting if you want to try out this Plugin
>
>
Note: Please use TWiki:Sandbox.EditTablePluginTesting if you want to try out this Plugin
 
Changed:
<
<
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:
<
<
  • ALERT! 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
Line: 173 to 172
 

Plugin Info

Plugin Author: TWiki:Main/PeterThoeny
Changed:
<
<
Plugin Version: 07 Apr 2004
>
>
Plugin Version: 01 Aug 2004
 
Change History:
<-- specify latest version first -->
 
Added:
>
>
01 Aug 2004: Fixed bug where edittable did not work if at the end of a topic
 
07 Apr 2004: Fixed bug where two tables got updated when you edit and save a table included into a topic containing other edit tables
02 Mar 2004: Default for %EDITCELL{editbutton}% is EDITBUTTON preference
27 Feb 2004: Added QUIETSAVE setting and quietsave parameter; image for Edit button
Line: 204 to 204
  Related Topics: TWikiPreferences, TWikiPlugins
Changed:
<
<
-- TWiki:Main/PeterThoeny - 07 Apr 2004
>
>
-- TWiki:Main/PeterThoeny - 01 Aug 2004
 
META FILEATTACHMENT attr="h" comment="Screenshot" date="1078005196" name="EditTablePluginCalendarExample.gif" path="C:\Data\Temp\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"

Revision 82004-05-09 - 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: 63 to 63
 
1 hello table one 26 Jun 2002 12:30
2   two 27 Jun 2002 12:40
Added:
>
>
Note: Please use TWiki:Sandbox.EditTablePluginTesting if you want to try out this Plugin
 If this plugin is installed you will see an [ Edit table ] button above; when you click on it you get this form:

Line: 132 to 134
 

Limitations and Known Issues

Changed:
<
<
  • 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.
  • 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 %X%, say for instance:
>
>
  • ALERT! 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
  • 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 %X%, say for instance:
 
select,1,%<nop>X%,%<nop>Y%

Plugin Installation Instructions

Line: 174 to 173
 

Plugin Info

Plugin Author: TWiki:Main/PeterThoeny
Changed:
<
<
Plugin Version: 02 Mar 2004
>
>
Plugin Version: 07 Apr 2004
 
Change History:
<-- specify latest version first -->
 
Added:
>
>
07 Apr 2004: Fixed bug where two tables got updated when you edit and save a table included into a topic containing other edit tables
 
02 Mar 2004: Default for %EDITCELL{editbutton}% is EDITBUTTON preference
27 Feb 2004: Added QUIETSAVE setting and quietsave parameter; image for Edit button
18 Feb 2004: Doc fixes; allow edit button anywhere in a cell not just at the end of a cell
Line: 204 to 204
  Related Topics: TWikiPreferences, TWikiPlugins
Changed:
<
<
-- TWiki:Main/PeterThoeny - 02 Mar 2004
>
>
-- TWiki:Main/PeterThoeny - 07 Apr 2004
 
META FILEATTACHMENT attr="h" comment="Screenshot" date="1078005196" name="EditTablePluginCalendarExample.gif" path="C:\Data\Temp\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"

Revision 72004-03-21 - 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: 174 to 174
 

Plugin Info

Plugin Author: TWiki:Main/PeterThoeny
Changed:
<
<
Plugin Version: 27 Feb 2004
>
>
Plugin Version: 02 Mar 2004
 
Change History:
<-- specify latest version first -->
 
Added:
>
>
02 Mar 2004: Default for %EDITCELL{editbutton}% is EDITBUTTON preference
 
27 Feb 2004: Added QUIETSAVE setting and quietsave parameter; image for Edit button
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
Line: 203 to 204
  Related Topics: TWikiPreferences, TWikiPlugins
Changed:
<
<
-- TWiki:Main/PeterThoeny - 27 Feb 2004
>
>
-- TWiki:Main/PeterThoeny - 02 Mar 2004
 
META FILEATTACHMENT attr="h" comment="Screenshot" date="1078005196" name="EditTablePluginCalendarExample.gif" path="C:\Data\Temp\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"

Revision 62004-02-28 - 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: 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
    • Set QUIETSAVE = on

  • Default edit button: Specify button text, or specify alternate text, image URL
    • #Set EDITBUTTON = Edit table
    • Set EDITBUTTON = Edit this table, edittable.gif
 
Line: 145 to 150
 
  • Download the ZIP file from the Plugin web (see below)
  • Unzip EditTablePlugin.zip in your twiki installation directory. Content:
    File: Description:
Deleted:
<
<
lib/TWiki/Plugins/EditTablePlugin.pm Plugin Perl module
 
data/TWiki/EditTablePlugin.txt Plugin topic
data/TWiki/EditTablePlugin.txt,v Plugin topic repository
Changed:
<
<
pub/TWiki/EditTablePlugin/*.gif Screenshots
>
>
lib/TWiki/Plugins/EditTablePlugin.pm Plugin Perl module
pub/TWiki/EditTablePlugin/edittable.gif Edit table button image
pub/TWiki/EditTablePlugin/*.gif Screenshots and Mishoo DHTML calendar images
 
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
Line: 168 to 174
 

Plugin Info

Plugin Author: TWiki:Main/PeterThoeny
Changed:
<
<
Plugin Version: 18 Feb 2004
>
>
Plugin Version: 27 Feb 2004
 
Change History:
<-- specify latest version first -->
 
Added:
>
>
27 Feb 2004: Added QUIETSAVE setting and quietsave parameter; image for Edit button
 
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
Line: 196 to 203
  Related Topics: TWikiPreferences, TWikiPlugins
Changed:
<
<
-- 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"
>
>
-- TWiki:Main/PeterThoeny - 27 Feb 2004
META FILEATTACHMENT attr="h" comment="Screenshot" date="1078005196" name="EditTablePluginCalendarExample.gif" path="C:\Data\Temp\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"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071361980" name="calendar.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar.js" size="45484" user="PeterThoeny" version="1.1"
Line: 232 to 239
 
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"
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"
Added:
>
>
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1078005090" name="img.gif" path="C:\Data\Temp\img.gif" size="145" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1078005104" name="menuarrow.gif" path="C:\Data\Temp\menuarrow.gif" size="68" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Edit button image" date="1078004977" name="edittable.gif" path="C:\Data\Temp\edittable.gif" size="298" user="PeterThoeny" version="1.1"

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"

Revision 42004-02-17 - PeterThoeny

Line: 1 to 1
 

Edit Table Plugin

Changed:
<
<
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.
 
Line: 11 to 11
 
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)
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:

 
Text: To Escape:
$quot Double quote ("). Alternatively write \" to escape it
$percnt Percent sign (%)
$dollar Dollar sign ($)
$nop or $nop() Is a "no operation"
Added:
>
>

Date Field Type

Edit Table Calendar Example 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:
<
<
Edit Table Calendar Example 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:

Key Value
Name: John Smith
Gender: M
DOB: 1999/12/31
City: New York
<-- /editTable -->
 

Plugin Settings

Line: 70 to 105
 a plugin setting write %<plugin>_<setting>%, for example, %EDITTABLEPLUGIN_SHORTDESCRIPTION%

Changed:
<
<
    • Set SHORTDESCRIPTION = Edit TWiki tables using edit fields and drop down boxes
>
>
    • 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
    • Set DEBUG = 0
Line: 78 to 113
 
  • Default for change rows flag: on, off, add
    • Set CHANGEROWS = on
Added:
>
>
  • Default text for edit button:
    • Set EDITBUTTON = Edit table
 
Line: 96 to 134
 
  • 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 ALERT!, 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
Line: 128 to 165
 

Plugin Info

Plugin Author: TWiki:Main/PeterThoeny
Changed:
<
<
Plugin Version: 20 Dec 2003
>
>
Plugin Version: 17 Feb 2004
 
Change History:
<-- specify latest version first -->
 
Added:
>
>
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
16 Oct 2003: small typo fixed (garbled if ---+ header on top)
Line: 146 to 184
 
08 Apr 2002: Check for change permission and edit lock of topic
05 Apr 2002: Initial version
CPAN Dependencies: none
Changed:
<
<
Other Dependencies: Mishoo DHTML calendar (version 0.9.5 preinstalled)
>
>
Other Dependencies: Mishoo DHTML calendar (version 0.9.5 preinstalled); TWiki version 01 Feb 2003 or later
 
Perl Version: 5.0
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 - 20 Dec 2003
>
>
-- TWiki:Main/PeterThoeny - 17 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"

Revision 32003-12-20 - 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 or a row number. Multiple tables per topic are editable, but only one at a time can be edited.

Line: 81 to 81
 
Changed:
<
<
  • 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
Line: 128 to 128
 

Plugin Info

Plugin Author: TWiki:Main/PeterThoeny
Changed:
<
<
Plugin Version: 13 Dec 2003
>
>
Plugin Version: 20 Dec 2003
 
Change History:
<-- specify latest version first -->
 
Added:
>
>
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
16 Oct 2003: small typo fixed (garbled if ---+ header on top)
15 Oct 2003: new date field type with javascript calendar - CN
Line: 152 to 153
  Related Topics: TWikiPreferences, TWikiPlugins
Changed:
<
<
-- TWiki:Main/PeterThoeny - 13 Dec 2003
>
>
-- TWiki:Main/PeterThoeny - 20 Dec 2003
 
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: 166 to 167
 
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071362064" name="calendar-jp.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-jp.js" size="908" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071362076" name="calendar-pt.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-pt.js" size="1131" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071362089" name="calendar-ru.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-ru.js" size="1144" user="PeterThoeny" version="1.1"
Added:
>
>
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904035" name="calendar-af.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-af.js" size="1011" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904042" name="calendar-br.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-br.js" size="1112" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904050" name="calendar-ca.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-ca.js" size="1148" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904063" name="calendar-cs-win.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-cs-win.js" size="1351" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904073" name="calendar-da.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-da.js" size="1086" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904083" name="calendar-du.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-du.js" size="1143" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904093" name="calendar-el.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-el.js" size="1237" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904102" name="calendar-hr.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-hr.js" size="3088" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904114" name="calendar-hr-utf8.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-hr-utf8.js" size="1553" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904128" name="calendar-hu.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-hu.js" size="1171" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904135" name="calendar-it.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-it.js" size="2111" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904142" name="calendar-nl.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-nl.js" size="1157" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904149" name="calendar-no.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-no.js" size="1084" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904156" name="calendar-pl.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-pl.js" size="1252" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904164" name="calendar-ro.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-ro.js" size="2016" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904174" name="calendar-sk.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-sk.js" size="2636" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071904181" name="calendar-sp.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-sp.js" size="1111" user="PeterThoeny" version="1.1"
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"

Revision 22003-12-14 - PeterThoeny

Line: 1 to 1
Changed:
<
<

Edit Table Plugin

>
>

Edit Table Plugin

 
Changed:
<
<
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.
 
Changed:
<
<

EditTablePlugin Global Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, for example, %INTERWIKIPLUGIN_SHORTDESCRIPTION%

  • One line description, shown in the TextFormattingRules topic:
    • 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

Line: 20 to 11
 
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)
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

  • In page view mode:
    • - turn the table into edit mode
  • In edit mode:
    • - 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
 

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

Edit Table Calendar Example 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%

  • One line description, shown in the TextFormattingRules topic:
    • 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

  • Default for change rows flag: on, off, add
    • Set CHANGEROWS = on

  • 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

Line: 69 to 102
 
  • You can include %-vars now in select values, by quoting them with <nop>, as in %<nop>X% for ALERT!, say for instance:
    select,1,%<nop>X%,%<nop>Y%
Deleted:
<
<
 

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:
    File: Description:
Line: 85 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.
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
Added:
>
>

License

  • The Edit Table Plugin is released under the GPL
  • The Mishoo DHTML calendar bundled with this Plugin was created by Mihai Bazon and is released under the LGPL -- thanks Mihai for the great tool smile
 

Plugin Info

Changed:
<
<
Plugin Author: PeterThoeny
Plugin Version: 16 Oct 2003
>
>
Plugin Author: TWiki:Main/PeterThoeny
Plugin Version: 13 Dec 2003
 
Change History:
<-- specify latest version first -->
 
Added:
>
>
13 Dec 2003: Added CHANGEROWS, JSCALENDARDATEFORMAT, JSCALENDARLANGUAGE, JSCALENDAROPTIONS settings
 
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
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
05 Apr 2002: Initial version
CPAN Dependencies: none
Changed:
<
<
Other Dependencies: none
>
>
Other Dependencies: Mishoo DHTML calendar (version 0.9.5 preinstalled)
 
Perl Version: 5.0
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/EditTablePlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/EditTablePluginDev

Related Topics: TWikiPreferences, TWikiPlugins

Changed:
<
<
-- PeterThoeny - 08 Nov 2002
>
>
-- TWiki:Main/PeterThoeny - 13 Dec 2003
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"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071361980" name="calendar.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar.js" size="45484" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071361988" name="calendar-setup.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-setup.js" size="7244" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071361999" name="calendar-system.css" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-system.css" size="5506" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071362008" name="calendar-en.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-en.js" size="3151" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071362034" name="calendar-fr.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-fr.js" size="1148" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071362044" name="calendar-es.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-es.js" size="3365" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071362054" name="calendar-de.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-de.js" size="2493" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071362064" name="calendar-jp.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-jp.js" size="908" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071362076" name="calendar-pt.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-pt.js" size="1131" user="PeterThoeny" version="1.1"
META FILEATTACHMENT attr="h" comment="Component of Mishoo DHTML calendar" date="1071362089" name="calendar-ru.js" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-ru.js" size="1144" user="PeterThoeny" version="1.1"

Revision 12003-12-12 - PeterThoeny

Line: 1 to 1
Added:
>
>

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 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%

  • One line description, shown in the TextFormattingRules topic:
    • 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:

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 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"
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)

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:

Text: To Escape:
$quot 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" }%

Nr Text field sandbox Drop down sandbox Timestamp
1 hello table one 26 Jun 2002 12:30
2   two 27 Jun 2002 12:40
<-- /editTable -->

If this plugin is installed you will see an [ Edit table ] button above; when you click on it you get this form:

Nr Text field sandbox Drop down sandbox Timestamp
1 26 Jun 2002 12:30
2 27 Jun 2002 12:40
(demo only, these buttons do not work)

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 ALERT!, 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:
    File: Description:
    data/TWiki/EditTablePlugin.txt Plugin topic
    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.
  • 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

Plugin Info

Plugin Author: PeterThoeny
Plugin Version: 16 Oct 2003
Change History:
<-- specify latest version first -->
 
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

Related Topics: TWikiPreferences, TWikiPlugins

-- PeterThoeny - 08 Nov 2002

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2024 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.