create new tag
, view all tags
This topic discusses various enhancements that have been proposed to EditTablePlugin

Refactored from EditTablePluginDev -- ThomasWeigert - 07 May 2005


We have made some modification on the EditTablePlugin (sadly we done the modifications on the 08 Nov 2002 release). I attached the code of this modified plugin to this page under the name EditTablePluginAltern.pm. There is the list of the modifications :

  • rows can now be added everywhere (and not only at the end of the table)
  • several rows can be added or removed simultaneously (using check boxes)
  • the options of a select input can depend of other select values (javascript needed)
  • the options of a select input can be fetched in the text of a topic or in a field of a topic form
An exemple of use of the new select behaviour is given below.
%EDITTABLE{ header="on" format="| select, 0, A, B, C | select, 0, 1, 2, 3, 4, 5, 6 | select($1$2), 0, A1 => value1, A1 => value2, A2 => value2, A4 => valuea, B3 => valueb, C1 => XavierRedonOptionsExample, C2 => Main.XavierRedonOptionsExample, C3 => XavierRedonEssaisOptionsExample:Field|" changerows="on" }%
| First | Second | Depending |
| A | 2 | value2 |
Here come the displayed form after some modifications in an edit session:

Picture of an edit session

I'm going to try to merge the two versions ...

-- XavierREDON - 03 Jun 2004

We modified the "feature" which made EditTablePlugin to reset the selected elements to the first one. You may try to replace your EditTablePlugin.pm with the EditTablePluginAltern.pm attached to this page.

  • Xavier: What kind of bug is this? I can't reproduce this. Also, a patch with unified diff makes it much easier to incorporate enhancements. -- PeterThoeny - 16 Sep 2004

-- XavierREDON - 15 Jun 2004

Yes I have used your EditTablePluginAltern.pm script. I like it very much, but it does not support textareas (multi-line inputs), and some other features that were added post Novemeber. I am anxiously awaiting the next update.

-- KenMankoff - 15 Jun 2004

