Forum: Ruby on Rails sortable 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.
Daniel H. (Guest)
on 2006-04-24 21:01
(Received via mailing list)
I've been trying to make some table rows sortable using Scriptaculous.
I've
used:

Sortable.create("secondlist", {tag:'tr', treeTag:'table'});

and

Sortable.create("secondlist", {tag:'tr'});

Neither of which works. Is it even possible to do this?

Thanks,
Daniel
Johnny B (Guest)
on 2006-04-24 21:10
I used this excellent javascript library for the same thing

http://kryogenix.org/code/browser/sorttable/

There is a table sorter ticket posted in scriptaculous requested
enhancements
http://dev.rubyonrails.org/ticket/2606

I dont know if this has been included yet.  I have seen some sorttable
lists but dont think there is anything specific for tables but the
sorttable.js link i have provided is as good as i anything ive seen out
there.
Daniel H. (Guest)
on 2006-04-24 21:23
(Received via mailing list)
Thanks Johnny B-

I'm actually using that currently :) My goal is to have table rows
sortable
using the kryogenix script AND by using drag and drop, like you can do
with
lists.  That way if someone wants to compare to rows side by side, he
can.

The scriptaculous Sortable class(?) relies on Draggables and
Droppables...
and as far as I can tell you can't make <tr>'s draggable unless you
change
their position to absolute, which is totally counterproductive :)

Daniel
This topic is locked and can not be replied to.