Ajax: sortable_element with table-rows


#1

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):

... <% for page in @pages %> <% end %>
<%= page.title %> <%= image_tag("arrow", :alt => 'sort', :title => "sort", :class=>"sort") %>

<%= 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


#2

Check out:
http://wiki.script.aculo.us/scriptaculous/show/Sortable.create

There’s apparently some limitations with the “table” tag.