• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.
with an empty item or two.

fixing so that the current formatting option is simply selected in the dropdown box (like normal)

WN

Index: twikiplugins/PerlDocPlugin/data/TWiki/PerlDocPlugin.txt
===================================================================
--- twikiplugins/PerlDocPlugin/data/TWiki/PerlDocPlugin.txt     (revision 7684)
+++ twikiplugins/PerlDocPlugin/data/TWiki/PerlDocPlugin.txt     (working copy)
@@ -15,11 +15,9 @@
 Perl module name:
 <input type="text" name="qModule" VALUE="%URLPARAM{"qModule"}%" size="32" /> in
 <select name="qFormat">
-<option>%URLPARAM{"qFormat"}%</option>
-<option></option>
-<option>rendered</option>
-<option>twiki</option>
-<option>pod</option>
+<option %CALC{"$IF($EXACT(%URLPARAM{"qFormat"}%,rendered),selected='selected')"}%>rendered</option>
+<option %CALC{"$IF($EXACT(%URLPARAM{"qFormat"}%,twiki),selected='selected')"}%>twiki</option>
+<option %CALC{"$IF($EXACT(%URLPARAM{"qFormat"}%,pod),selected='selected')"}%>pod</option>
 </select> format
 <input type="submit" value="Show doc" />
 </form>

SVN:7993

WN

That was actually a feature. The first oprion with URLPARAM remembers the selected value (since the first option is selected in an option list). The second option is an empty value so that one can deselect an option.

The conditional select is more elegant. However, the empty option is missing and should be added back.

-- PTh

yes, i understood what the first option did and the update continues to have the same behavour, but i thought it was confusing (two options which say rendered? (or whichever option selected)).

on the second part, what does the empty option do? i don't understand. one of the render types from the dropdown box will be used, and isn't it better to have it selected, rather than using an empty dropdown entry which you don't know which rendering type it will use? or did i accidentally remove some functionality?

WN

Your way of conditionally selecting the right option is a nicer solution (better than showing an option twice.)

The purpose of the empty option is to deselect an option, e.g. to go back to the default default (whatever that is)

-- PTh

Assuming this is closed.

CC

ItemTemplate
Summary PerlDocPlugin has a funky dropdown box
ReportedBy WillNorris
Codebase

SVN Range Thu, 22 Dec 2005 build 7896
AppliesTo Extension
Component PerlDocPlugin
Priority Normal
CurrentState Closed
WaitingFor

Checkins 7993
TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2007-02-03 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback