开发者

mootools Sortable detach

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 fro开发者_JAVA百科m 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.


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.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