From: <zeh...@mo...> - 2008-03-14 15:28:13
|
Quoting Jon Lang <dat...@gm...>: > Gu wrote: > > So it might not be for general use (although it doesn't do any harm, it > just > > doesn't work if the class 'collapsible' is added and the JS isn't > installed. > > If installed it would of course be nicer to control that by using > something > > like __HIDDENCOLLAPSEFACTBOX__ and __SHOWNCOLLAPSEFACTBOX__ for initially > hidden > > resp. shown collapsible factboxes). > > Doesn't the collapsible class and associated script already address > this? If not, it seems to me that the proper place to address it > would be there (say, as a companion attribute that sets the initial > state), rather than as a Factbox-specific hack. > > -- > Jonathan "Dataweaver" Lang > If a table is initially shown collapsed or not depends if class="collapsible collapsed" is used (initially collapsed/hidden) or just class="collapsible" (initially open/shown). If I understand that correctly using the proposed magic words like __HIDDENCOLLAPSEFACTBOX__ and __SHOWNCOLLAPSEFACTBOX__ will allow on a per page level to indicate if on that page the table used to display the factbox should be created with class="collapsible collapsed" or just class="collapsible". So they only decide which initial state of the collapsible class is used. Similar parameters in the setting file would determine the default syntax for the class command (either with or without "collapsed") for the factbox table creation statements if no magic words are present. So the only Factbox-specific part is to indicate if for the factbox the parameter "collapsed" is used or not - the rest is done by the general 'collapsible' class/script as for any other table. Cheers, Gu |