Feature Proposal: Configure has too many options, and often they are irrelevant


Cut down on the noise in configure

Description and Documentation

WIBNIF configure only showed some options if another option is set to the right value? Use JS to deliver this.


# **COMMAND EXPERT DISPLAY_IF valueOf("{Store}{Implementation}")=="Foswiki::Store::RcsWrap" **
# RcsWrap initialise a file as binary.
# %FILENAME|F% will be expanded to the filename.
$Foswiki::cfg{RCS}{initBinaryCmd} = "/usr/bin/rcs $Foswiki::cfg{RCS}{ExtOption} -i -t-none -kb %FILENAME|F%";




-- Contributors: CrawfordCurrie - 23 Jan 2012


True. Would that be checkboxes or textfields as well, that trigger to reveal hidden fields?

Somehow we must also make the hidden fields visible for page search. Chrome browser follows an approach inspired by Mac System Preferences to hint at the location of searched items.

Search "cookie":


After clicking "Content settings":


-- ArthurClemens - 30 Jan 2012

I had in mind something like this:
if ( $("#Store_Implementation").value == "Foswiki::Store::RcsWrap")
(not literally, of course, just illustrating the concept). So no explicit trigger.

-- CrawfordCurrie - 31 Jan 2012

So how do these hidden fields appear after changing the value to Foswiki::Store::!RcsWrap? I would expect a function triggered by an onchange event.

-- ArthurClemens - 31 Jan 2012

Right. That function would be unique for each field that has a DISPLAY_IF.

-- CrawfordCurrie - 01 Feb 2012

Try the attached patch (against trunk). I made most of the options conditional except the languages (not worked out how yet)

-- CrawfordCurrie - 01 Feb 2012

After some discussion on IRC with GeorgeClark and ArthurClemens, I updated the patch to support ENABLE_ID as well.

-- CrawfordCurrie - 02 Feb 2012
Topic attachments
I Attachment Action Size Date Who Comment
chrome1.pngpng chrome1.png manage 65 K 30 Jan 2012 - 22:15 ArthurClemens  
chrome2.pngpng chrome2.png manage 60 K 30 Jan 2012 - 22:15 ArthurClemens  
display_if.patchpatch display_if.patch manage 39 K 02 Feb 2012 - 13:28 CrawfordCurrie Patch to illustrate conditional field enable in configure
Topic revision: r11 - 05 Jul 2015, GeorgeClark - This page was cached on 18 Sep 2021 - 02:13.

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