Lille
2010-Aug-20 15:32 UTC
seek recommendations for sortable, paginating table that accepts ''delete'' selection...
Hi, I''ve been happily using the tablesorter plugin with pagination for jQuery in my rails app, but now I''m having a tough time integrating Railsian behavior like checkboxes that result in the deletion of data presented in table rows, etc. (behavior adapted from Ryan Bates'' Railscast ''#254 - Edit Multiple''.) Any recommendations? Lille -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
dbkbali
2010-Aug-22 03:00 UTC
Re: seek recommendations for sortable, paginating table that accepts ''delete'' selection...
On Aug 20, 11:32 pm, Lille <lille.pengu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I''ve been happily using the tablesorter plugin with pagination for > jQuery in my rails app, but now I''m having a tough time integrating > Railsian behavior like checkboxes that result in the deletion of data > presented in table rows, etc. (behavior adapted from Ryan Bates'' > Railscast ''#254 - Edit Multiple''.) > > Any recommendations? > > LilleLille, I dont know much about the sortable table plug-in but have addressed the issue of bulk editing by adding a check_box_tag to each table row which generates the items id. Then underneath the pagination I have an empty form with a path to the edit multiple action and a submit button. Elsewhere I have a batch edit button, I have then written a jquery function which 1) hides the empty form at the bottom on load. 2) upon selection of any of the table row check boxes and the clicking of the batch edit button, clones the id''s of any selected checkboxes into the form at the bottom and then submits the form. This was for a backend so I was not so concerned that the javascript didnt degrade gracefully. But it was the easiest way to have multiple forms on a page in an "index"/table type structure. Hope this is helpful. David -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.