[Seaside] jQueryUI Drago & Drop
cervoise at gmail.com
Thu Apr 22 21:16:30 UTC 2010
I'm using Seaside 3.0a5 and I've importe jQuery and jQueryUI
I'm trying to do a drag & drop effect like here :
but there is some information missing. I can move my elements, I detect when
there are on the draggable zone but I don't find the method for adding my
element wich I am dropping in the draggable zone. On seaside website they
use a callbackDroppable method but I do not have it.
I'm doing this :
WAComponent subclass: #Test2
self dragzone:html .
| maListe |
maListe := Set new .
maListe add: Composant new . "here Composant is juste a string"
html div class: 'inventory ui-corner-all drag'; with: [ maListe do: [
:each | html div
with: each] ] .
class: 'ui-droppable ui-corner-all drop';
script: (html jQuery new droppable
onDrop: (html jQuery ajax callback:
[ :event | self selected add:
(event at: #draggable) ] ;
html: [ :r | self
renderSelectedItemsOn: r ]));
with: [ self renderSelectedItemsOn: html ]
self selected do: [ :each |
script: (html jQuery new draggable
onStop: (html jQuery this effect
percent: 1; puff;
onComplete: (html jQuery this parent load html: [ :r |
self selected remove: each ifAbsent: [ ].
self renderSelectedItemsOn: r ]))) ]
self selected: Set new
If someone can help me with the drroppablezone method. I tryed a lots of
things, I searched on the Internet, on the source code but I didn't find
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside