[Seaside] JQDroppable convience method

Johan Brichau johan.brichau at uclouvain.be
Tue Oct 27 22:26:34 UTC 2009


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






More information about the seaside mailing list