Copy link to clipboard
Copied
Hello, everyone.
I'm tasked with a project part of which involves using a form to change the sort order of data retrieved from an Oracle (10g production, 11g development) database. I've never had to do anything like this, before, so I'm at a bit of a loss as to how to go about it.
I've been considering using the jQuery-UI draggable feature, but don't know how to save the data back to the database.
WIth or without the jQuery-UI, what do you think is the best way to go about this?
Respectfully,
^_^
A co-worker suggested using the jQuery-UI for the sort, and AJaX to submit the new sort order on every change.
Copy link to clipboard
Copied
do it in your query.
sort by #form.order_by_field#
Copy link to clipboard
Copied
Sorry.. I didn't describe what I need as well as I thought I had.
Say I have a table for articles that all appear on a page:
ArticleID Title Content SortOrder Date
1 Title A Content A 3 2012-07-07
2 Title B Content B 1 2012-07-09
3 Title C Content C 4 2012-07-17
4 Title D Content D 2 2012-07-27
On the page that displays these articles, they appear in order from top to bottom:
Title B
Title D
Title A
Title C
But someone wants to rearrange the order in which they appear.
Title D
Title A
Title C
Title B
I prefer a drag n drop approach, but if that isn't possible/feasible, I'll appreciate suggestions.
Thank you,
^_^
Copy link to clipboard
Copied
Put a JQuery table sorter on it. It's pretty straight fwd. I don't think you want to bounce back to the server to effect some sorting for the UI, if possible: just do it on the UI.
--
Adam
Copy link to clipboard
Copied
The client wants to be able to save the new sort order to the database. This is for a very rudimentary CMS to affect the sort order of articles on the publicly viewed pages.
^_^
Copy link to clipboard
Copied
A co-worker suggested using the jQuery-UI for the sort, and AJaX to submit the new sort order on every change.