Motivation
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.
Examples
# **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%";
Impact
Implementation
--
Contributors: CrawfordCurrie - 23 Jan 2012
Discussion
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")
$("#RCS_initBinaryCmd").show();
else
$("#RCS_initBinaryCmd").hide();
(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