If you are dragging an item from one list into another list, then by  
W3C fiat, they will have unique IDs.

If you are cloning an object from one list into another (the list of  
ingredients and the pot pattern) then you are responsible for creating  
a unique ID for your newly added cloned object.

Either way, the sort order is managed by each element having a unique  
ID that follows Sortable's rules for ID making: one or more alpha  
characters, followed by one and only one underscore, followed by a  
numeral, and entirely unique. Due to Scripty's parentage in the Rails  
framework, these numerical ID segments are the id auto-number key for  
the object they represent, and all elements within a list should  
(must?) be instances of the same Model.

Walter

On May 3, 2009, at 10:06 AM, WLQ wrote:

>
> So I've made all the fancy stuff, now the hardest one. I have made the
> order Id change in the sortable and it works. But what about when you
> drag an item from other sortable? How to program it so it sees between
> which Ids it pasts an item, and change ids for items as necessary?
>
> Thanks, Yan
> >


--~--~---------~--~----~------------~-------~--~----~
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 prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to