[xwiki-users] Proposal: box macro with show/hide parameter
Hi xwiki-users, Quick proposal - would it be possible to enhance the box macro so that it includes two extra (optional) parameters: "hideable"=[true/false] "initial"=[show/hide] It would be useful to have a show/hide button on box macros (and all its children) using JavaScript (possibly based on http://code.xwiki.org/xwiki/bin/view/Snippets/ShowHideDIVSnippet). Thanks!
On May 5, 2009, at 11:55 AM, Lewis Denizen wrote:
Hi xwiki-users,
Quick proposal - would it be possible to enhance the box macro so that it includes two extra (optional) parameters: "hideable"=[true/false] "initial"=[show/hide]
It would be useful to have a show/hide button on box macros (and all its children) using JavaScript (possibly based on http://code.xwiki.org/xwiki/bin/view/Snippets/ShowHideDIVSnippet). Thanks!
hmmm... whould it be better to add a showhide macro instead that could be used around anything? Thanks -Vincent
Possible, wondering if that would look strange if there was a <div> right under it. Would be possible to remove the first <div>, though (if that's the only element under it). On Tue, May 5, 2009 at 7:00 PM, Vincent Massol <[email protected]> wrote:
On May 5, 2009, at 11:55 AM, Lewis Denizen wrote:
Hi xwiki-users,
Quick proposal - would it be possible to enhance the box macro so that it includes two extra (optional) parameters: "hideable"=[true/false] "initial"=[show/hide]
It would be useful to have a show/hide button on box macros (and all its children) using JavaScript (possibly based on http://code.xwiki.org/xwiki/bin/view/Snippets/ShowHideDIVSnippet). Thanks!
hmmm... whould it be better to add a showhide macro instead that could be used around anything?
Thanks -Vincent
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
On May 5, 2009, at 12:00 PM, Vincent Massol wrote:
On May 5, 2009, at 11:55 AM, Lewis Denizen wrote:
Hi xwiki-users,
Quick proposal - would it be possible to enhance the box macro so that it includes two extra (optional) parameters: "hideable"=[true/false] "initial"=[show/hide]
It would be useful to have a show/hide button on box macros (and all its children) using JavaScript (possibly based on http://code.xwiki.org/xwiki/bin/view/Snippets/ShowHideDIVSnippet). Thanks!
hmmm... whould it be better to add a showhide macro instead that could be used around anything?
<slightly OT> BTW in the future we'll be able to write macros in velocity (by adding a Macro object to a page) and it'll appear and be usable as a standard macro written in java. This is currently planned for 2.0M1 </slightly OT> Thanks -Vincent
Quick proposal - would it be possible to enhance the box macro so that it includes two extra (optional) parameters: "hideable"=[true/false] "initial"=[show/hide]
How about the "Foobar" collapsible titlebar, morphed from Curriki: http://nielsmayer.com/xwiki/bin/view/Macros/Foobar?viewer=code http://nielsmayer.com/xwiki/bin/view/Macros/FoobarCSS?viewer=code Example usage of the "Foobar": http://nielsmayer.com/xwiki/bin/view/Timeline/NprTimeline #includeMacros("Macros.Foobar") #beginsectionandshow("National Public Radio Podcasts", "", "", "red", false) .... hideable content goes here ... #endsection() To change so that the content is shown by default, change last parameter to "true". Or use #beginsection("National Public Radio Podcasts", "", "", "red"). Note that only certain colors in the color parameter are supported by the CSS. The parameters for the link and its url which are placed near the expand/collapse icon -- doesn't work that well, so I leave it empty with "" . TODO: Remove separate document 'FoobarCSS' and remove the link to it in 'Foobar'. Replace with a call to $xwiki.ssx.use("$doc.fullName") in the Macro/document "Foobar". Add contents of 'FoobarCSS' as text value to instance of object XWiki.StyleSheetExtension . (Question: if I want to have multiple separate instances XWiki.StyleSheetExtension[0], XWiki.StyleSheetExtension[1] .,,, How would these be accessed, individually, via $xwiki.ssx.use() or equivalent call?) Niels http://nielsmayer.com
participants (3)
-
Lewis Denizen -
Niels Mayer -
Vincent Massol