[Seaside] JQDroppable convience method

Lukas Renggli renggli at gmail.com
Tue Oct 27 22:31:51 UTC 2009


I typically do something along the lines of:

    ... onDrop: (html jQuery ajax
       tigger: [ :object | ... ] passengers: html jQuery this)

The method #trigger:passengers: takes a block that is evaluated with a
collection of passengers from the query passed in as the second
argument.

Lukas

2009/10/27 Johan Brichau <johan.brichau at uclouvain.be>:
> Hi,
>
> While working with JQuery's draggable/droppable plugins in Seaside, I was
> missing the convenient "passenger callbacks" that Scriptaculous had.
> Therefore I added the following convenience method to JQDroppable. You can
> pass it a block that will be invoked with the passenger of the draggable
> that was dropped onto it.
>
> Would it make sense to add it to the plugin's distributed version?
> And if I am making things overly complicated, that would be glad to know as
> well ;-)
>
> cheers,
>
> onDropCallback: aBlock
>        self onDrop:
>                (((JQueryClass context: self renderContext) ajax
>                                callback: [:value | aBlock value: (self
> renderContext callbacks passengerAt: value)]
>                                value: (JSStream on:
> '$(ui.draggable).get(0).id'))
>                        asFunction: #(event ui))
>
> ----------------------------
> Johan Brichau
> johan.brichau at uclouvain.be
>
>
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside mailing list