Forum: Ruby on Rails Ajax: sortable_element with table-rows

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
bpaland (Guest)
on 2005-11-28 19:27
(Received via mailing list)
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
cuong.tran (Guest)
on 2005-11-28 21:45
(Received via mailing list)
Check out:
  http://wiki.script.aculo.us/scriptaculous/show/Sor...

There's apparently some limitations with the "table" tag.
This topic is locked and can not be replied to.