If you have two sortables that you can drag and drop to and you want to call an action that will save the new order, do you put a callback function (onUpdate) in both sortable.creates? Do you call the same function to save the order or two different ones? Thanks, K --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I would put it in just one, but have it call a function that collects and updates the information from both lists when it runs. On Jul 25, 2:17 am, Kim <Kim.Gri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> If you have two sortables that you can drag and drop to and you want > to call an action that will save the new order, do you put a callback > function (onUpdate) in both sortable.creates? > > Do you call the same function to save the order or two different ones? > > Thanks, K--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
But if I put it in just one and then reorder the list that does not have the callback function the function is not called. On 7/25/07, Diodeus <diodeus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > I would put it in just one, but have it call a function that collects > and updates the information from both lists when it runs. > > On Jul 25, 2:17 am, Kim <Kim.Gri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > If you have two sortables that you can drag and drop to and you want > > to call an action that will save the new order, do you put a callback > > function (onUpdate) in both sortable.creates? > > > > Do you call the same function to save the order or two different ones? > > > > Thanks, K > > > > >-- Kim Griggs kim.griggs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org "We are all stakeholders in the Karma economy." --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I think you would use Draggable''s observers here: function saveDraggableOrder(){ // your code here } var draggableObserver = { element:null, onStart:function(eventName, draggable, event){ }, onDrag:function(eventName, draggable, event){ }, onEnd:function(eventName, draggable, event){ //alert([eventName, draggable, event, draggable.element]) saveDraggableOrder() } } Draggables.addObserver(draggableObserver) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---