Check out:
http://wiki.script.aculo.us/scriptaculous/show/Sortable.create
There''s apparently some limitations with the "table" tag.
On 11/28/05, Beate Paland
<bpaland-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi,
>
> I wanted to sort my rows via ajax and sortable_element, but that
> doesn''t work. But it works with ul/li, so required js-libs are
there.
>
> Here is what i did (simplified):
>
> <table id="tableorder">
> ...
> <% for page in @pages %>
> <tr id="item_<%= page.id %>">
> <td><%= page.title %></td>
> <td><%= image_tag("arrow", :alt =>
''sort'', :title => "sort",
> :class=>"sort") %></td>
> </tr>
> <% end %>
> </table>
>
> <p id="order-info"></p>
>
> <%= sortable_element ''tableorder'',
> :update => ''order-info'',
> :complete => visual_effect(:highlight,
''tableorder''),
> :url => { :action => "order" } %>
>
>
> Does anyone have a clue? I wanted to keep the table, because there are
> a few more infos to be diplayed.
>
> Thanks,
> Beate
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>