AW: [Zope3-dev] open-sourcing some ZC widgets (was Re: AW: Widgetproblems? Is there work in progress?)

Gary Poster gary at modernsongs.com
Tue Jun 1 11:44:21 EDT 2004


Roger ineichen wrote:

> If a widget use javascript, where and how should load them?
>
>I still think we need a concept for to load additional 
>stuff to the ZMI like widgets javascript without to
>hardcode them to the template.
>
>A example:
>
>I write a new widget for a sequence(list) item. 
>This widget needs a javascript for to sort the list.
>
>If a view/interface use this widget. How should 
>who load the related javascript?
>  
>
This may need a full-featured solution eventually, as has been discussed 
before.  For now, I think dumb, simple solutions should lead the way 
(unless you want to :-).  We can either make the widget provide a small 
JS file that the widget can load with a script src tag (relying on the 
browser to be reasonably smart about cacheing scripts and not loading 
the same script multiple times) or (what we currently do) simply rely on 
the necessary function being available: our form template loads a 
utility js.  Maybe a dynamic utility js file--you could register 
snippets to be included--would be an easy way forward at some point.

If we don't have an elegant solution now, I'd rather not let this hold 
us up.

Gary



More information about the Zope3-dev mailing list