Issue 281 is not going to make it into M3. The specific issue that
needs to be solved first is how to manage dependencies across multiple
snippets on one page. See the Assembla page for more information:
http://www.assembla.com/spaces/liftweb/tickets/281

Peter

On Feb 26, 5:14 pm, Peter Robinett <pe...@bubblefoundry.com> wrote:
> Mads, thanks for bringing ticket 281 to my attention, I'll address it
> in my patch.
>
> Jeppe, that's how I plan on using it with Flot: having Flot.init
> register the plugins and in the charts call toHTML as needed.
>
> Should have everything up on my pr1001_issue_322 branch by tomorrow.
>
> Peter
>
> On Feb 25, 1:14 am, Jeppe Nejsum Madsen <je...@ingolfs.dk> wrote:
>
>
>
> > Peter Robinett <pe...@bubblefoundry.com> writes:
> > > Hi all,
>
> > [...]
>
> > > // Usage in boot.scala
> > > val myJsScript = new JsScript("flot" :: "jquery.flot.selectable.js" ::
> > > Nil)
> > > ResourceServer.allow(myJsScript.allowResource)
>
> > > // Usage in a normal snippet
> > > def mySnippet = {
> > >    <head>
> > >            { myJsScript.toHTML }
> > >    </head>
> > >    <div>
> > >            The rest of the snippet...
> > >    </div>
> > > }
>
> > > // Usage in a CometActor
> > > class myActor extends CometActor with JsScriptDependency {
> > >    override def scripts = List(new JsScript("flot" ::
> > > "jquery.flot.selectable.js" :: Nil));
> > > }
>
> > > What do you think? It's a really quite basic but I think such an
> > > approach could work well for things like as lift-flot.
>
> > It might be a start :-) I'm a little unsure if it supports the use case
> > I would like to see:
>
> > I'm using jqPlot (a flot-like lib) and would like to, in boot, just
> > initialize the widget:
>
> > jqPlot.init
>
> > jqPlot comes with numerous plugins and this should be handled by the
> > widget. Whether a plugin is loaded on a page depends on some higher
> > level structure. Ie. if I wish to draw a pie chart, the pie chart plugin
> > should be loaded.
>
> > Looking back at this, it seems like this could work with the above....
>
> > In init: register all plugins
> > In the specific charts, call toHtml on the plugins needed
>
> > /Jeppe

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to