Hey, I have a Sortable, and a Droppable (a dropzone). I want to be able to drag elements out of the Sortable and into the Droppable. And I want the reverse to be possible as well - take a draggable from my dropzone, and ''re-insert'' back into the Sortable. What is the ''correct'' design pattern for this? Thanks Joerg --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
A sortable and a droppable should do it. Or, creating two Sortables would certainly work. See also demos at these links: http://wiki.script.aculo.us/scriptaculous/page/print/SortableListsDemo http://www.gregphoto.net/sortable/advanced/ TAG On Jul 26, 2007, at 12:19 PM, Joerg wrote:> > Hey, > > I have a Sortable, and a Droppable (a dropzone). I want to be able to > drag elements out of the Sortable and into the Droppable. And I want > the reverse to be possible as well - take a draggable from my > dropzone, and ''re-insert'' back into the Sortable. > > What is the ''correct'' design pattern for this? > > Thanks > Joerg > > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Yeah, a sortable and droppable is definitely what I want to use. I always get stuck though in ''unhooking'' the draggable from the sortable when I drop it on the droppable. (How''s that for ryhthmic sentence?) What I''m doing currently is creating a new Draggable with the original element that I''m moving, and appending it to my droppable when I hover over it. If I don''t do it in such a manual process, the draggable always reverts back to the sortable, even though containment: is set to both the sortable and droppable, and the droppable has the accept: set to the class of the draggable. On Jul 26, 10:02 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote:> A sortable and a droppable should do it. Or, creating two Sortables > would certainly work. > > See also demos at these links:http://wiki.script.aculo.us/scriptaculous/page/print/SortableListsDemohttp://www.gregphoto.net/sortable/advanced/ > > TAG > > On Jul 26, 2007, at 12:19 PM, Joerg wrote: > > > > > Hey, > > > I have a Sortable, and a Droppable (a dropzone). I want to be able to > > drag elements out of the Sortable and into the Droppable. And I want > > the reverse to be possible as well - take a draggable from my > > dropzone, and ''re-insert'' back into the Sortable. > > > What is the ''correct'' design pattern for this? > > > Thanks > > Joerg--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
On Jul 27, 2007, at 2:24 AM, Joerg wrote:> Yeah, a sortable and droppable is definitely what I want to use. I > always get stuck though in ''unhooking'' the draggable from the sortable > when I drop it on the droppable. (How''s that for ryhthmic sentence?) > > What I''m doing currently is creating a new Draggable with the original > element that I''m moving, and appending it to my droppable when I hover > over it. If I don''t do it in such a manual process, the draggable > always reverts back to the sortable, even though containment: is set > to both the sortable and droppable, and the droppable has the accept: > set to the class of the draggable.The "revert" option defaults to true for Sortables, and to false for Draggables. Might the problem be as simple as that? TAG --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---