On 02/16/2011 04:27 PM, Jerome Velociter wrote: [snip]
> >> +Element.observe(document, "dom:loaded", function() { > >> + $$('.gallery').each(function(gallery) { > >> > > > > > Same remark as for the dashboard macro, IMO this is too greedy and > > $mainContentArea.select('.gallery') would perform better. > > > > The problem is not really each such selector taken individually, > but if we > > continue adding more and more, it will make the loading after DOM > is loaded > > clumsy. > > I agree, but I don't like the fact that gallery.js would depend on the > presence of the mainContentArea element. Is this element part of the > public "API"? > > > > Yes maybe $('xwikicontent') is more appropriate since it is implemented > by all skins AFAIR. The problem is that the gallery widget needs to work when the office presentation is viewed stand-alone, i.e. using the office.vm Velocity template (e.g. when you click on the eye icon next to an office attachment, if you have the office server running). I could add a 'xwikicontent' div there or use this id on the body element but it looks like a hack to me. Thanks, Marius > > Right now we are not really clear on what's API and what's not, although > there is already a lot of code relying on xwikicontent (CSS, JS, etc.) > so it's kind of an API de facto. > > Jerome. _______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs