I am using Sortable with tree enabled on a list like below:

   Group 1
       Item 1
       Item 2
   Item 3
   Group 2
       Item 4

Here, both Groups and Items can be dragged.  Additionally, Items can
be dragged into Groups (each Group contain an UL).  However, I want to
prevent Groups from being dragged into Groups, but there doesn't seem
to be an option in Sortable to achieve that.

The solution would be something like being able to specify "accept"
class names for the Sortable tree's nested ULs, so only Items would be
allowed inside Groups.  But that doesn't seem to be possible.  Is
there something that I am missing, or would doing this require me to
extend Sortable's implementation myself?

Thanks,
Eric

----------------

By the way, in the course of implementing my drag-and-drop tree, I
found the tree-dump output of Sortable tree to be clumsy to use on the
server side, because it would require me to recreate the tree in the
database each time.  Instead, I added a Draggables observer for the
onEnd event to capture each sorting action, and send to the server
only the change that was made: what element was dragged, which
container it was dragged to and at what position.  This required a bit
of additional coding to determine the location and position of dragged
element, but made the server side code simpler and faster.  I am just
curious, have other people done the same?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to