Limit depth of Sortable Tree

1 view
Skip to first unread message

Kevin

unread,
Jul 7, 2009, 10:37:05 AM7/7/09
to Prototype & script.aculo.us
I'm attempting to make a list of grouped terms. I'm approaching this
by creating a Sortable object as a tree, so the user will be able to
drag terms into and out of groups, as well as reordering the groups
themselves. I do not want the user to be able to drag a group into
another group.

I was wondering if there was an option (or a workaround) for limiting
the depth of a Sortable tree.

Another idea I had about solving this was to make the Droppable
'group' elements only accept terms (since accept is an option for the
Droppable class). Although, since creating the draggable and
droppables is all done when calling Sortable.create, I'm not sure how
I can modify the options for individual elements.

Any ideas?

Kevin
Reply all
Reply to author
Forward
0 new messages