You are here: Foswiki>Tasks Web>Item821 (12 Dec 2017, GeorgeClark)Edit Attach

Item821: Allow links in EditTablePlugin dropdown

pencil
Priority: Low
Current State: Needs Developer
Released In:
Target Release:
Applies To: Extension
Component: EditTablePlugin
Branches:
Reported By: ArthurClemens
Waiting For:
Last Change By: GeorgeClark
From http://twiki.org/cgi-bin/view/Plugins/EditTablePluginDev:

I think the EditTablePlugin may need a little fix below. In the version used on my wiki site it was not possible to have a wiki link on option list, like that:

%EDITTABLE{ format="select, 1, [[Link]]" }%
|  |

An "Edit" action would convert it to a plain word "Link".

Index: Core.pm
===================================================================
--- Core.pm    (version 31)
+++ Core.pm    (version 32)
@@ -963,6 +963,7 @@
           $valExpanded   =~ s/^\s+//;
           $valExpanded   =~ s/\s+$//;
+           TWiki::Plugins::EditTablePlugin::encodeValue($val) if $val;
           if ( $valExpanded eq $expandedValue ) {
               $text .= " <option selected=\"selected\">$val</option>";
           }

Sorry for spamming you, but I haven't found any reasonable place in the huge TWiki site to put a comment like this.

-- TWiki:Main.KrzysztofNosek - 03 Nov 2008

I have not tried the patch and I do not dare adding it to 1.0.5 which I am working on now as any change we ever did to EditTablePlugin cost us a painful 2-3 weeks of fixing.

But I can give you a work around.

Instead of using the link directly use

%EDITTABLE{ format="select, 1, [<nop>[Link]]" }%
|  |

The little nop prevent the renderer from turning the text into a link too early.

In Foswiki 1.0.4 and forward - once the link is in the table it works and gets saved correctly

-- KennethLavrsen - 22 Apr 2009

ItemTemplate edit

Summary Allow links in EditTablePlugin dropdown
ReportedBy ArthurClemens
Codebase
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component EditTablePlugin
Priority Low
CurrentState Needs Developer
WaitingFor
Checkins
ReleasedIn
Topic revision: r3 - 12 Dec 2017, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy