Larry White
2006-Apr-05 20:33 UTC
Nuby Sortable Question? How do you pass multiple lists back to the server
I have multiple drag and drop lists. If you sort within one list, you can pass the list back to the server using: <%= sortable_element ''task-list'' << person.id.to_s , :url => { :action => "noop", :id => @user }, ... %> Which causes this to be included in the javascript: onUpdate:function(){new Ajax.Request(''/tasklist/noop/101'',... parameters:Sortable.serialize(''task-list101'') If you are dragging between two lists, how do you pass both back? (or does the onUpdate get called twice (once for each list?)) What if you wanted to pass all the lists back after multiple drags and drops? thanks _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Larry White
2006-Apr-05 20:35 UTC
Re: Nuby Sortable Question? How do you pass multiple lists back to the server
what if we keep track in flash of all the lists that get updated - then we can persist all the changes at the end and run the schedule routine then. On 4/5/06, Larry White <ljw1001-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I have multiple drag and drop lists. If you sort within one list, you can > pass the list back to the server using: > > <%= sortable_element ''task-list'' << person.id.to_s , > :url => { :action => "noop", :id => @user }, > ... > %> > > Which causes this to be included in the javascript: > > onUpdate:function(){new Ajax.Request(''/tasklist/noop/101'',... parameters:Sortable.serialize(''task-list101'') > > > If you are dragging between two lists, how do you pass both back? (or > does the onUpdate get called twice (once for each list?)) > > What if you wanted to pass all the lists back after multiple drags and > drops? > > thanks >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs