The question would be whether Sortable.serialize will run independent of an
object being declared as a Sortable. Try this:
1. Follow the rules for setting up a Sortable element, but don't actually call
Sortable.create on it. In other words, be sure that it is the correct element
construction (try a UL for the easiest case) and that each element in it is
properly ID'd with string_123 (unique number).
2. Loop through those elements and set up Draggable on each one, and then in
whatever callback Draggable offers for an end of drag event, call
Sortable.serialize('list_id') and see what's in the result.
I am not sure how you get Draggable to do the one other cool thing that
Sortable does -- namely the "scoot out of the way" behavior. A good dive
through the source should let you know if that is a special method within
Sortable or whether it is leveraging another module's native method.
If all this seems to be too much skating uphill, you might want to look through
the source of Draggable (with snap) vs. Sortable, and see if the snap behavior
can be injected into Sortable at runtime with one of the various Rubyisms in
Prototype. (addMethod or extend)
Walter
On Sep 27, 2011, at 1:23 AM, Vajiramani wrote:
> Dear Johan,
>
> Thank you so much for your reply.
>
> Yes, it is possible to have snap with Draggable. But I need sortable
> container so that i can get the draggable DOM's order/sequence to store. I
> didn't try whether I can get DOM's order/sequence in Draggable.
>
> Regards
> Vaji
>
> On Mon, Sep 26, 2011 at 8:06 PM, Johan Arensman <[email protected]> wrote:
> http://madrobby.github.com/scriptaculous/sortable/
>
> Doubt it, but have you tried 'snap' from the Draggable options?
>
>
>
>
> On Mon, Sep 26, 2011 at 2:47 PM, T.J. Crowder <[email protected]>
> wrote:
> On Sep 26, 10:18 am, Vaji <[email protected]> wrote:
>
> > Any timely help would be much more appreciated.
>
> Recommend dropping the word "timely" from messages like this in
> future. You're asking for _help_, the
> timeframe on which someone takes their precious time to help you is
> completely and totally up to them.
> --
> T.J. Crowder
> Independent Software Engineer
> tj / crowder software / com
> www / crowder software / com
>
> --
> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
>
>
>
> --
> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
>
>
>
> --
> Regards
> Vajiramani
> +91 98403 16776
>
> --
> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.