Hi devs,

I'd like to add a gallery macro that will be used like this:

{{gallery}}
any wiki content
{{/gallery}}

and which is equivalent to:

{{velocity output="false"}}
$xwiki.jsfx.use('uicomponents/widgets/gallery/gallery.js')
$xwiki.ssfx.use('uicomponents/widgets/gallery/gallery.css')
{{/velocity}}
(% class="gallery" %)
(((
any wiki content
)))

Some technical details:
* it won't support in-line mode
* it will have two optional parameters: width and height, both expressed 
in pixel units (i.e. both are positive integers)
* it will handle its content as box macro does (using a 
MacroContentParser without running transformations)
* it will be placed in xwiki-rendering-macros/xwiki-rendering-macro-gallery/
* images will be displayed as in 
http://incubator.myxwiki.org/xwiki/bin/view/Improvements/OfficePresentationViewer

Further more, I will change the office importer module to generate:

{{gallery}}
image:presentation-slide1.jpg

image:presentation-slide2.jpg
...
image:presentation-slideN.jpg
{{/gallery}}

when importing an office presentation file. As a consequence the office 
viewer macro will use the gallery macro behind the curtains (i.e. 
{{office attachment="presentation.odp"/}} will display the presentation 
slides using the gallery macro).

WDYT?

Note that the gallery macro could be based on a generic macro that:
* wraps the content with a GroupBlock and adds a CSS class name
* uses the SkinExtension component to import some JS/CSS resources
but there is no such macro right now. Another thing to note is that I 
can't make gallery macro a wiki macro because the office importer module 
will depend on it.

Thanks,
Marius
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to