Our modified version of EditTablePlugin allows the possibility to include the select list of options from a topic text or from a topic field. You may try to replace your EditTablePlugin.pm with the EditTablePluginAltern.pm attached to this page. You may use the syntax shown in the following example (options read from XavierRedonEssaisOptionsExample text topic and from XavierRedonEssaisOptionsExample topic form field Field:

%EDITTABLE{ header="on" format="| select(none), none => XavierRedonOptionsExample, none => Main.XavierRedonOptionsExample, none => XavierRedonEssaisOptionsExample:Field|" changerows="on" }%
| *Label1* |
| data |
| data |
| *Subsection* |
| data |
| data |

-- XavierREDON - 14 Jul 2004

I'm working with LudovicDAUCHY on the merge of the two versions ( editTablePlugin.pm and editTablePluginAltern.pm), we are students of Polytech'Lille (www.polytech-lille.fr) in Lille french university graduate school of engineering.

We finished to merge the functionalities of the editTablePlugin.pm (the last version) and the editTablePluginAltern.pm (the last version too). It works well but there is some small bugs, so we will post it soon after we fix it.

list functionalities of the new version :

  • rows can now be added everywhere (and not only at the end of the table)
  • several rows can be added or removed simultaneously (using check boxes)
  • the options of a select input can depend of other select values (javascript needed)
  • the options of a select input can be fetched in the text of a topic or in a field of a topic form
  • possibility to include the select list of options from a topic text or from a topic field
  • Same functionnality as September 16th 2004 version of editTablePlugin.pm (radio, checkbox ...)

-- CharlesMalafosse - 06 Oct 2004 -- LudovicDAUCHY - 06 Oct 2004

There is a bug in the current EditTablePlugin, see EditTablePluginAnomolies.

-- MattWilkie - 07 Oct 2004

Bug fixed (EditTablePluginAnomolies) for editTableMergePlugin. (coming soon)

-- CharlesMalafosse - 13 Oct 2004


The merge of the two versions EditTablePlugin and EditTableAlternPlugin.

I attached the package containing the plugin, the pictures and the help, to this page under the name EditTableMergePlugin.zip. All bugs are fixed. All the functionalities of the EditTablePlugin are include in the EditTableMergePlugin with all the functionalities of the EditTableAlternPlugin described before.

So you have just to replace your curent plugin by this one.

-- LudovicDAUCHY - 23 Oct 2004 -- CharlesMalafosse - 23 Oct 2004

Thanks Ludovic, Charles and Xavier for merging the changes. I evaluated it shortly and found some issues that need to be addressed:

  • Topic text is quite different from last revision, e.g. TOC is missing, screenshots changed. I will need to take time to merge the topic text
  • The Plugin topic text refers to images on your server.
  • The Plugin topic fails to display on my test installation. Apache error log has lots of these errors:
    Character class syntax [: :] is reserved for future extensions at /path/to/twiki/lib/TWiki/Plugins/EditTablePlugin.pm line 478.
    Caused by statements like:
    my $alphaNum="[:alpha:][:digit:]"; etc
    There are two problems with this: I18N and running TWiki with Perl versions
  • You introduced a lang subdirectory under pub/TWiki/EditTablePlugin, this should be removed. I flattened that directory into the attachment directory where the .js and .css files are and fixed jscalendar to look for the language files in the same dir where the .js file is. This is to avoid a subdirectory in the attachment directory, which is not supported in TWiki. (Later on it can be changed to use the JSCalendarContrib)
  • What happend to headerislabel parameter?
  • What happend to editbutton parameter?
  • Are there any other functional changes?

-- PeterThoeny - 24 Oct 2004

I corrected the errors of [: :] and I put headerislabel parameter. normally the .pm should function.
If you have any problems do not hesitate to communicate them to me.
The EditTableMergePlugin.zip file contains the new .pm.

-- CharlesMalafosse - 27 Oct 2004

I have corrected some bugs on EditTableMergePlugin.zip,
now it's working perfectly for 2 weeks at my university.
Please try this version and tell me what do you think about it.

-- CharlesMalafosse - 23 Nov 2004

Perhaps you'd be so kind as to document here what the bugs were, under what conditions they manifested themselves. That way those of us using EditTablePlugin can judge how urgent it is that we address them.

-- AntonAylward - 23 Nov 2004

the bugs were a problem between the functions of the official version (func::twiki) and the old functions of EditTableAltern.pm, it was just a problem of merging. but now you can try EditTableMergePlugin to have better modification controls and dynamic select.

-- CharlesMalafosse - 28 Nov 2004

I am able to use EditTableMergePlugin.zip from CharlesMalafosse with the latest (Nov 2004) version of TWiki, with one slight change: line 328 must read

                         $_ =~ s/^(\s*)\|//eo if ($doEdit==1);

... he had $editEdit==0 at the end which was an undefined var, and ==0 gave incorrect results but with this fix it behaves OK on my setup. Thanks Charles!

-- GaryOberbrunner - 14 Feb 2005

I just tried the EditTableMergePlugin, but found it's not working with the RecursiveRenderPlugin. I have many pages that use multiple edit tables nested within normal table cells using the RecursiveRenderPlugin. I'm using TWiki version: 01 Feb 2003. In the example code below, you'd see a master table containing two edit tables with the "release" EditTablePlugin, but with EditTableMerge, you'd see the master table with the macro names in the cells, and the two edit tables rendered "in place" with their macro names and closing tildes exposed. Example code:

%TABLE{headerrows="2" headeralign="center" cellspacing="0" cellpadding="3" tablerules="all" headerbg="#D8BFD8" databg="#f5f5f5" tablewidth="100%" dataalign="center" valign="top"}%
|*Configuration 1*|
|*Configuration 2*|

%EDITTABLE{header="| *CPU* | *OS* |" format="|select, 1, , Intel, AMD|select, 1, , Win XP, OSX|" changerows="on"}%

%EDITTABLE{header="| *CPU* | *OS* |" format="|select, 1, , Intel, AMD|select, 1, , Win XP, OSX|" changerows="on"}%

-- SteveRosenthal - 18 Mar 2005

While using the EditTableMergePlugin I found a little bug.

  1. Add a new line
  2. Enter some text
  3. Break lines with ENTER
  4. Saving the text and review it.
  5. Edit the cell once more

Now the newlines and became to "
". After saving and reviewing it, the newlines vanished at all. Someone can help me, please?

-- RudiRose - 20 Apr 2005

Hello, I'm a student of Polytech'Lille too, and I modified this plugin to improve the page loading speed.

List of the new modifications: - Verifications were added to avoid the redundancy of the "if" in the JS code - Cell's content were put into tables to improve the "if" tests in the JS code - Some parts of the JS code are now replaced by "for" loops to improve the visibility

The other modification concerns the table presentation: the cell's contents are not in the table when the page is loaded, but only when the user select the category concerned. The table is resized when a category is selected.

I've posted a new archive (EditTablePlugin.zip) below that have the same structure as the older had. It contains the new plugin improved.

-- FrancoisVANHILLE - 08 Jan 2006

This is a nice amendment but it has huge issues regarding formatting. It can't handle carrage return or ordered lists! every line has "
" in it when you edit the table. It makes this useless for online documentation. Will anyone be looking into this?

-- JamesBarker - 28 Feb 2006

Minor fix for date fields (using EditTablePlugin.zip). When using date fields the table seemed messed up under Firefox (1.5). Just added some <pre> tags around the javascript part seems to fix the problem. Can the maintainer of the plugin add this fix?

--- EditTablePlugin.pm.orig     2006-08-31 14:40:29.000000000 -0700
+++ EditTablePlugin.pm  2006-08-31 14:49:10.000000000 -0700
@@ -1006,4 +1006,4 @@
            $text .= "<button type=\"reset\" id=\"trigger$theName\">...</button>";
-           $text .= "<script type=\"text/javascript\"> Calendar.setup({inputField : \"id$theName\", ifFormat ";
-           $text .= " : \"$ifFormat\", button : \"trigger$theName\", singleClick : true $prefCALENDAROPTIONS });</script>";
+           $text .= "<!-- <pre> --> <script type=\"text/javascript\"> Calendar.setup({inputField : \"id$theName\", ifFormat ";
+           $text .= " : \"$ifFormat\", button : \"trigger$theName\", singleClick : true $prefCALENDAROPTIONS });</script> <!-- </pre> -->";
            $query->{'jscalendar'} = 1;

-- JeffCrawford - 31 Aug 2006

Topic attachments
I Attachment History Action Size Date Who Comment
Compressed Zip archivezip EditTableMergePlugin.zip r5 r4 r3 r2 r1 manage 115.5 K 2004-12-27 - 14:55 CharlesMalafosse merge of edittablealternplugin and edittableplugin
Compressed Zip archivezip EditTablePlugin.zip r1 manage 118.2 K 2006-01-08 - 15:26 FrancoisVANHILLE The EditTablePlugin modified
Perl source code filepm EditTablePluginAltern.pm r2 r1 manage 32.6 K 2004-07-14 - 20:09 XavierREDON Plugin version with dynamic select and better modification controls
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2006-08-31 - JeffCrawford
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.