Forum: Ruby on Rails AJAX drag and drop sorting with pagination

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.
Stephen B. (Guest)
on 2006-04-24 16:40
(Received via mailing list)
Drag and drop sorting is great but if you had a list of, say, 100 items,
you'd probably want to show only 10 per page.

Has anyone seen any way to use the a drag and drop style sorting method
over a number of pages?

I see it working by having the displayed list sortable as normal then an
item is moved to the next page by dragging it onto the 'next' link...
maybe...

Anyone got any ideas?

Steve
Kevin O. (Guest)
on 2006-04-24 17:21
(Received via mailing list)
I would question the wisdom of allowing/forcing your users to manually
sort a list that long.  It seems like a poor choice from a user
interface perspective.


On Monday, April 24, 2006, at 1:37 PM, Stephen B. wrote:
>Anyone got any ideas?
>
>Steve
>
>_______________________________________________
>Rails mailing list
>removed_email_address@domain.invalid
>http://lists.rubyonrails.org/mailman/listinfo/rails


_Kevin
Stephen B. (Guest)
on 2006-04-24 17:27
(Received via mailing list)
Interesting point - but in applications i've previously developed,
clients have always wanted the ability to choose which order items
appear in - they could be pages, products, categories etc. and these can
go into the hundreds.

In the past i've just had a 'list weight' field that you can edit via
the list, putting in a higher number to move the item up.  This is
obviously pretty cumbersome.

My idea was that if a client wanted to move a product in relation to
others, a drag and drop list would be suitable.  However, i'd be
interested to hear any other solutions people have to this problem.

Cheers,

Steve
Nick S. (Guest)
on 2006-04-24 20:52
(Received via mailing list)
This actually isn't all that hard to do. Your AJAX request only hands
back whats on the page, so if you only show 10 items out of a hundred,
thats all your request will get. Its just a matter of then loading up
those items and sorting them through which ever algorithim you want.

Mine isn't particularly speedy at the moment, but then again, people
or only sorting things 10 at a time. :)

And like you said, the main use for this is simply items in relation
to the ones around each other, so a massive sort of all 100s of items
is never needed.

-Nick
This topic is locked and can not be replied to.