data/TWiki/EditTablePlugin.txt,v
changeset 0 414e01d06fd5
child 1 e2915a7cbdfa
equal deleted inserted replaced
-1:000000000000 0:414e01d06fd5
       
     1 head	1.14;
       
     2 access;
       
     3 symbols;
       
     4 locks; strict;
       
     5 comment	@# @;
       
     6 
       
     7 
       
     8 1.14
       
     9 date	2008.01.22.03.21.31;	author TWikiContributor;	state Exp;
       
    10 branches;
       
    11 next	1.13;
       
    12 
       
    13 1.13
       
    14 date	2007.01.16.04.11.56;	author TWikiContributor;	state Exp;
       
    15 branches;
       
    16 next	1.12;
       
    17 
       
    18 1.12
       
    19 date	2006.10.25.00.21.55;	author TWikiContributor;	state Exp;
       
    20 branches;
       
    21 next	1.11;
       
    22 
       
    23 1.11
       
    24 date	2006.04.01.05.55.29;	author TWikiContributor;	state Exp;
       
    25 branches;
       
    26 next	1.10;
       
    27 
       
    28 1.10
       
    29 date	2006.02.01.12.01.22;	author TWikiContributor;	state Exp;
       
    30 branches;
       
    31 next	1.9;
       
    32 
       
    33 1.9
       
    34 date	2004.08.02.05.45.34;	author PeterThoeny;	state Exp;
       
    35 branches;
       
    36 next	1.8;
       
    37 
       
    38 1.8
       
    39 date	2004.05.09.07.21.28;	author PeterThoeny;	state Exp;
       
    40 branches;
       
    41 next	1.7;
       
    42 
       
    43 1.7
       
    44 date	2004.03.21.08.21.54;	author PeterThoeny;	state Exp;
       
    45 branches;
       
    46 next	1.6;
       
    47 
       
    48 1.6
       
    49 date	2004.02.28.21.51.00;	author PeterThoeny;	state Exp;
       
    50 branches;
       
    51 next	1.5;
       
    52 
       
    53 1.5
       
    54 date	2004.02.19.05.48.00;	author PeterThoeny;	state Exp;
       
    55 branches;
       
    56 next	1.4;
       
    57 
       
    58 1.4
       
    59 date	2004.02.17.11.20.39;	author PeterThoeny;	state Exp;
       
    60 branches;
       
    61 next	1.3;
       
    62 
       
    63 1.3
       
    64 date	2003.12.20.07.47.00;	author PeterThoeny;	state Exp;
       
    65 branches;
       
    66 next	1.2;
       
    67 
       
    68 1.2
       
    69 date	2003.12.14.00.53.00;	author PeterThoeny;	state Exp;
       
    70 branches;
       
    71 next	1.1;
       
    72 
       
    73 1.1
       
    74 date	2003.12.12.08.31.00;	author PeterThoeny;	state Exp;
       
    75 branches;
       
    76 next	;
       
    77 
       
    78 
       
    79 desc
       
    80 @none
       
    81 @
       
    82 
       
    83 
       
    84 1.14
       
    85 log
       
    86 @buildrelease
       
    87 @
       
    88 text
       
    89 @%META:TOPICINFO{author="TWikiContributor" date="1191744279" format="1.1" version="14"}%
       
    90 ---+!! Edit Table Plugin
       
    91 
       
    92 Edit TWiki tables in place, using edit fields and drop down boxes, without having to edit the complete topic. 
       
    93 
       
    94 Simply add an *[&nbsp;Edit&nbsp;table&nbsp;]* button to an existing table by writing =%<nop>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.
       
    95 
       
    96 Customize entry fields by specifying the format: use a text field, a drop down box, a date field, radio buttons or checkboxes.
       
    97 
       
    98 Multiple tables per topic are editable, but only one at a time can be edited.
       
    99 
       
   100 %TOC%
       
   101 
       
   102 ---++ Per Table Settings
       
   103 
       
   104 Add a =%<nop>EDITTABLE{...}%= variable just before an existing table to make it editable, or add the variable anywhere in a topic to start a new table.
       
   105 %INCLUDE{"%TWIKIWEB%.VarEDITTABLE" section="edittable_attributes"}%
       
   106 
       
   107 ---+++ Using TWiki Variables in the Format Parameter
       
   108 
       
   109 TWiki variables like =%<nop>Y%= in =&lt;initial value&gt;= (of text input field) and =&lt;label text&gt;= (of fixed label) will get expanded when a new row is added.
       
   110 
       
   111 This is useful to write variables like dates into the table.
       
   112 <blockquote>
       
   113 For example:
       
   114 <verbatim>
       
   115 %EDITTABLE{ format="| label, 0, %SERVERTIME{"$day $mon $year $hour:$min"}% |" }%
       
   116 </verbatim>
       
   117 ... will get expanded to =%SERVERTIME{"$day $mon $year $hour:$min"}%= when the new row is created.
       
   118 </blockquote>
       
   119 
       
   120 To prevent variable expansion: escape the format variable with [[%TWIKIWEB%.FormatTokens][formatting tokens]] (particularly =$percnt=).
       
   121 <blockquote>
       
   122 For example:
       
   123 <verbatim>
       
   124 %EDITTABLE{ format="| text, 20, $percntY$percnt |" }%
       
   125 </verbatim>
       
   126 ... will create a new row with =$percntY$percnt=. In view mode this is temporarily translated to =%<nop>Y%= and subsequent rendered as %Y%.
       
   127 </blockquote>
       
   128 
       
   129 
       
   130 
       
   131 #DateField
       
   132 ---+++ Date Field Type
       
   133 
       
   134 <img src="%ATTACHURLPATH%/EditTablePluginCalendarExample.gif" alt="Edit Table Calendar Example" width="638" height="250" />
       
   135 
       
   136 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. 
       
   137 
       
   138 
       
   139 ---++ Per Cell Settings
       
   140 
       
   141 An individual edit field type can be defined for each table cell. Place an =%<nop>EDITCELL{ "type, ..." }%= variable at the end of the cell content. This is useful to override the per column =%<nop>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 %<nop>EDITCELL{ "text, 20" }% |=
       
   142 
       
   143 It is also possible to place the edit button inside a cell instead of default location below the table. Type =| %<nop>EDITCELL{ "editbutton, 1, Edit this table" }% |= to show a button, or =| %<nop>EDITCELL{ "editbutton, 1, Edit table, Image-URL" }% |= to show a button image with alternate text.
       
   144 
       
   145 __Note:__ The =%<nop>EDITCELL{ }%=variable cannot be used by itself; place an =%<nop>EDITTABLE{ }%=variable at the beginning of a table where you want to use =%<nop>EDITCELL{ }%= variables.
       
   146 
       
   147 ---++ Table Buttons
       
   148 
       
   149 <form>
       
   150    * In page view mode:
       
   151       * <input type="submit" class="twikiSubmit" name="et"   value="Edit table" onclick="return(false);" /> - turn the table into edit mode
       
   152    * In edit mode:
       
   153       * <input type="submit" class="twikiButton" name="etsave"   value="Save table"  onclick="return(false);" /> - save your changes
       
   154       * <input type="submit" class="twikiButton" name="etqsave"   value="Quiet save"  onclick="return(false);" /> - save your changes without alerting subscribed WebNotify users
       
   155       * <input type="submit" class="twikiButton" name="etaddrow" value="Add row" onclick="return(false);" /> - add row to the table (if enabled)
       
   156       * <input type="submit" class="twikiButton" name="etdelrow" value="Delete last row" onclick="return(false);" /> - remove last row from the table (if enabled)
       
   157       * <input type="submit" class="twikiButtonCancel" name="etcancel" value="Cancel" onclick="return(false);" /> - cancel without saving and release edit lock
       
   158       * <img src="%ATTACHURLPATH%/btn_move.gif"> - Move a row by clicking this button next to the row to
       
   159          be moved, then at a destination.
       
   160       * <img src="%ATTACHURLPATH%/btn_delete.gif"> - Deletes the row next to this button.
       
   161 </form>
       
   162 
       
   163 ---++ Examples
       
   164 
       
   165 Line before table: =%<nop>EDITTABLE{ format="| row, -1 | text, 20, init | select, 1, one, two, three, four | radio, 3,:-),:-I,:-( | label, 0, %<nop>SERVERTIME{"$day $mon $year $hour:$min"}% |" changerows="on" }%=
       
   166 %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" }%
       
   167 |*Nr*|*Text field*|*Drop down*|*Mood*|*Timestamp*|
       
   168 | 1 | hello table | one | :-) | 26 Jun 2002 12:30 |
       
   169 | 2 |  | two | :-( | 27 Jun 2002 12:40 |
       
   170 
       
   171 %RED% __Note:__ Please do not save this example table! Use TWiki:Sandbox.EditTablePluginTesting if you want to try out this Plugin %ENDCOLOR%
       
   172 
       
   173 If this plugin is installed you will see an *[&nbsp;Edit&nbsp;table&nbsp;]* button above; if you were to click on it (please don't, use TWiki:Sandbox.EditTablePluginTesting for testing) you get this form:
       
   174 
       
   175 <a name="edittable1"></a>
       
   176 <div class="editTable editTableEdit">
       
   177 <input type="hidden" name="ettablenr" value="1" />
       
   178 <table cellspacing="0" id="default" cellpadding="0" class="twikiTable" rules="rows" border="1">
       
   179 	<thead>
       
   180 	<tr class="twikiTableEven twikiTableRowdataBgSorted0 twikiTableRowdataBg0">
       
   181 		<th bgcolor="#6b7f93" valign="top" class="twikiTableCol0 twikiFirstCol"> <a rel="nofollow" href="%SCRIPTURL{"viewauth"}%/%TWIKIWEB%/EditTablePlugin?ettablenr=1&amp;amp;etedit=on&amp;amp;etrows=3&amp;amp;x=27&amp;amp;y=13&amp;amp;sortcol=0;table=2;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Nr<input type="hidden" name="etcell1x1" value="*Nr*" /></font></a> </th>
       
   182 		<th bgcolor="#6b7f93" valign="top" class="twikiTableCol1"> <a rel="nofollow" href="%SCRIPTURL{"viewauth"}%/%TWIKIWEB%/EditTablePlugin?ettablenr=1&amp;amp;etedit=on&amp;amp;etrows=3&amp;amp;x=27&amp;amp;y=13&amp;amp;sortcol=1;table=2;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Text field<input type="hidden" name="etcell1x2" value="*Text field*" /></font></a> </th>
       
   183 		<th bgcolor="#6b7f93" valign="top" class="twikiTableCol2"> <a rel="nofollow" href="%SCRIPTURL{"viewauth"}%/%TWIKIWEB%/EditTablePlugin?ettablenr=1&amp;amp;etedit=on&amp;amp;etrows=3&amp;amp;x=27&amp;amp;y=13&amp;amp;sortcol=2;table=2;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Drop down<input type="hidden" name="etcell1x3" value="*Drop down*" /></font></a> </th>
       
   184 		<th bgcolor="#6b7f93" valign="top" class="twikiTableCol3"> <a rel="nofollow" href="%SCRIPTURL{"viewauth"}%/%TWIKIWEB%/EditTablePlugin?ettablenr=1&amp;amp;etedit=on&amp;amp;etrows=3&amp;amp;x=27&amp;amp;y=13&amp;amp;sortcol=3;table=2;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Mood<input type="hidden" name="etcell1x4" value="*Mood*" /></font></a> </th>
       
   185 		<th bgcolor="#6b7f93" valign="top" class="twikiTableCol4 twikiLastCol"> <a rel="nofollow" href="%SCRIPTURL{"viewauth"}%/%TWIKIWEB%/EditTablePlugin?ettablenr=1&amp;amp;etedit=on&amp;amp;etrows=3&amp;amp;x=27&amp;amp;y=13&amp;amp;sortcol=4;table=2;up=0#sorted_table" title="Sort by this column"><font color="#ffffff">Timestamp<input type="hidden" name="etcell1x5" value="*Timestamp*" /></font></a> </th>
       
   186 	</tr>
       
   187 	</thead>
       
   188 	<tr class="twikiTableOdd twikiTableRowdataBgSorted0 twikiTableRowdataBg0">
       
   189 		<td bgcolor="#ffffff" valign="top" class="twikiTableCol0 twikiFirstCol"> <span class="et_rowlabel">1<input type="hidden" name="etcell2x1" value="1" /></span> </td>
       
   190 		<td bgcolor="#ffffff" valign="top" class="twikiTableCol1"> <input class="twikiInputField editTableInput" type="text" name="etcell2x2" size="20" value="hello table" /> </td>
       
   191 		<td bgcolor="#ffffff" valign="top" class="twikiTableCol2"> <select class="twikiSelect" name="etcell2x3" size="1"> <option selected="selected">one</option> <option>two</option> <option>three</option> <option>four</option></select> </td>
       
   192 		<td bgcolor="#ffffff" valign="top" class="twikiTableCol3"> <input type="radio" name="etcell2x4" value=":-)" checked="checked" /> <img src="%PUBURL%/%TWIKIWEB%/SmiliesPlugin/smile.gif" alt="smile" title="smile" border="0" />  <input type="radio" name="etcell2x4" value=":-I" /> <img src="%PUBURL%/%TWIKIWEB%/SmiliesPlugin/indifferent.gif" alt="indifferent" title="indifferent" border="0" />  <input type="radio" name="etcell2x4" value=":-(" /> <img src="%PUBURL%/%TWIKIWEB%/SmiliesPlugin/frown.gif" alt="frown" title="frown" border="0" /> </td>
       
   193 		<td bgcolor="#ffffff" valign="top" class="twikiTableCol4 twikiLastCol"> 26 Jun 2002 12:30<input type="hidden" name="etcell2x5" value="26 Jun 2002 12:30" /> </td>
       
   194 	</tr>
       
   195 	<tr class="twikiTableEven twikiTableRowdataBgSorted1 twikiTableRowdataBg1">
       
   196 		<td bgcolor="#edf4f9" valign="top" class="twikiTableCol0 twikiFirstCol twikiLast"> <span class="et_rowlabel">2<input type="hidden" name="etcell3x1" value="2" /></span> </td>
       
   197 		<td bgcolor="#edf4f9" valign="top" class="twikiTableCol1 twikiLast"> <input class="twikiInputField editTableInput" type="text" name="etcell3x2" size="20" value="" /> </td>
       
   198 
       
   199 		<td bgcolor="#edf4f9" valign="top" class="twikiTableCol2 twikiLast"> <select class="twikiSelect" name="etcell3x3" size="1"> <option>one</option> <option selected="selected">two</option> <option>three</option> <option>four</option></select> </td>
       
   200 		<td bgcolor="#edf4f9" valign="top" class="twikiTableCol3 twikiLast"> <input type="radio" name="etcell3x4" value=":-)" /> <img src="%PUBURL%/%TWIKIWEB%/SmiliesPlugin/smile.gif" alt="smile" title="smile" border="0" />  <input type="radio" name="etcell3x4" value=":-I" /> <img src="%PUBURL%/%TWIKIWEB%/SmiliesPlugin/indifferent.gif" alt="indifferent" title="indifferent" border="0" />  <input type="radio" name="etcell3x4" value=":-(" checked="checked" /> <img src="%PUBURL%/%TWIKIWEB%/SmiliesPlugin/frown.gif" alt="frown" title="frown" border="0" /> </td>
       
   201 		<td bgcolor="#edf4f9" valign="top" class="twikiTableCol4 twikiLastCol twikiLast"> 27 Jun 2002 12:40<input type="hidden" name="etcell3x5" value="27 Jun 2002 12:40" /> </td>
       
   202 	</tr></table>
       
   203 <input type="hidden" name="etrows" value="3" />
       
   204 <input type="submit" name="etsave" id="etsave" value="Save table" class="twikiSubmit" />
       
   205 <input type="submit" name="etqsave" id="etqsave" value="Quiet save" class="twikiButton" />
       
   206 <input type="submit" name="etaddrow" id="etaddrow" value="Add row" class="twikiButton" />
       
   207 <input type="submit" name="etdelrow" id="etdelrow" value="Delete last row" class="twikiButton" />
       
   208 <input type="submit" name="etcancel" id="etcancel" value="Cancel" class="twikiButton twikiButtonCancel" />
       
   209 </div><!-- /editTable -->
       
   210 
       
   211 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.
       
   212 
       
   213 <table style="background:#f2f2f2;" cellpadding="6">
       
   214 <tr>
       
   215 <th>
       
   216 You type:
       
   217 </th>
       
   218 <th>
       
   219 You get:
       
   220 </th>
       
   221 <th>
       
   222 Table in edit mode:
       
   223 </th>
       
   224 </tr>
       
   225 <tr>
       
   226 <td valign="top">
       
   227 <verbatim>
       
   228 %EDITTABLE{ format="| label | text, 40 |" changerows="off" }%
       
   229 |*Key*|*Value*|
       
   230 | Name: | John Smith |
       
   231 | Gender: | M %EDITCELL{select, 1, , F, M}% |
       
   232 | DOB: | 1999/12/31 %EDITCELL{date, 10}% |
       
   233 | City: | New York |
       
   234 </verbatim>
       
   235 </td>
       
   236 <td valign="top">
       
   237 <img src="%ATTACHURLPATH%/ScreenshotEditCell1.gif" alt="EDITCELL Example in view mode" width="150" height="172" />
       
   238 </td>
       
   239 <td valign="top">
       
   240 <img src="%ATTACHURLPATH%/ScreenshotEditCell2.gif" alt="EDITCELL Example in edit mode" width="436" height="198" />
       
   241 </td>
       
   242 </tr></table>
       
   243 
       
   244 ---++ Plugin Settings
       
   245 
       
   246 Plugin settings are stored as preferences variables. To reference
       
   247 a plugin setting write ==%<nop>&lt;plugin&gt;_&lt;setting&gt;%==, for example, ==%<nop>EDITTABLEPLUGIN_SHORTDESCRIPTION%==
       
   248 
       
   249    * One line description, shown in the %TWIKIWEB%.TextFormattingRules topic:
       
   250       * Set SHORTDESCRIPTION = Edit TWiki tables using edit fields, date pickers and drop down boxes
       
   251 
       
   252    * Set DEBUG to 1 to get debug messages in =data/debug.txt=.  Default: =0=
       
   253       * Set DEBUG = 0
       
   254 
       
   255    * Set JAVASCRIPTINTERFACE to 1 to be able to directly move and delete row without page refresh.
       
   256       * Set JAVASCRIPTINTERFACE = 1
       
   257    
       
   258    * Default for change rows flag: =on=, =off=, =add=
       
   259       * Set CHANGEROWS = on
       
   260 
       
   261    * Default flag for quiet save option: =on= to show the Quiet Save button, =off= to hide
       
   262       * Set QUIETSAVE = on
       
   263 
       
   264    * Default edit button: Specify =button text=, or specify =alternate text, image URL=. Note: Texts inside =%<nop>MAKETEXT{}%= are translated into other languages.
       
   265       * #Set EDIT_BUTTON = %MAKETEXT{"Edit table"}%
       
   266       * Set EDIT_BUTTON = %MAKETEXT{"Edit this table"}%, %ATTACHURL%/edittable.gif
       
   267       * Set SAVE_BUTTON = %MAKETEXT{"Save table"}%
       
   268       * Set QUIET_SAVE_BUTTON = %MAKETEXT{"Quiet save"}%
       
   269       * Set ADD_ROW_BUTTON = %MAKETEXT{"Add row"}%
       
   270       * Set DELETE_LAST_ROW_BUTTON = %MAKETEXT{"Delete last row"}%
       
   271       * Set CANCEL_BUTTON = %MAKETEXT{"Cancel"}%
       
   272 
       
   273    * Default help texts
       
   274       * Set INCLUDED_TOPIC_DOES_NOT_EXIST = <span class="twikiAlert">%MAKETEXT{"Warning: 'include' topic does not exist!"}%</span>
       
   275    
       
   276 __Note:__ The Plugin uses base settings like date format, language and style from the JSCalendarContrib.
       
   277 
       
   278 ---++ Limitations and Known Issues
       
   279 
       
   280    * This Plugin does not support TWiki table formatting like Multi-span cells (e.g. =| ... ||=) and cell justification (e.g. =|  centered  |   right |=)
       
   281    * There is a performance issue when editing a large table, say, with more then 50 rows
       
   282    * Variables like =%<nop>ATTACHURL%= get expanded unless they are in a label
       
   283    * You cannot put two =%<nop>EDITTABLE{}%= statements on the same line in the source
       
   284    * You can include %-vars now in select values, by quoting them with &lt;nop&gt;, as in %&lt;nop&gt;X% for %<nop>X%, say for instance:
       
   285      <br /> =select,1,%&lt;nop&gt;X%,%&lt;nop&gt;Y%=
       
   286 
       
   287 
       
   288 
       
   289 ---++ Installation Instructions
       
   290 
       
   291    * Download the ZIP file from the Plugin web (see below)
       
   292    * Unzip ==%TOPIC%.zip== in your ($TWIKI_ROOT) directory.
       
   293    * Alternatively,
       
   294       * Manually resolve the dependencies listed below.
       
   295       None
       
   296    * The Plugin depends on the =viewauth= script to authenticate the user. As described in %TWIKIWEB%.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.
       
   297    * (Dakar) Visit =configure= in your TWiki installation, and enable the plugin in the {Plugins} section.
       
   298    * Test if the Plugin is correctly installed:
       
   299       * Check above example if there is an *[&nbsp;Edit&nbsp;table&nbsp;]* button below the table in above example
       
   300       * Click on *[&nbsp;Edit&nbsp;table&nbsp;]*, make changes and save the table
       
   301 
       
   302 ---++ License
       
   303 
       
   304    * The Edit Table Plugin is released under the [[http://www.gnu.org/licenses/gpl.html][GPL]]
       
   305 
       
   306 
       
   307 ---++ Plugin Info
       
   308 
       
   309 |  Plugin Author: | TWiki:Main/PeterThoeny |
       
   310 |  Copyright: | &copy; 2002-2007, TWiki:Main.PeterThoeny ([[http://www.twiki.net/][TWIKI.NET]]) and TWiki Contributors |
       
   311 |  License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) |
       
   312 |  Plugin Version: | 4.7.10 (08 Jan 2008) |
       
   313 |  Change History: | <!-- specify latest version first -->&nbsp; |
       
   314 |  25 Dec 2007: | 4.7.1: Arthur Clemens: Added warning if =include= parameter topic does not exist. |
       
   315 |  22 Dec 2007: | 4.7: Arthur Clemens: Changed handling of escaped variables. To escape TWiki variable, use formatting tokens such as =$percnt=. |
       
   316 |  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. |
       
   317 |  01 Dec 2007: | 4.3:  Arthur Clemens: added support for TablePlugin =headerrows= and =footerrows=; updated edit button |
       
   318 |  16 Oct 2007: | 4.2:  Arthur Clemens: refactoring, bug fixes. |
       
   319 |  07 Oct 2007: | 15182: PTh: Added %TWIKIWEB%.VarEDITTABLE to have it listed in %TWIKIWEB%.TWikiVariables |
       
   320 |  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. |
       
   321 |  05 Mar 2007: | Byron Darrah: Added ability to dynamically move and delete rows. |
       
   322 |  12 Oct 2006: | <a rel="nofollow" href="http://develop.twiki.org/~develop/cgi-bin/view/Bugs/Item2982">Item2982</a> Use default date format from JSCalendarContrib |
       
   323 |  02 Oct 2006: | <a rel="nofollow" href="http://develop.twiki.org/~develop/cgi-bin/view/Bugs/Item2884">Item2884</a> Check also for access permission in meta data; proper fix to not warn if oneself has a lock on topic |
       
   324 |  30 Aug 2006: | <a rel="nofollow" href="http://develop.twiki.org/~develop/cgi-bin/view/Bugs/Item2829">Item2829</a> Remove whitespace from select, radio and checkbox items; restored topic lock if $TWiki::Plugins::VERSION < 1.1 |
       
   325 |  29 Jul 2006: | <a rel='nofollow' href='http://develop.twiki.org/~develop/cgi-bin/view/Bugs/Item2684'>Item2684</a> - Quietly ignore topic edit locks on table edit |
       
   326 |  21 Jan 2006: | TWiki:Main.CrawfordCurrie ported to TWiki-4.0.0, changed to use JSCalendarContrib |
       
   327 |  16 Sep 2004: | Added radio buttons and checkbox controls; escaped "%VBAR%" pipe symbol found in input fields to preserve tables |
       
   328 |  01 Aug 2004: | Fixed bug where edittable did not work if at the end of a topic |
       
   329 |  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 |
       
   330 |  02 Mar 2004: | Default for =%<nop>EDITCELL{editbutton}%= is EDITBUTTON preference |
       
   331 |  27 Feb 2004: | Added QUIETSAVE setting and =quietsave= parameter; image for Edit button |
       
   332 |  18 Feb 2004: | Doc fixes; allow edit button anywhere in a cell not just at the end of a cell |
       
   333 |  17 Feb 2004: | Added per cell definition of edit field types with =%<nop>EDITCELL{}%= variable; added =headerislabel= and =editbutton= parameters |
       
   334 |  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 |
       
   335 |  13 Dec 2003: | Added CHANGEROWS, JSCALENDARDATEFORMAT, JSCALENDARLANGUAGE, JSCALENDAROPTIONS settings |
       
   336 |  16 Oct 2003: | small typo fixed (garbled if ---<nop>+ header on top) |
       
   337 |  15 Oct 2003: | new date field type with javascript calendar - CN |
       
   338 |  14 Oct 2003: | docfix: the documentation page was an old one - CN |
       
   339 |  13 Oct 2003: | bugfix: %-vars in select were resetted to first on add/del row - CN |
       
   340 |  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 |
       
   341 |  08 Nov 2002: | Prevent variable expansion in label text; added escape characters |
       
   342 |  27 Jun 2002: | New =helptopic= parameter |
       
   343 |  26 Jun 2002: | Support for variables in included EDITTABLE parameters; fixed problem with HTML in cells |
       
   344 |  21 May 2002: | Added fixed label format; new =changerows="add"= parameter |
       
   345 |  27 Apr 2002: | Fixed bug where text after a double quote in a cell disappeared |
       
   346 |  18 Apr 2002: | Fixed bug where table was breaking when pasting multiple lines into an edit field using Netscape on Unix |
       
   347 |  08 Apr 2002: | Check for change permission and edit lock of topic |
       
   348 |  05 Apr 2002: | Initial version |
       
   349 |  Dependencies: | None |
       
   350 |  Perl Version: | 5.0 |
       
   351 |  TWiki:Plugins/Benchmark: | %TWIKIWEB%.GoodStyle 98%, %TWIKIWEB%.FormattedSearch 98%, %TOPIC% 95% |
       
   352 |  Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC% |
       
   353 |  Feedback: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev |
       
   354 |  Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Appraisal |
       
   355 
       
   356 __Related Topics:__  %TWIKIWEB%.VarEDITTABLE, %TWIKIWEB%.TWikiPreferences, %TWIKIWEB%.TWikiPlugins
       
   357 
       
   358 -- TWiki:Main/PeterThoeny - 07 Oct 2007
       
   359 
       
   360 %META:FILEATTACHMENT{name="EditTablePluginCalendarExample.gif" attr="h" comment="" date="1071283396" path="EditTablePluginCalendarExample.gif" size="7823" user="TWikiContributor" version="1.1"}%
       
   361 %META:FILEATTACHMENT{name="ScreenshotEditCell1.gif" attr="h" comment="Screenshot" date="1077050633" path="ScreenshotEditCell1.gif" size="2017" user="TWikiContributor" version="1.1"}%
       
   362 %META:FILEATTACHMENT{name="ScreenshotEditCell2.gif" attr="h" comment="Screenshot" date="1077050702" path="ScreenshotEditCell2.gif" size="3199" user="TWikiContributor" version="1.1"}%
       
   363 %META:FILEATTACHMENT{name="img.gif" attr="h" comment="Component of Mishoo DHTML calendar" date="1077813483" path="img.gif" size="145" user="TWikiContributor" version="1.1"}%
       
   364 %META:FILEATTACHMENT{name="menuarrow.gif" attr="h" comment="Component of Mishoo DHTML calendar" date="1077813470" path="menuarrow.gif" size="68" user="TWikiContributor" version="1.1"}%
       
   365 %META:FILEATTACHMENT{name="edittable.gif" attr="h" comment="Edit table image button" date="1077933805" path="edittable.gif" size="298" user="TWikiContributor" version="1.1"}%
       
   366 %META:FILEATTACHMENT{name="btn_move.gif" attr="h" comment="Javascript button: move row" date="1077933805" path="btn_move.gif" size="298" user="TWikiContributor" version="1.1"}%
       
   367 %META:FILEATTACHMENT{name="btn_target.gif" attr="h" comment="Javascript button: move target (animated)" date="1077933805" path="btn_target.gif" size="298" user="TWikiContributor" version="1.1"}%
       
   368 %META:FILEATTACHMENT{name="btn_delete.gif" attr="h" comment="Javascript button: delete row" date="1077933805" path="btn_delete.gif" size="298" user="TWikiContributor" version="1.1"}%
       
   369 %META:FILEATTACHMENT{name="btn_delete_disabled.gif" attr="h" comment="Javascript button: delete (disabled)" date="1077933805" path="btn_delete_disabled.gif" size="298" user="TWikiContributor" version="1.1"}%
       
   370 %META:FILEATTACHMENT{name="edittable.css" attr="h" comment="Plugin Style Sheet" date="1077933805" path="edittable.css" size="298" user="TWikiContributor" version="1.1"}%
       
   371 %META:FILEATTACHMENT{name="edittable.js" attr="h" comment="Javascript for table editing without page refresh" date="1077933805" path="edittable.js" size="298" user="TWikiContributor" version="1.1"}%
       
   372 @
       
   373 
       
   374 
       
   375 1.13
       
   376 log
       
   377 @buildrelease
       
   378 @
       
   379 text
       
   380 @d1 1
       
   381 a1 1
       
   382 %META:TOPICINFO{author="TWikiContributor" date="1166056779" format="1.0" version="13"}%
       
   383 d4 7
       
   384 a10 1
       
   385 This plugin allows you to edit TWiki tables using edit fields and drop down boxes. Tables have an *[&nbsp;Edit&nbsp;table&nbsp;]* button if preceeded by an =%<nop>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.
       
   386 d16 25
       
   387 a40 1
       
   388 Add a =%<nop>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:
       
   389 a41 18
       
   390 | *Parameter* | *Comment* | *Default* |
       
   391 | =header= | Specify the header format of a new table like ="&#124;*Food*&#124;*Drink*&#124;"=. Useful to start a table with only a button | (no header) |
       
   392 | =format= | The format of one column when editing the table. A cell can be a text input field, or any of these edit field types:%BR% &#8226; Text input field (1 line):%BR% &nbsp; =&#124; text, &lt;size&gt;, &lt;initial value&gt; &#124;= %BR% &#8226; Textarea input field:%BR% &nbsp; =&#124; textarea, &lt;rows&gt;x&lt;columns&gt;, &lt;initial value&gt; &#124;= %BR% &#8226; Drop down box: %BR% &nbsp; =&#124; select, &lt;size&gt;, &lt;option 1&gt;, &lt;option 2&gt;, etc*<nop> &#124;= %BR% &nbsp; =*= only one item can be selected %BR% &#8226; Radio buttons: %BR% &nbsp; =&#124; radio, &lt;size*&gt;, &lt;option 1&gt;, &lt;option 2&gt;, etc &#124;= %BR% &nbsp; =*= size indicates the number of buttons per line in edit mode %BR% &#8226; Checkboxes: %BR% &nbsp; =&#124; checkbox, &lt;size*&gt;, &lt;option 1&gt;, &lt;option 2&gt;, etc &#124;= %BR% &nbsp; =*= size indicates the number of checkboxes per line in edit mode  %BR% &#8226; Fixed label: %BR% &nbsp; =&#124; label, 0, &lt;label text&gt; &#124;= %BR% &#8226; Row number: %BR% &nbsp; =&#124; row, &lt;offset&gt; &#124;= %BR% &#8226; Date: %BR% &nbsp; =&#124; date, &lt;size&gt;, &lt;initial value&gt;, &lt;DHTML date format&gt; &#124;= %BR% &nbsp; =*= see [[%PUBURL%/%TWIKIWEB%/JSCalendarContrib/doc/html/reference.html][Mishoo documentation]] for more infos about the DHTML date format | ="text, 16"= %BR% for all cells |
       
   393 | =changerows= | Rows can be added and removed if ="on"=;<br /> Rows can be added but not removed if ="add"= | =CHANGEROWS= %BR% Plugin setting |
       
   394 | =quietsave= | Quiet Save button is shown if ="on"=, hidden if ="off"= | =QUIETSAVE= %BR% Plugin setting |
       
   395 | =include= | Other topic defining the EDITTABLE parameters. The first %<nop>EDITTABLE% in the topic is used. This is useful if you have many topics with the same table format and you want to update the format in one place. | (none) |
       
   396 | =helptopic= | Topic name containing help text shown below the table when editing a table. The %<nop>STARTINCLUDE% and %<nop>STOPINCLUDE% variables can be used in the topic to specify what is shown. | (no help text) |
       
   397 | =headerislabel= | Table header cells are read-only (labels) if ="on"=; header cells can be edited if ="off"= or "0" | ="on"= |
       
   398 | =editbutton= | Set edit button text, e.g. ="Edit this table"=; set button image with alt text, e.g. ="Edit table, %<nop>PUBURL%/%<nop>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= %BR% Plugin setting |
       
   399 
       
   400 ---+++ Initial Values
       
   401 
       
   402 By default, variables in =&lt;initial value&gt;= (of text input field) and =&lt;label text&gt;= (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:
       
   403 | *Text:* | *To Escape:* |
       
   404 | =$quot= | Double quote (="=). Alternatively write =\"= to escape it |
       
   405 | =$percnt= | Percent sign (=%=) |
       
   406 | =$dollar= | Dollar sign (=$=) |
       
   407 | =$nop= or =$nop()= | Is a "no operation" |
       
   408 d43 1
       
   409 d46 3
       
   410 a48 2
       
   411 <img src="%ATTACHURLPATH%/EditTablePluginCalendarExample.gif" alt="Edit Table Calendar Example" width="549" height="210" align="left"  />
       
   412 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 [[http://dynarch.com/mishoo/calendar.epl][Mishoo DHTML calendar]], see also TWiki:Codev/JavaScriptDatePickerForForm <br clear="all">
       
   413 d62 11
       
   414 a72 8
       
   415 	* In page view mode:
       
   416 		* <input type="submit" name="et"	value="Edit table" onclick="return(false);" /> - turn the table into edit mode
       
   417 	* In edit mode:
       
   418 		* <input type="submit" name="etsave"	value="Save table"  onclick="return(false);" /> - save your changes
       
   419 		* <input type="submit" name="etqsave"	value="Quiet save"  onclick="return(false);" /> - save your changes without alerting subscribed WebNotify users
       
   420 		* <input type="submit" name="etaddrow" value="Add row" onclick="return(false);" /> - add row to the table (if enabled)
       
   421 		* <input type="submit" name="etdelrow" value="Delete last row" onclick="return(false);" /> - remove last row from the table (if enabled)
       
   422 		* <input type="submit" name="etcancel" value="Cancel" onclick="return(false);" /> - cancel without saving and release edit lock
       
   423 d87 35
       
   424 a121 12
       
   425 <form>
       
   426 <table border="1" cellspacing="1" cellpadding="0">
       
   427 <tr><th bgcolor="#99CCCC"> Nr </th><th bgcolor="#99CCCC"> Text field </th><th bgcolor="#99CCCC"> Drop down </th><th bgcolor="#99CCCC"> Mood </th><th bgcolor="#99CCCC"> Timestamp </th></tr>
       
   428 <tr><td  bgcolor="#FFFFFF"> 1<input type="hidden" name="etcell2x1" value="1" />  </td><td  bgcolor="#FFFFFF"> <input type="text" name="etcell2x2" size="20" value="hello table" />  </td><td  bgcolor="#FFFFFF"> <select name="etcell2x3" size="1"> <option selected="selected">one</option> <option>two</option> <option>three</option> <option>four</option> </select>  </td><td bgcolor="#FFFFFF"> <input type="radio" name="etcell2x4" value=":-)" checked="checked" /> <img src="%PUBURLPATH%/%WEB%/SmiliesPlugin/smile.gif" alt="smile" title="smile" border="0" /> <input type="radio" name="etcell2x4" value=":-I" /> <img src="%PUBURLPATH%/%WEB%/SmiliesPlugin/indifferent.gif" alt="indifferent" title="indifferent" border="0" /> <input type="radio" name="etcell2x4" value=":-(" /> <img src="%PUBURLPATH%/%WEB%/SmiliesPlugin/frown.gif" alt="frown" title="frown" border="0" /> </td><td  bgcolor="#FFFFFF"> 26 Jun 2002 12:30<input type="hidden" name="etcell2x5" value="26 Jun 2002 12:30" />  </td></tr>
       
   429 <tr><td  bgcolor="#FFFF99"> 2<input type="hidden" name="etcell3x1" value="2" />  </td><td  bgcolor="#FFFF99"> <input type="text" name="etcell3x2" size="20" value="" />  </td><td  bgcolor="#FFFF99"> <select name="etcell3x3" size="1"> <option>one</option> <option selected="selected">two</option> <option>three</option> <option>four</option> </select>  </td><td bgcolor="#FFFF99"> <input type="radio" name="etcell2x4" value=":-)" /> <img src="%PUBURLPATH%/%WEB%/SmiliesPlugin/smile.gif" alt="smile" title="smile" border="0" /> <input type="radio" name="etcell2x4" value=":-I" /> <img src="%PUBURLPATH%/%WEB%/SmiliesPlugin/indifferent.gif" alt="indifferent" title="indifferent" border="0" /> <input type="radio" name="etcell2x4" value=":-(" checked="checked" /> <img src="%PUBURLPATH%/%WEB%/SmiliesPlugin/frown.gif" alt="frown" title="frown" border="0" /> </td><td  bgcolor="#FFFF99"> 27 Jun 2002 12:40<input type="hidden" name="etcell3x5" value="27 Jun 2002 12:40" />  </td></tr>
       
   430 </table>
       
   431 <input type="submit" name="etsave"	value="Save table" onclick="return(false);" />
       
   432 <input type="submit" name="etqsave"	value="Quiet save"  onclick="return(false);" />
       
   433 <input type="submit" name="etaddrow" value="Add row" onclick="return(false);" />
       
   434 <input type="submit" name="etdelrow" value="Delete last row" onclick="return(false);" />
       
   435 <input type="submit" name="etcancel" value="Cancel" onclick="return(false);" /> (demo only, these buttons do not work)
       
   436 </form>
       
   437 d125 3
       
   438 a127 1
       
   439 <table><tr><td valign="top">
       
   440 d129 12
       
   441 a140 2
       
   442 <pre>
       
   443 %<nop>EDITTABLE{ format="| label | text, 40 |" }%
       
   444 d143 2
       
   445 a144 2
       
   446 | Gender: | M %<nop>EDITCELL{select, 1, , F, M}% |
       
   447 | DOB: | 1999/12/31 %<nop>EDITCELL{date, 10}% |
       
   448 d146 9
       
   449 a154 8
       
   450 </pre>
       
   451 </td><td valign="top">
       
   452 Screenshot:
       
   453 <img src="%ATTACHURLPATH%/ScreenshotEditCell1.gif" alt="EDITCELL Example in view mode" width="149" height="141" />
       
   454 </td><td valign="top">
       
   455 Screenshot in edit mode:
       
   456 <img src="%ATTACHURLPATH%/ScreenshotEditCell2.gif" alt="EDITCELL Example in edit mode" width="276" height="164" />
       
   457 </td></tr></table>
       
   458 d161 2
       
   459 a162 2
       
   460 	* One line description, shown in the %TWIKIWEB%.TextFormattingRules topic:
       
   461 		* Set SHORTDESCRIPTION = Edit TWiki tables using edit fields, date pickers and drop down boxes
       
   462 d164 2
       
   463 a165 2
       
   464 	* Set DEBUG to 1 to get debug messages in =data/debug.txt=.  Default: =0=
       
   465 		* Set DEBUG = 0
       
   466 d167 22
       
   467 a188 2
       
   468 	* Default for change rows flag: =on=, =off=, =add=
       
   469 		* Set CHANGEROWS = on
       
   470 d190 1
       
   471 a190 2
       
   472 	* Default flag for quiet save option: =on= to show the Quiet Save button, =off= to hide
       
   473 		* Set QUIETSAVE = on
       
   474 d192 6
       
   475 a197 3
       
   476 	* Default edit button: Specify =button text=, or specify =alternate text, image URL=
       
   477 		* #Set EDITBUTTON = Edit table
       
   478 		* Set EDITBUTTON = Edit this table, %ATTACHURL%/edittable.gif
       
   479 a198 1
       
   480 __Note:__ The Plugin uses base settings like date format, language and style from the JSCalendarContrib.
       
   481 a199 1
       
   482 ---++ Limitations and Known Issues
       
   483 d201 12
       
   484 a212 29
       
   485 	* This Plugin does not support TWiki table formatting like Multi-span cells (e.g. =| ... ||=) and cell justification (e.g. =|  centered  |	right |=)
       
   486 	* There is a performance issue when editing a large table, say, with more then 50 rows
       
   487 	* Variables like =%<nop>ATTACHURL%= get expanded unless they are in a label
       
   488 	* You cannot put two =%<nop>EDITTABLE{}%= statements on the same line in the source
       
   489 	* You can include %-vars now in select values, by quoting them with &lt;nop&gt;, as in %&lt;nop&gt;X% for %<nop>X%, say for instance:
       
   490 	  <br /> =select,1,%&lt;nop&gt;X%,%&lt;nop&gt;Y%=
       
   491 
       
   492 ---++ Plugin Installation Instructions
       
   493 
       
   494 __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. 
       
   495 
       
   496 	* Download the ZIP file from the Plugin web (see below)
       
   497 	* Unzip ==%TOPIC%.zip== in your twiki installation directory. Content:
       
   498 	  | *File:* | *Description:* |
       
   499 	  | ==data/TWiki/%TOPIC%.txt== | Plugin topic |
       
   500 	  | ==data/TWiki/%TOPIC%.txt,v== | Plugin topic repository |
       
   501 	  | ==lib/TWiki/Plugins/%TOPIC%.pm== | Plugin Perl module |
       
   502 	  | ==pub/TWiki/%TOPIC%/edittable.gif== | Edit table button image |
       
   503 	  | ==pub/TWiki/%TOPIC%/*.gif== | Screenshots and  Mishoo DHTML calendar images |
       
   504 	  | ==pub/TWiki/%TOPIC%/README== | Mishoo DHTML calendar README |
       
   505 	  | ==pub/TWiki/%TOPIC%/release-notes.html== | Mishoo DHTML calendar release notes |
       
   506 	  | ==pub/TWiki/%TOPIC%/*.js== | Mishoo DHTML calendar <nop>JavaScript files |
       
   507 	  | ==pub/TWiki/%TOPIC%/calendar-system.css== | Mishoo DHTML calendar stylesheet |
       
   508 	* The Plugin depends on the =viewauth= script to authenticate the user. As described in %TWIKIWEB%.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. 
       
   509 	* 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
       
   510 	* (Dakar) Visit =configure= in your TWiki installation, and enable the plugin in the {Plugins} section.
       
   511 	* Test if the Plugin is correctly installed:
       
   512 		* Check above example if there is an *[&nbsp;Edit&nbsp;table&nbsp;]* button below the table in above example
       
   513 		* Click on *[&nbsp;Edit&nbsp;table&nbsp;]*, make changes and save the table
       
   514 d216 1
       
   515 a216 2
       
   516 	* The Edit Table Plugin is released under the [[http://www.gnu.org/licenses/gpl.html][GPL]]
       
   517 	* The [[http://dynarch.com/mishoo/calendar.epl][Mishoo DHTML calendar]] bundled with this Plugin was created by Mihai Bazon and is released under the [[http://www.gnu.org/licenses/lgpl.html][LGPL]] -- thanks Mihai for the great tool :-)
       
   518 d221 2
       
   519 a222 2
       
   520 |  Plugin Author: | [[http://www.structuredwikis.com/][Peter Thoeny]] |
       
   521 |  Copyright: | &copy; 2002-2006, TWiki:Main.PeterThoeny |
       
   522 d224 1
       
   523 a224 1
       
   524 |  Plugin Version: | 12327 |
       
   525 d226 8
       
   526 d239 1
       
   527 a239 1
       
   528 |  16 Sep 2004: | Added radio buttons and checkbox controls; escaped "&#124;" pipe symbol found in input fields to preserve tables |
       
   529 d268 1
       
   530 a268 1
       
   531 __Related Topics:__ %TWIKIWEB%.TWikiPreferences, %TWIKIWEB%.TWikiPlugins
       
   532 d270 1
       
   533 a270 1
       
   534 -- TWiki:Main/PeterThoeny - 02 Oct 2006
       
   535 d272 12
       
   536 a283 6
       
   537 %META:FILEATTACHMENT{name="EditTablePluginCalendarExample.gif" attr="h" comment="" date="1071283396" path="EditTablePluginCalendarExample.gif" size="7823" user="PeterThoeny" version="1.1"}%
       
   538 %META:FILEATTACHMENT{name="ScreenshotEditCell1.gif" attr="h" comment="Screenshot" date="1077050633" path="ScreenshotEditCell1.gif" size="2017" user="PeterThoeny" version="1.1"}%
       
   539 %META:FILEATTACHMENT{name="ScreenshotEditCell2.gif" attr="h" comment="Screenshot" date="1077050702" path="ScreenshotEditCell2.gif" size="3199" user="PeterThoeny" version="1.1"}%
       
   540 %META:FILEATTACHMENT{name="img.gif" attr="h" comment="Component of Mishoo DHTML calendar" date="1077813483" path="img.gif" size="145" user="PeterThoeny" version="1.1"}%
       
   541 %META:FILEATTACHMENT{name="menuarrow.gif" attr="h" comment="Component of Mishoo DHTML calendar" date="1077813470" path="menuarrow.gif" size="68" user="PeterThoeny" version="1.1"}%
       
   542 %META:FILEATTACHMENT{name="edittable.gif" attr="h" comment="Edit table image button" date="1077933805" path="edittable.gif" size="298" user="PeterThoeny" version="1.1"}%
       
   543 @
       
   544 
       
   545 
       
   546 1.12
       
   547 log
       
   548 @buildrelease
       
   549 @
       
   550 text
       
   551 @d1 1
       
   552 a1 1
       
   553 %META:TOPICINFO{author="TWikiContributor" date="1159840454" format="1.0" version="12"}%
       
   554 d14 1
       
   555 a14 1
       
   556 | =format= | The format of one column when editing the table. A cell can be a text input field, or any of these edit field types:%BR% &#8226; Text input field (1 line):%BR% &nbsp; =&#124; text, &lt;size&gt;, &lt;initial value&gt; &#124;= %BR% &#8226; Textarea input field:%BR% &nbsp; =&#124; textarea, &lt;rows&gt;x&lt;columns&gt;, &lt;initial value&gt; &#124;= %BR% &#8226; Drop down box: %BR% &nbsp; =&#124; select, &lt;size&gt;, &lt;option 1&gt;, &lt;option 2&gt;, etc &#124;= %BR% &#8226; Radio buttons: %BR% &nbsp; =&#124; radio, &lt;size*&gt;, &lt;option 1&gt;, &lt;option 2&gt;, etc &#124;= %BR% &nbsp; =*= size indicates the number of buttons per line in edit mode %BR% &#8226; Checkboxes: %BR% &nbsp; =&#124; checkbox, &lt;size*&gt;, &lt;option 1&gt;, &lt;option 2&gt;, etc &#124;= %BR% &nbsp; =*= size indicates the number of checkboxes per line in edit mode  %BR% &#8226; Fixed label: %BR% &nbsp; =&#124; label, 0, &lt;label text&gt; &#124;= %BR% &#8226; Row number: %BR% &nbsp; =&#124; row, &lt;offset&gt; &#124;= %BR% &#8226; Date: %BR% &nbsp; =&#124; date, &lt;size&gt;, &lt;initial value&gt;, &lt;DHTML date format&gt; &#124;= %BR% &nbsp; =*= see [[%PUBURL%/%TWIKIWEB%/JSCalendarContrib/doc/html/reference.html][Mishoo documentation]] for more infos about the DHTML date format | ="text, 16"= %BR% for all cells |
       
   557 d169 1
       
   558 a169 1
       
   559 |  Plugin Version: | 11706 |
       
   560 @
       
   561 
       
   562 
       
   563 1.11
       
   564 log
       
   565 @buildrelease
       
   566 @
       
   567 text
       
   568 @d1 1
       
   569 a1 1
       
   570 %META:TOPICINFO{author="TWikiContributor" date="1095385227" format="1.0" version="11"}%
       
   571 d124 1
       
   572 a124 1
       
   573 __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.
       
   574 d153 1
       
   575 d166 4
       
   576 a169 2
       
   577 |  Plugin Author: | TWiki:Main/PeterThoeny |
       
   578 |  Plugin Version: | 9598 |
       
   579 d171 4
       
   580 d203 1
       
   581 d207 1
       
   582 a207 1
       
   583 -- TWiki:Main/PeterThoeny - 16 Sep 2004
       
   584 d212 2
       
   585 a213 2
       
   586 %META:FILEATTACHMENT{name="img.gif" attr="h" comment="Component of Mishoo DHTML calendar" date="1077813483" path="C:\Data\Temp\img.gif" size="145" user="PeterThoeny" version="1.1"}%
       
   587 %META:FILEATTACHMENT{name="menuarrow.gif" attr="h" comment="Component of Mishoo DHTML calendar" date="1077813470" path="C:\Data\Temp\menuarrow.gif" size="68" user="PeterThoeny" version="1.1"}%
       
   588 @
       
   589 
       
   590 
       
   591 1.10
       
   592 log
       
   593 @buildrelease
       
   594 @
       
   595 text
       
   596 @d1 1
       
   597 a1 1
       
   598 %META:TOPICINFO{author="PeterThoeny" date="1095385227" format="1.0" version="10"}%
       
   599 d14 1
       
   600 a14 1
       
   601 | =format= | The format of one column when editing the table. A cell can be a text input field, or any of these edit field types:%BR% &#8226; Text input field (1 line):%BR% &nbsp; =&#124; text, &lt;size&gt;, &lt;initial value&gt; &#124;= %BR% &#8226; Textarea input field:%BR% &nbsp; =&#124; textarea, &lt;rows&gt;x&lt;columns&gt;, &lt;initial value&gt; &#124;= %BR% &#8226; Drop down box: %BR% &nbsp; =&#124; select, &lt;size&gt;, &lt;option 1&gt;, &lt;option 2&gt;, etc &#124;= %BR% &#8226; Radio buttons: %BR% &nbsp; =&#124; radio, &lt;size*&gt;, &lt;option 1&gt;, &lt;option 2&gt;, etc &#124;= %BR% &nbsp; =*= size indicates the number of buttons per line in edit mode %BR% &#8226; Checkboxes: %BR% &nbsp; =&#124; checkbox, &lt;size*&gt;, &lt;option 1&gt;, &lt;option 2&gt;, etc &#124;= %BR% &nbsp; =*= size indicates the number of checkboxes per line in edit mode  %BR% &#8226; Fixed label: %BR% &nbsp; =&#124; label, 0, &lt;label text&gt; &#124;= %BR% &#8226; Row number: %BR% &nbsp; =&#124; row, &lt;offset&gt; &#124;= %BR% &#8226; Date: %BR% &nbsp; =&#124; date, &lt;size&gt;, &lt;initial value&gt;, &lt;DHTML date format&gt; &#124;= | ="text, 16"= %BR% for all cells |
       
   602 d124 1
       
   603 a124 10
       
   604 	* Date format of [[http://dynarch.com/mishoo/calendar.epl][Mishoo DHTML calendar]]:
       
   605 		* Set JSCALENDARDATEFORMAT = %Y/%m/%d
       
   606 
       
   607 	* Language of DHTML calendar, pointing to attached =calendar-&lt;code&gt;.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=
       
   608 		* Set JSCALENDARLANGUAGE = en
       
   609 
       
   610 	* Additional options of DHTML calendar:
       
   611 		* Set JSCALENDAROPTIONS = 
       
   612 
       
   613 __Note:__ The Plugin looks for the =JSCALENDAR*= settings first in the TWiki Preferences, then in above Plugin settings
       
   614 d166 1
       
   615 a166 1
       
   616 |  Plugin Version: | 8670 |
       
   617 @
       
   618 
       
   619 
       
   620 1.9
       
   621 log
       
   622 @none
       
   623 @
       
   624 text
       
   625 @d1 1
       
   626 a1 1
       
   627 %META:TOPICINFO{author="PeterThoeny" date="1091425534" format="1.0" version="1.9"}%
       
   628 d14 1
       
   629 a14 1
       
   630 | =format= | The format of one column when editing the table. A cell can be a text input field, or any of these edit field types:%BR% - Text input field (1 line):%BR% &nbsp; =&#124; text, &lt;size&gt;, &lt;initial value&gt; &#124;= %BR% - Textarea input field:%BR% &nbsp; =&#124; textarea, &lt;rows&gt;x&lt;columns&gt;, &lt;initial value&gt; &#124;= %BR% - Drop down box: %BR% &nbsp; =&#124; select, &lt;size&gt;, &lt;option 1&gt;, &lt;option 2&gt;, etc &#124;= %BR% - Fixed label: %BR% &nbsp; =&#124; label, 0, &lt;label text&gt; &#124;= %BR% - Row number: %BR% &nbsp; =&#124; row, &lt;offset&gt; &#124;= %BR% - Date: %BR% &nbsp; =&#124; date, &lt;size&gt;, &lt;initial value&gt;, &lt;DHTML date format&gt; &#124;= | ="text, 16"= %BR% for all cells |
       
   631 d60 5
       
   632 a64 5
       
   633 Line before table: =%<nop>EDITTABLE{ header="|*Nr*|*Text field sandbox*|*Drop down sandbox*|*Timestamp*|" format="| row, -1 | text, 20, init | select, 1, one, two, three, four | label, 0, %<nop>SERVERTIME{"$day $mon $year $hour:$min"}% |" changerows="on" }%=
       
   634 %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" }%
       
   635 |*Nr*|*Text field sandbox*|*Drop down sandbox*|*Timestamp*|
       
   636 | 1 | hello table | one | 26 Jun 2002 12:30 |
       
   637 | 2 |  | two | 27 Jun 2002 12:40 |
       
   638 d66 1
       
   639 a66 1
       
   640 %RED% __Note:__ Please use TWiki:Sandbox.EditTablePluginTesting if you want to try out this Plugin %ENDCOLOR%
       
   641 d72 3
       
   642 a74 3
       
   643 <tr><th bgcolor="#99CCCC"> Nr </th><th bgcolor="#99CCCC"> Text field sandbox </th><th bgcolor="#99CCCC"> Drop down sandbox </th><th bgcolor="#99CCCC"> Timestamp </th></tr>
       
   644 <tr><td  bgcolor="#FFFFFF"> 1<input type="hidden" name="etcell2x1" value="1" />  </td><td  bgcolor="#FFFFFF"> <input type="text" name="etcell2x2" size="20" value="hello table" />  </td><td  bgcolor="#FFFFFF"> <select name="etcell2x3" size="1"> <option selected="selected">one</option> <option>two</option> <option>three</option> <option>four</option> </select>  </td><td  bgcolor="#FFFFFF"> 26 Jun 2002 12:30<input type="hidden" name="etcell2x4" value="26 Jun 2002 12:30" />  </td></tr>
       
   645 <tr><td  bgcolor="#FFFF99"> 2<input type="hidden" name="etcell3x1" value="2" />  </td><td  bgcolor="#FFFF99"> <input type="text" name="etcell3x2" size="20" value="" />  </td><td  bgcolor="#FFFF99"> <select name="etcell3x3" size="1"> <option>one</option> <option selected="selected">two</option> <option>three</option> <option>four</option> </select>  </td><td  bgcolor="#FFFF99"> 27 Jun 2002 12:40<input type="hidden" name="etcell3x4" value="27 Jun 2002 12:40" />  </td></tr>
       
   646 d175 1
       
   647 a175 1
       
   648 |  Plugin Version: | 01 Aug 2004 |
       
   649 d177 2
       
   650 d200 1
       
   651 a200 2
       
   652 |  CPAN Dependencies: | none |
       
   653 |  Other Dependencies: | [[http://dynarch.com/mishoo/calendar.epl][Mishoo DHTML calendar]] (version 0.9.5 preinstalled); TWiki version 01 Feb 2003 or later |
       
   654 d208 1
       
   655 a208 1
       
   656 -- TWiki:Main/PeterThoeny - 01 Aug 2004
       
   657 d210 6
       
   658 a215 38
       
   659 %META:FILEATTACHMENT{name="EditTablePluginCalendarExample.gif" attr="h" comment="Screenshot" date="1078005196" path="C:\Data\Temp\EditTablePluginCalendarExample.gif" size="7823" user="PeterThoeny" version="1.1"}%
       
   660 %META:FILEATTACHMENT{name="README" attr="h" comment="Component of Mishoo DHTML calendar" date="1071361959" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\README" size="823" user="PeterThoeny" version="1.1"}%
       
   661 %META:FILEATTACHMENT{name="release-notes.html" attr="h" comment="Component of Mishoo DHTML calendar" date="1071361968" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\release-notes.html" size="10593" user="PeterThoeny" version="1.1"}%
       
   662 %META:FILEATTACHMENT{name="calendar.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071361980" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar.js" size="45484" user="PeterThoeny" version="1.1"}%
       
   663 %META:FILEATTACHMENT{name="calendar-setup.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071361988" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-setup.js" size="7244" user="PeterThoeny" version="1.1"}%
       
   664 %META:FILEATTACHMENT{name="calendar-system.css" attr="h" comment="Component of Mishoo DHTML calendar" date="1071361999" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-system.css" size="5506" user="PeterThoeny" version="1.1"}%
       
   665 %META:FILEATTACHMENT{name="calendar-en.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071362008" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-en.js" size="3151" user="PeterThoeny" version="1.1"}%
       
   666 %META:FILEATTACHMENT{name="calendar-fr.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071362034" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-fr.js" size="1148" user="PeterThoeny" version="1.1"}%
       
   667 %META:FILEATTACHMENT{name="calendar-es.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071362044" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-es.js" size="3365" user="PeterThoeny" version="1.1"}%
       
   668 %META:FILEATTACHMENT{name="calendar-de.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071362054" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-de.js" size="2493" user="PeterThoeny" version="1.1"}%
       
   669 %META:FILEATTACHMENT{name="calendar-jp.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071362064" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-jp.js" size="908" user="PeterThoeny" version="1.1"}%
       
   670 %META:FILEATTACHMENT{name="calendar-pt.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071362076" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-pt.js" size="1131" user="PeterThoeny" version="1.1"}%
       
   671 %META:FILEATTACHMENT{name="calendar-ru.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071362089" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-ru.js" size="1144" user="PeterThoeny" version="1.1"}%
       
   672 %META:FILEATTACHMENT{name="calendar-af.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071904035" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-af.js" size="1011" user="PeterThoeny" version="1.1"}%
       
   673 %META:FILEATTACHMENT{name="calendar-br.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071904042" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-br.js" size="1112" user="PeterThoeny" version="1.1"}%
       
   674 %META:FILEATTACHMENT{name="calendar-ca.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071904050" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-ca.js" size="1148" user="PeterThoeny" version="1.1"}%
       
   675 %META:FILEATTACHMENT{name="calendar-cs-win.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071904063" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-cs-win.js" size="1351" user="PeterThoeny" version="1.1"}%
       
   676 %META:FILEATTACHMENT{name="calendar-da.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071904073" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-da.js" size="1086" user="PeterThoeny" version="1.1"}%
       
   677 %META:FILEATTACHMENT{name="calendar-du.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071904083" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-du.js" size="1143" user="PeterThoeny" version="1.1"}%
       
   678 %META:FILEATTACHMENT{name="calendar-el.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071904093" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-el.js" size="1237" user="PeterThoeny" version="1.1"}%
       
   679 %META:FILEATTACHMENT{name="calendar-hr.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071904102" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-hr.js" size="3088" user="PeterThoeny" version="1.1"}%
       
   680 %META:FILEATTACHMENT{name="calendar-hr-utf8.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071904114" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-hr-utf8.js" size="1553" user="PeterThoeny" version="1.1"}%
       
   681 %META:FILEATTACHMENT{name="calendar-hu.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071904128" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-hu.js" size="1171" user="PeterThoeny" version="1.1"}%
       
   682 %META:FILEATTACHMENT{name="calendar-it.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071904135" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-it.js" size="2111" user="PeterThoeny" version="1.1"}%
       
   683 %META:FILEATTACHMENT{name="calendar-nl.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071904142" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-nl.js" size="1157" user="PeterThoeny" version="1.1"}%
       
   684 %META:FILEATTACHMENT{name="calendar-no.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071904149" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-no.js" size="1084" user="PeterThoeny" version="1.1"}%
       
   685 %META:FILEATTACHMENT{name="calendar-pl.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071904156" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-pl.js" size="1252" user="PeterThoeny" version="1.1"}%
       
   686 %META:FILEATTACHMENT{name="calendar-ro.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071904164" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-ro.js" size="2016" user="PeterThoeny" version="1.1"}%
       
   687 %META:FILEATTACHMENT{name="calendar-sk.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071904174" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-sk.js" size="2636" user="PeterThoeny" version="1.1"}%
       
   688 %META:FILEATTACHMENT{name="calendar-sp.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071904181" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-sp.js" size="1111" user="PeterThoeny" version="1.1"}%
       
   689 %META:FILEATTACHMENT{name="calendar-sv.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071904189" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-sv.js" size="3177" user="PeterThoeny" version="1.1"}%
       
   690 %META:FILEATTACHMENT{name="calendar-tr.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071904199" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-tr.js" size="1736" user="PeterThoeny" version="1.1"}%
       
   691 %META:FILEATTACHMENT{name="calendar-zh.js" attr="h" comment="Component of Mishoo DHTML calendar" date="1071904206" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\calendar-zh.js" size="1058" user="PeterThoeny" version="1.1"}%
       
   692 %META:FILEATTACHMENT{name="ScreenshotEditCell1.gif" attr="h" comment="Screenshot" date="1077169619" path="C:\Data\Temp\ScreenshotEditCell1.gif" size="2017" user="PeterThoeny" version="1.1"}%
       
   693 %META:FILEATTACHMENT{name="ScreenshotEditCell2.gif" attr="h" comment="Screenshot" date="1077169561" path="C:\Data\Temp\ScreenshotEditCell2.gif" size="3199" user="PeterThoeny" version="1.1"}%
       
   694 %META:FILEATTACHMENT{name="img.gif" attr="h" comment="Component of Mishoo DHTML calendar" date="1078005090" path="C:\Data\Temp\img.gif" size="145" user="PeterThoeny" version="1.1"}%
       
   695 %META:FILEATTACHMENT{name="menuarrow.gif" attr="h" comment="Component of Mishoo DHTML calendar" date="1078005104" path="C:\Data\Temp\menuarrow.gif" size="68" user="PeterThoeny" version="1.1"}%
       
   696 %META:FILEATTACHMENT{name="edittable.gif" attr="h" comment="Edit button image" date="1078004977" path="C:\Data\Temp\edittable.gif" size="298" user="PeterThoeny" version="1.1"}%
       
   697 @
       
   698 
       
   699 
       
   700 1.8
       
   701 log
       
   702 @none
       
   703 @
       
   704 text
       
   705 @d1 1
       
   706 a1 1
       
   707 %META:TOPICINFO{author="PeterThoeny" date="1084087287" format="1.0" version="1.8"}%
       
   708 d49 1
       
   709 a49 1
       
   710 		* <input type="submit" name="et"	value="Edit table" onClick="return(false);" /> - turn the table into edit mode
       
   711 d51 5
       
   712 a55 5
       
   713 		* <input type="submit" name="etsave"	value="Save table"  onClick="return(false);" /> - save your changes
       
   714 		* <input type="submit" name="etqsave"	value="Quiet save"  onClick="return(false);" /> - save your changes without alerting subscribed WebNotify users
       
   715 		* <input type="submit" name="etaddrow" value="Add row" onClick="return(false);" /> - add row to the table (if enabled)
       
   716 		* <input type="submit" name="etdelrow" value="Delete last row" onClick="return(false);" /> - remove last row from the table (if enabled)
       
   717 		* <input type="submit" name="etcancel" value="Cancel" onClick="return(false);" /> - cancel without saving and release edit lock
       
   718 d66 1
       
   719 a66 1
       
   720 __Note:__ Please use TWiki:Sandbox.EditTablePluginTesting if you want to try out this Plugin
       
   721 d68 1
       
   722 a68 1
       
   723 If this plugin is installed you will see an *[&nbsp;Edit&nbsp;table&nbsp;]* button above; when you click on it you get this form:
       
   724 d76 5
       
   725 a80 5
       
   726 <input type="submit" name="etsave"	value="Save table" onClick="return(false);" />
       
   727 <input type="submit" name="etqsave"	value="Quiet save"  onClick="return(false);" />
       
   728 <input type="submit" name="etaddrow" value="Add row" onClick="return(false);" />
       
   729 <input type="submit" name="etdelrow" value="Delete last row" onClick="return(false);" />
       
   730 <input type="submit" name="etcancel" value="Cancel" onClick="return(false);" /> (demo only, these buttons do not work)
       
   731 a136 1
       
   732 	* %X% 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
       
   733 d175 1
       
   734 a175 1
       
   735 |  Plugin Version: | 07 Apr 2004 |
       
   736 d177 1
       
   737 d207 1
       
   738 a207 1
       
   739 -- TWiki:Main/PeterThoeny - 07 Apr 2004
       
   740 @
       
   741 
       
   742 
       
   743 1.7
       
   744 log
       
   745 @none
       
   746 @
       
   747 text
       
   748 @d1 208
       
   749 a208 207
       
   750 %META:TOPICINFO{author="PeterThoeny" date="1079857314" format="1.0" version="1.7"}%
       
   751 ---+!! Edit Table Plugin
       
   752 
       
   753 This plugin allows you to edit TWiki tables using edit fields and drop down boxes. Tables have an *[&nbsp;Edit&nbsp;table&nbsp;]* button if preceeded by an =%<nop>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.
       
   754 
       
   755 %TOC%
       
   756 
       
   757 ---++ Per Table Settings
       
   758 
       
   759 Add a =%<nop>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:
       
   760 
       
   761 | *Parameter* | *Comment* | *Default* |
       
   762 | =header= | Specify the header format of a new table like ="&#124;*Food*&#124;*Drink*&#124;"=. Useful to start a table with only a button | (no header) |
       
   763 | =format= | The format of one column when editing the table. A cell can be a text input field, or any of these edit field types:%BR% - Text input field (1 line):%BR% &nbsp; =&#124; text, &lt;size&gt;, &lt;initial value&gt; &#124;= %BR% - Textarea input field:%BR% &nbsp; =&#124; textarea, &lt;rows&gt;x&lt;columns&gt;, &lt;initial value&gt; &#124;= %BR% - Drop down box: %BR% &nbsp; =&#124; select, &lt;size&gt;, &lt;option 1&gt;, &lt;option 2&gt;, etc &#124;= %BR% - Fixed label: %BR% &nbsp; =&#124; label, 0, &lt;label text&gt; &#124;= %BR% - Row number: %BR% &nbsp; =&#124; row, &lt;offset&gt; &#124;= %BR% - Date: %BR% &nbsp; =&#124; date, &lt;size&gt;, &lt;initial value&gt;, &lt;DHTML date format&gt; &#124;= | ="text, 16"= %BR% for all cells |
       
   764 | =changerows= | Rows can be added and removed if ="on"=;<br /> Rows can be added but not removed if ="add"= | =CHANGEROWS= %BR% Plugin setting |
       
   765 | =quietsave= | Quiet Save button is shown if ="on"=, hidden if ="off"= | =QUIETSAVE= %BR% Plugin setting |
       
   766 | =include= | Other topic defining the EDITTABLE parameters. The first %<nop>EDITTABLE% in the topic is used. This is useful if you have many topics with the same table format and you want to update the format in one place. | (none) |
       
   767 | =helptopic= | Topic name containing help text shown below the table when editing a table. The %<nop>STARTINCLUDE% and %<nop>STOPINCLUDE% variables can be used in the topic to specify what is shown. | (no help text) |
       
   768 | =headerislabel= | Table header cells are read-only (labels) if ="on"=; header cells can be edited if ="off"= or "0" | ="on"= |
       
   769 | =editbutton= | Set edit button text, e.g. ="Edit this table"=; set button image with alt text, e.g. ="Edit table, %<nop>PUBURL%/%<nop>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= %BR% Plugin setting |
       
   770 
       
   771 ---+++ Initial Values
       
   772 
       
   773 By default, variables in =&lt;initial value&gt;= (of text input field) and =&lt;label text&gt;= (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:
       
   774 | *Text:* | *To Escape:* |
       
   775 | =$quot= | Double quote (="=). Alternatively write =\"= to escape it |
       
   776 | =$percnt= | Percent sign (=%=) |
       
   777 | =$dollar= | Dollar sign (=$=) |
       
   778 | =$nop= or =$nop()= | Is a "no operation" |
       
   779 
       
   780 ---+++ Date Field Type
       
   781 
       
   782 <img src="%ATTACHURLPATH%/EditTablePluginCalendarExample.gif" alt="Edit Table Calendar Example" width="549" height="210" align="left"  />
       
   783 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 [[http://dynarch.com/mishoo/calendar.epl][Mishoo DHTML calendar]], see also TWiki:Codev/JavaScriptDatePickerForForm <br clear="all">
       
   784 
       
   785 
       
   786 ---++ Per Cell Settings
       
   787 
       
   788 An individual edit field type can be defined for each table cell. Place an =%<nop>EDITCELL{ "type, ..." }%= variable at the end of the cell content. This is useful to override the per column =%<nop>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 %<nop>EDITCELL{ "text, 20" }% |=
       
   789 
       
   790 It is also possible to place the edit button inside a cell instead of default location below the table. Type =| %<nop>EDITCELL{ "editbutton, 1, Edit this table" }% |= to show a button, or =| %<nop>EDITCELL{ "editbutton, 1, Edit table, Image-URL" }% |= to show a button image with alternate text.
       
   791 
       
   792 __Note:__ The =%<nop>EDITCELL{ }%=variable cannot be used by itself; place an =%<nop>EDITTABLE{ }%=variable at the beginning of a table where you want to use =%<nop>EDITCELL{ }%= variables.
       
   793 
       
   794 ---++ Table Buttons
       
   795 
       
   796 <form>
       
   797 	* In page view mode:
       
   798 		* <input type="submit" name="et"	value="Edit table" onClick="return(false);" /> - turn the table into edit mode
       
   799 	* In edit mode:
       
   800 		* <input type="submit" name="etsave"	value="Save table"  onClick="return(false);" /> - save your changes
       
   801 		* <input type="submit" name="etqsave"	value="Quiet save"  onClick="return(false);" /> - save your changes without alerting subscribed WebNotify users
       
   802 		* <input type="submit" name="etaddrow" value="Add row" onClick="return(false);" /> - add row to the table (if enabled)
       
   803 		* <input type="submit" name="etdelrow" value="Delete last row" onClick="return(false);" /> - remove last row from the table (if enabled)
       
   804 		* <input type="submit" name="etcancel" value="Cancel" onClick="return(false);" /> - cancel without saving and release edit lock
       
   805 </form>
       
   806 
       
   807 ---++ Examples
       
   808 
       
   809 Line before table: =%<nop>EDITTABLE{ header="|*Nr*|*Text field sandbox*|*Drop down sandbox*|*Timestamp*|" format="| row, -1 | text, 20, init | select, 1, one, two, three, four | label, 0, %<nop>SERVERTIME{"$day $mon $year $hour:$min"}% |" changerows="on" }%=
       
   810 %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" }%
       
   811 |*Nr*|*Text field sandbox*|*Drop down sandbox*|*Timestamp*|
       
   812 | 1 | hello table | one | 26 Jun 2002 12:30 |
       
   813 | 2 |  | two | 27 Jun 2002 12:40 |
       
   814 
       
   815 If this plugin is installed you will see an *[&nbsp;Edit&nbsp;table&nbsp;]* button above; when you click on it you get this form:
       
   816 
       
   817 <form>
       
   818 <table border="1" cellspacing="1" cellpadding="0">
       
   819 <tr><th bgcolor="#99CCCC"> Nr </th><th bgcolor="#99CCCC"> Text field sandbox </th><th bgcolor="#99CCCC"> Drop down sandbox </th><th bgcolor="#99CCCC"> Timestamp </th></tr>
       
   820 <tr><td  bgcolor="#FFFFFF"> 1<input type="hidden" name="etcell2x1" value="1" />  </td><td  bgcolor="#FFFFFF"> <input type="text" name="etcell2x2" size="20" value="hello table" />  </td><td  bgcolor="#FFFFFF"> <select name="etcell2x3" size="1"> <option selected="selected">one</option> <option>two</option> <option>three</option> <option>four</option> </select>  </td><td  bgcolor="#FFFFFF"> 26 Jun 2002 12:30<input type="hidden" name="etcell2x4" value="26 Jun 2002 12:30" />  </td></tr>
       
   821 <tr><td  bgcolor="#FFFF99"> 2<input type="hidden" name="etcell3x1" value="2" />  </td><td  bgcolor="#FFFF99"> <input type="text" name="etcell3x2" size="20" value="" />  </td><td  bgcolor="#FFFF99"> <select name="etcell3x3" size="1"> <option>one</option> <option selected="selected">two</option> <option>three</option> <option>four</option> </select>  </td><td  bgcolor="#FFFF99"> 27 Jun 2002 12:40<input type="hidden" name="etcell3x4" value="27 Jun 2002 12:40" />  </td></tr>
       
   822 </table>
       
   823 <input type="submit" name="etsave"	value="Save table" onClick="return(false);" />
       
   824 <input type="submit" name="etqsave"	value="Quiet save"  onClick="return(false);" />
       
   825 <input type="submit" name="etaddrow" value="Add row" onClick="return(false);" />
       
   826 <input type="submit" name="etdelrow" value="Delete last row" onClick="return(false);" />
       
   827 <input type="submit" name="etcancel" value="Cancel" onClick="return(false);" /> (demo only, these buttons do not work)
       
   828 </form>
       
   829 
       
   830 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.
       
   831 
       
   832 <table><tr><td valign="top">
       
   833 You type:
       
   834 <pre>
       
   835 %<nop>EDITTABLE{ format="| label | text, 40 |" }%
       
   836 |*Key*|*Value*|
       
   837 | Name: | John Smith |
       
   838 | Gender: | M %<nop>EDITCELL{select, 1, , F, M}% |
       
   839 | DOB: | 1999/12/31 %<nop>EDITCELL{date, 10}% |
       
   840 | City: | New York |
       
   841 </pre>
       
   842 </td><td valign="top">
       
   843 Screenshot:
       
   844 <img src="%ATTACHURLPATH%/ScreenshotEditCell1.gif" alt="EDITCELL Example in view mode" width="149" height="141" />
       
   845 </td><td valign="top">
       
   846 Screenshot in edit mode:
       
   847 <img src="%ATTACHURLPATH%/ScreenshotEditCell2.gif" alt="EDITCELL Example in edit mode" width="276" height="164" />
       
   848 </td></tr></table>
       
   849 
       
   850 ---++ Plugin Settings
       
   851 
       
   852 Plugin settings are stored as preferences variables. To reference
       
   853 a plugin setting write ==%<nop>&lt;plugin&gt;_&lt;setting&gt;%==, for example, ==%<nop>EDITTABLEPLUGIN_SHORTDESCRIPTION%==
       
   854 
       
   855 	* One line description, shown in the %TWIKIWEB%.TextFormattingRules topic:
       
   856 		* Set SHORTDESCRIPTION = Edit TWiki tables using edit fields, date pickers and drop down boxes
       
   857 
       
   858 	* Set DEBUG to 1 to get debug messages in =data/debug.txt=.  Default: =0=
       
   859 		* Set DEBUG = 0
       
   860 
       
   861 	* Default for change rows flag: =on=, =off=, =add=
       
   862 		* Set CHANGEROWS = on
       
   863 
       
   864 	* Default flag for quiet save option: =on= to show the Quiet Save button, =off= to hide
       
   865 		* Set QUIETSAVE = on
       
   866 
       
   867 	* Default edit button: Specify =button text=, or specify =alternate text, image URL=
       
   868 		* #Set EDITBUTTON = Edit table
       
   869 		* Set EDITBUTTON = Edit this table, %ATTACHURL%/edittable.gif
       
   870 
       
   871 	* Date format of [[http://dynarch.com/mishoo/calendar.epl][Mishoo DHTML calendar]]:
       
   872 		* Set JSCALENDARDATEFORMAT = %Y/%m/%d
       
   873 
       
   874 	* Language of DHTML calendar, pointing to attached =calendar-&lt;code&gt;.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=
       
   875 		* Set JSCALENDARLANGUAGE = en
       
   876 
       
   877 	* Additional options of DHTML calendar:
       
   878 		* Set JSCALENDAROPTIONS = 
       
   879 
       
   880 __Note:__ The Plugin looks for the =JSCALENDAR*= settings first in the TWiki Preferences, then in above Plugin settings
       
   881 
       
   882 ---++ Limitations and Known Issues
       
   883 
       
   884 	* This Plugin does not support TWiki table formatting like Multi-span cells (e.g. =| ... ||=) and cell justification (e.g. =|  centered  |	right |=).
       
   885 	* There is a performance issue when editing a large table, say, with more then 50 rows.
       
   886 	* The Plugin fails if the table is at the very end of the topic
       
   887 	  (without a new line) Always ensure there is a newline after the table
       
   888 	* Variables like =%<nop>ATTACHURL%= get expanded unless they are in a label.
       
   889 	* You cannot put two %<nop>EDITTABLE% statements on the same line
       
   890 	  in the source.
       
   891 	* You can include %-vars now in select values, by quoting them with
       
   892 	  &lt;nop&gt;, as in %&lt;nop&gt;X% for %<nop>X%, say for instance:
       
   893 	  <br /> =select,1,%&lt;nop&gt;X%,%&lt;nop&gt;Y%=
       
   894 
       
   895 ---++ Plugin Installation Instructions
       
   896 
       
   897 __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. 
       
   898 
       
   899 	* Download the ZIP file from the Plugin web (see below)
       
   900 	* Unzip ==%TOPIC%.zip== in your twiki installation directory. Content:
       
   901 	  | *File:* | *Description:* |
       
   902 	  | ==data/TWiki/%TOPIC%.txt== | Plugin topic |
       
   903 	  | ==data/TWiki/%TOPIC%.txt,v== | Plugin topic repository |
       
   904 	  | ==lib/TWiki/Plugins/%TOPIC%.pm== | Plugin Perl module |
       
   905 	  | ==pub/TWiki/%TOPIC%/edittable.gif== | Edit table button image |
       
   906 	  | ==pub/TWiki/%TOPIC%/*.gif== | Screenshots and  Mishoo DHTML calendar images |
       
   907 	  | ==pub/TWiki/%TOPIC%/README== | Mishoo DHTML calendar README |
       
   908 	  | ==pub/TWiki/%TOPIC%/release-notes.html== | Mishoo DHTML calendar release notes |
       
   909 	  | ==pub/TWiki/%TOPIC%/*.js== | Mishoo DHTML calendar <nop>JavaScript files |
       
   910 	  | ==pub/TWiki/%TOPIC%/calendar-system.css== | Mishoo DHTML calendar stylesheet |
       
   911 	* The Plugin depends on the =viewauth= script to authenticate the user. As described in %TWIKIWEB%.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. 
       
   912 	* 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
       
   913 	* Test if the Plugin is correctly installed:
       
   914 		* Check above example if there is an *[&nbsp;Edit&nbsp;table&nbsp;]* button below the table in above example
       
   915 		* Click on *[&nbsp;Edit&nbsp;table&nbsp;]*, make changes and save the table
       
   916 
       
   917 ---++ License
       
   918 
       
   919 	* The Edit Table Plugin is released under the [[http://www.gnu.org/licenses/gpl.html][GPL]]
       
   920 	* The [[http://dynarch.com/mishoo/calendar.epl][Mishoo DHTML calendar]] bundled with this Plugin was created by Mihai Bazon and is released under the [[http://www.gnu.org/licenses/lgpl.html][LGPL]] -- thanks Mihai for the great tool :-)
       
   921 
       
   922 
       
   923 ---++ Plugin Info
       
   924 
       
   925 |  Plugin Author: | TWiki:Main/PeterThoeny |
       
   926 |  Plugin Version: | 02 Mar 2004 |
       
   927 |  Change History: | <!-- specify latest version first -->&nbsp; |
       
   928 |  02 Mar 2004: | Default for =%<nop>EDITCELL{editbutton}%= is EDITBUTTON preference |
       
   929 |  27 Feb 2004: | Added QUIETSAVE setting and =quietsave= parameter; image for Edit button |
       
   930 |  18 Feb 2004: | Doc fixes; allow edit button anywhere in a cell not just at the end of a cell |
       
   931 |  17 Feb 2004: | Added per cell definition of edit field types with =%<nop>EDITCELL{}%= variable; added =headerislabel= and =editbutton= parameters |
       
   932 |  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 |
       
   933 |  13 Dec 2003: | Added CHANGEROWS, JSCALENDARDATEFORMAT, JSCALENDARLANGUAGE, JSCALENDAROPTIONS settings |
       
   934 |  16 Oct 2003: | small typo fixed (garbled if ---<nop>+ header on top) |
       
   935 |  15 Oct 2003: | new date field type with javascript calendar - CN |
       
   936 |  14 Oct 2003: | docfix: the documentation page was an old one - CN |
       
   937 |  13 Oct 2003: | bugfix: %-vars in select were resetted to first on add/del row - CN |
       
   938 |  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 |
       
   939 |  08 Nov 2002: | Prevent variable expansion in label text; added escape characters |
       
   940 |  27 Jun 2002: | New =helptopic= parameter |
       
   941 |  26 Jun 2002: | Support for variables in included EDITTABLE parameters; fixed problem with HTML in cells |
       
   942 |  21 May 2002: | Added fixed label format; new =changerows="add"= parameter |
       
   943 |  27 Apr 2002: | Fixed bug where text after a double quote in a cell disappeared |
       
   944 |  18 Apr 2002: | Fixed bug where table was breaking when pasting multiple lines into an edit field using Netscape on Unix |
       
   945 |  08 Apr 2002: | Check for change permission and edit lock of topic |
       
   946 |  05 Apr 2002: | Initial version |
       
   947 |  CPAN Dependencies: | none |
       
   948 |  Other Dependencies: | [[http://dynarch.com/mishoo/calendar.epl][Mishoo DHTML calendar]] (version 0.9.5 preinstalled); TWiki version 01 Feb 2003 or later |
       
   949 |  Perl Version: | 5.0 |
       
   950 |  TWiki:Plugins/Benchmark: | %TWIKIWEB%.GoodStyle 98%, %TWIKIWEB%.FormattedSearch 98%, %TOPIC% 95% |
       
   951 |  Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC% |
       
   952 |  Feedback: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev |
       
   953 
       
   954 __Related Topics:__ %TWIKIWEB%.TWikiPreferences, %TWIKIWEB%.TWikiPlugins
       
   955 
       
   956 -- TWiki:Main/PeterThoeny - 02 Mar 2004
       
   957 @
       
   958 
       
   959 
       
   960 1.6
       
   961 log
       
   962 @none
       
   963 @
       
   964 text
       
   965 @d1 1
       
   966 a1 1
       
   967 %META:TOPICINFO{author="PeterThoeny" date="1078005060" format="1.0" version="1.6"}%
       
   968 d177 1
       
   969 a177 1
       
   970 |  Plugin Version: | 27 Feb 2004 |
       
   971 d179 1
       
   972 d207 1
       
   973 a207 1
       
   974 -- TWiki:Main/PeterThoeny - 27 Feb 2004
       
   975 @
       
   976 
       
   977 
       
   978 1.5
       
   979 log
       
   980 @none
       
   981 @
       
   982 text
       
   983 @d1 1
       
   984 a1 1
       
   985 %META:TOPICINFO{author="PeterThoeny" date="1077169680" format="1.0" version="1.5"}%
       
   986 d16 1
       
   987 d115 6
       
   988 a120 2
       
   989 	* Default text for edit button:
       
   990 		* Set EDITBUTTON = Edit table
       
   991 a152 1
       
   992 	  | ==lib/TWiki/Plugins/%TOPIC%.pm== | Plugin Perl module |
       
   993 d155 3
       
   994 a157 1
       
   995 	  | ==pub/TWiki/%TOPIC%/*.gif== | Screenshots |
       
   996 d177 1
       
   997 a177 1
       
   998 |  Plugin Version: | 18 Feb 2004 |
       
   999 d179 1
       
  1000 d206 2
       
  1001 a207 2
       
  1002 -- TWiki:Main/PeterThoeny - 18 Feb 2004
       
  1003 %META:FILEATTACHMENT{name="EditTablePluginCalendarExample.gif" attr="h" comment="Screenshot" date="1071361684" path="C:\Data\MyTWiki\Plugins\EditTablePlugin\pub\TWiki\EditTablePlugin\EditTablePluginCalendarExample.gif" size="7823" user="PeterThoeny" version="1.1"}%
       
  1004 d242 3
       
  1005 @
       
  1006 
       
  1007 
       
  1008 1.4
       
  1009 log
       
  1010 @none
       
  1011 @
       
  1012 text
       
  1013 @d1 1
       
  1014 a1 1
       
  1015 %META:TOPICINFO{author="PeterThoeny" date="1077016839" format="1.0" version="1.4"}%
       
  1016 d13 1
       
  1017 a13 1
       
  1018 | =header= | Enable static header if ="on"=, e.g. disable editing of the first row;<br /> Else specify the header format of a new table like ="&#124;*Food*&#124;*Drink*&#124;"=. | (no header) |
       
  1019 d19 1
       
  1020 a19 1
       
  1021 | =editbutton= | Set edit button text, e.g. ="Edit this table"=; set button image with alt text, e.g. ="Edit table, %<nop>PUBURL%/%<nop>TWIKIWEB%/TWikiDocGraphics/edittopic.gif"=; hide button, e.g. ="hide"= (Note: Automatically hidden if edit button is present in a cell) | =EDITBUTTON= %BR% Plugin setting |
       
  1022 d38 1
       
  1023 a38 1
       
  1024 The edit field type can be defined for each table cell by placing an =%<nop>EDITCELL{ "type, ..." }%= variable after the cell content. This is useful to override the per column =%<nop>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 %<nop>EDITCELL{ "text, 20" }% |=
       
  1025 d40 1
       
  1026 a40 1
       
  1027 It is also possible to place the edit button into a cell instead of default location below the table. Type =| %<nop>EDITCELL{ "editbutton, 1, Edit this table" }% |= to show a button, or =| %<nop>EDITCELL{ "editbutton, 1, Edit table, Image-URL" }% |= to show a button image with alternate text.
       
  1028 d42 1
       
  1029 a42 1
       
  1030 __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.
       
  1031 d93 5
       
  1032 a97 7
       
  1033 You get:
       
  1034 %EDITTABLE{ format="| label | text, 40 |" changerows="off" }%
       
  1035 |*Key*|*Value*|
       
  1036 | Name: | John Smith |
       
  1037 | Gender: | M %EDITCELL{select, 1, , F, M}% |
       
  1038 | DOB: | 1999/12/31 %EDITCELL{date, 10}% |
       
  1039 | City: | New York |
       
  1040 d148 1
       
  1041 d151 5
       
  1042 a155 1
       
  1043 	  | ==lib/TWiki/Plugins/%TOPIC%.pm== | Plugin Perl module |
       
  1044 d171 1
       
  1045 a171 1
       
  1046 |  Plugin Version: | 17 Feb 2004 |
       
  1047 d173 1
       
  1048 d193 1
       
  1049 d199 1
       
  1050 a199 1
       
  1051 -- TWiki:Main/PeterThoeny - 17 Feb 2004
       
  1052 d233 2
       
  1053 @
       
  1054 
       
  1055 
       
  1056 1.3
       
  1057 log
       
  1058 @none
       
  1059 @
       
  1060 text
       
  1061 @d1 1
       
  1062 a1 1
       
  1063 %META:TOPICINFO{author="PeterThoeny" date="1071906420" format="1.0" version="1.3"}%
       
  1064 d4 1
       
  1065 a4 1
       
  1066 This plugin allows you to edit TWiki tables using edit fields and drop down boxes. Tables have an *[&nbsp;Edit&nbsp;table&nbsp;]* button if preceeded by an =%<nop>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.
       
  1067 d14 1
       
  1068 a14 1
       
  1069 | =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:%BR% - Text input field (1 line):%BR% &nbsp; =&#124; text, &lt;size&gt;, &lt;initial value&gt; &#124;= %BR% - Textarea input field:%BR% &nbsp; =&#124; textarea, &lt;rows&gt;x&lt;columns&gt;, &lt;initial value&gt; &#124;= %BR% - Drop down box: %BR% &nbsp; =&#124; select, &lt;size&gt;, &lt;option 1&gt;, &lt;option 2&gt;, etc &#124;= %BR% - Fixed label: %BR% &nbsp; =&#124; label, 0, &lt;label text&gt; &#124;= %BR% - Row number: %BR% &nbsp; =&#124; row, &lt;offset&gt; &#124;= %BR% - Date: %BR% &nbsp; =&#124; date, &lt;size&gt;, &lt;initial value&gt;, &lt;DHTML date format&gt; &#124;= | ="text, 16"= %BR% for all cells |
       
  1070 d18 2
       
  1071 d21 3
       
  1072 a23 1
       
  1073 __Note:__ By default, variables in =&lt;initial value&gt;= (of text input field) and =&lt;label text&gt;= (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:
       
  1074 d30 14
       
  1075 d80 1
       
  1076 a80 1
       
  1077 ---+++ Date Field Type
       
  1078 d82 19
       
  1079 a100 2
       
  1080 <img src="%ATTACHURLPATH%/EditTablePluginCalendarExample.gif" alt="Edit Table Calendar Example" width="549" height="210" align="left"  />
       
  1081 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 [[http://dynarch.com/mishoo/calendar.epl][Mishoo DHTML calendar]], see also TWiki:Codev/JavaScriptDatePickerForForm <br clear="all">
       
  1082 d108 1
       
  1083 a108 1
       
  1084 		* Set SHORTDESCRIPTION = Edit TWiki tables using edit fields and drop down boxes
       
  1085 d116 3
       
  1086 a136 1
       
  1087 	* %RED% *Warning:* %ENDCOLOR% This plugin uses undocumented functions to read, save and lock a topic. The plugin will likely break in a future TWiki release.
       
  1088 d140 1
       
  1089 a140 1
       
  1090 	  &lt;nop&gt;, as in %&lt;nop&gt;X% for %X%, say for instance:
       
  1091 d153 1
       
  1092 a153 1
       
  1093 	* The plugin depends on the =viewauth= script to authenticate the user. As described in %TWIKIWEB%.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. 
       
  1094 d168 1
       
  1095 a168 1
       
  1096 |  Plugin Version: | 20 Dec 2003 |
       
  1097 d170 1
       
  1098 d187 1
       
  1099 a187 1
       
  1100 |  Other Dependencies: | [[http://dynarch.com/mishoo/calendar.epl][Mishoo DHTML calendar]] (version 0.9.5 preinstalled) |
       
  1101 d194 1
       
  1102 a194 1
       
  1103 -- TWiki:Main/PeterThoeny - 20 Dec 2003
       
  1104 @
       
  1105 
       
  1106 
       
  1107 1.2
       
  1108 log
       
  1109 @none
       
  1110 @
       
  1111 text
       
  1112 @d1 1
       
  1113 a1 1
       
  1114 %META:TOPICINFO{author="PeterThoeny" date="1071363180" format="1.0" version="1.2"}%
       
  1115 d84 1
       
  1116 a84 1
       
  1117 	* Language of DHTML calendar, pointing to attached =calendar-&lt;code&gt;.js= language file: =en=, =de=, =es=, =fr=, =jp=
       
  1118 d117 2
       
  1119 a118 2
       
  1120 	* 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
       
  1121 	* Test if the plugin is correctly installed:
       
  1122 d131 1
       
  1123 a131 1
       
  1124 |  Plugin Version: | 13 Dec 2003 |
       
  1125 d133 1
       
  1126 d156 1
       
  1127 a156 1
       
  1128 -- TWiki:Main/PeterThoeny - 13 Dec 2003
       
  1129 d170 20
       
  1130 @
       
  1131 
       
  1132 
       
  1133 1.1
       
  1134 log
       
  1135 @none
       
  1136 @
       
  1137 text
       
  1138 @d1 2
       
  1139 a2 2
       
  1140 %META:TOPICINFO{author="PeterThoeny" date="1071217860" format="1.0" version="1.1"}%
       
  1141 <h1>Edit Table Plugin</h1>
       
  1142 d4 1
       
  1143 a4 1
       
  1144 This plugin allows you to edit TWiki tables using edit fields and drop down boxes. Tables have an *[&nbsp;Edit&nbsp;table&nbsp;]* button if preceeded by an =%<nop>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.
       
  1145 d6 1
       
  1146 a6 10
       
  1147 ---++ <nop>%TOPIC% Global Settings
       
  1148 
       
  1149 Plugin settings are stored as preferences variables. To reference
       
  1150 a plugin setting write ==%<nop>&lt;plugin&gt;_&lt;setting&gt;%==, for example, ==%<nop>INTERWIKIPLUGIN_SHORTDESCRIPTION%==
       
  1151 
       
  1152 	* One line description, shown in the %TWIKIWEB%.TextFormattingRules topic:
       
  1153 		* Set SHORTDESCRIPTION = Edit TWiki tables using edit fields and drop down boxes.
       
  1154 
       
  1155 	* Set DEBUG to 1 to get debug messages in =data/debug.txt=.  Default: =0=
       
  1156 		* Set DEBUG = 0
       
  1157 d14 2
       
  1158 a15 2
       
  1159 | =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: <table cellpadding="0" cellspacing="0"><tr><td valign="top">-Text input field (1 line): </td><td> =&#124; text, &lt;size&gt;, &lt;initial value&gt; &#124;= </td></tr><tr><td valign="top">-Textarea input field: </td><td> =&#124; textarea, &lt;rows&gt;x&lt;columns&gt;, &lt;initial value&gt; &#124;= </td></tr><tr><td valign="top">- Drop down box: </td><td> =&#124; select, &lt;size&gt;, &lt;option 1&gt;, &lt;option 2&gt;, etc &#124;= </td></tr><tr><td valign="top">- Fixed label: </td><td> =&#124; label, 0, &lt;label text&gt; &#124;= </td></tr><tr><td valign="top">- Row number: </td><td> =&#124; row, &lt;offset&gt; &#124;= </td></tr><tr><td valign="top">- Date: </td><td> =&#124; date, &lt;sizet&gt; &#124;= </td></tr></table>  | ="text, 16"= for all cells |
       
  1160 | =changerows= | Rows can be added and removed if ="on"=;<br /> Rows can be added but not removed if ="add"= | ="on"= |
       
  1161 d26 13
       
  1162 d56 1
       
  1163 a56 1
       
  1164 <input type="submit" name="etqsave"	value="Quietsave"  onClick="return(false);" />
       
  1165 d62 29
       
  1166 a104 6
       
  1167 	* =date= field type for the =format= parameter adds a button popping a javascript 
       
  1168 	  calendar to choose the date
       
  1169 	  on browsers supporting it.
       
  1170 	  It uses the nice *Mishoo DHTML calendar* at http://dynarch.com/mishoo/calendar.epl,
       
  1171 	  that should be included in Cairo release, or see TWiki:Codev/JavaScriptDatePickerForForm
       
  1172 	  for installing it on Beijing Release
       
  1173 d108 2
       
  1174 d117 1
       
  1175 d122 5
       
  1176 d130 2
       
  1177 a131 2
       
  1178 |  Plugin Author: | %TWIKIWEB%.PeterThoeny |
       
  1179 |  Plugin Version: | 16 Oct 2003 |
       
  1180 d133 1
       
  1181 d138 1
       
  1182 a138 1
       
  1183 |  18 Sep 2003: | *incompatibility:* changed default of =changerows= to =on=<br /> support for %-vars, Quietsave for saving without notification, all other fixes in Dev topic integrated - CN |
       
  1184 d148 1
       
  1185 a148 1
       
  1186 |  Other Dependencies: | none |
       
  1187 d155 14
       
  1188 a168 1
       
  1189 -- %TWIKIWEB%.PeterThoeny - 08 Nov 2002
       
  1190 @