On 2/9/07, Jean-Philippe Encausse <[EMAIL PROTECTED]> wrote: > > 2. Is it possible to roll back the state of the sortable if the > onUpdate function returns false or throws an exception ? > > Regards, > Jp >
I too have run across this problem with the scriptaculous sortables. The problem that I can see is that the Sortable moves elements around on hover events rather than when you actually drop it, so that when you finally do drop the element, it won't remember where it originally came from. I did post a patch for one type of solution: http://dev.rubyonrails.org/ticket/7396 and examples: http://www.fladder.se/misc/sortable/ though it might be a good thing to just save the original position of the draggable onStart and then reverting it back either if there's an exception or the revert condition isn't true onUpdate instead checking every time in the hover handlers? Matti Ryhänen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
