mootools Sortable detach

179 Views Asked by At

I'm working on an interface using Mootools 1.3 that will have two columns of information-- on the left, "available elements" and on the right "selected elements". You'll pull from the list of avail. in the left, and pull to the right, where you will be able to sort.

Here's a fiddle: http://jsfiddle.net/Um3xK/1/

What I'd like is to detach the "sort" from the left column, since it's not needed and could be confusing, but leave the sort on the right-- and possibly detach the "drag left" from the right column, since you won't need to pull items from right to left, only from left to right.

Is this possible? From reading the Mootools docs it seems like if you use the "detach" method it'll detach all click/drag events.

1

There are 1 best solutions below

0
On

One workaround is:

  • make one of the lists (for example, the right one) sortable;
  • use Drag.Move to coordinate the drag and drop;
  • When an item from the left is dropped into the right list, using addItem of Sortables.