hey Matt,
I'm trying to do a similar thing. I'm wondering if you got this to
work? Here's some things I'm going to try
1. As you mentioned, you can certainly have the first list be
draggable, and once an item is dropped into the second list, make it
sortable. As you pointed out, that probably doesn't allow you to
easily perform the sort-at-the-same-time-as-dropping functionality.
2. I haven't tried it, but I wonder what happens if you could use two
sortables. The first sortables would include the multiple lists, to
allow moving (with sort). The second sortables is only defined on the
items in the second list. As part of the onComplete function for the
first sortables, remove the class that includes the item in the first
sortable.
3. #2 might not work if the class is only used at the time the
sortable is defined, in order to attach the event listener. Based on
the docs (I haven't checked out the code yet) this is probably true,
so instead of changing classes in the onComplete, use the "detach"
method to remove the item from the first sortable, and then add it
into the 2nd sortable.
4. Another approach would be to use the "constrain" property to limit
the drag-and-drop of items once they are in the second list. I don't
know if this property is per-element or per-sortable. If it is per-
sortable, perhaps we could extend the class to make it per-element.
Then the onComplete just has to set the constraint property.
5. This just occurred to me. On the onDrag you could check if the
element belongs to a class ("dontSort") -- if it does, cancel the
drag. The onComplete, when dropping the element into the second list,
would add the class to the element. One issue that you would have to
code around, would be if a user drags/resorts an item in the original
list.
Just some thoughts. Hope they help
Terry
On Aug 16, 8:40 pm, "fish.bucket" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to create a drag anddropinterface similar tosortables,
> the only difference is that I need the item to not be removed from the
> list you're dragging it from. I'm not sure how exactly to go about
> this and was looking for some input.
>
> I assume you need to clone the item that needs to be dragged, inject
> it into the proper list container, then use thesortablesadditem
> function. I just cant seem to come up with any results.
>
> I'm trying to create something similar to
> this:http://demos111.mootools.net/Drag.Cart
> except that while you're hovering over thedropcontainer you should
> be able to sort the items without dropping it first.
>
> Any help would be appreciated.
> -Matt