[wp-trac] Re: [WordPress Trac] #2702: Easier way to change page
order (AJAX?)
WordPress Trac
wp-trac at lists.automattic.com
Fri May 5 19:51:26 GMT 2006
#2702: Easier way to change page order (AJAX?)
----------------------------+-----------------------------------------------
Id: 2702 | Status: new
Component: Administration | Modified: Fri May 5 19:51:26 2006
Severity: normal | Milestone: 2.1
Priority: low | Version: 2.0
Owner: anonymous | Reporter: FireMotion
----------------------------+-----------------------------------------------
Comment (by mdawaffe):
This would be relatively straightforward using DBX and nested dbx_groups.
Rewrite page_rows() such that the HTML reflects the page hierarchy. Pages
without children wouild just be a draggable DBX element. Pages with
children would be a draggable DBX element and would also contain a new
dbx_group in which all its children were elements. You'd be able to to
move each page (together with its children) within the list. Until DBX
supports dragging items between different dbx_groups (apparently, this is
in the works), you would not be able to change the hierarchy, just the
ordering; you could only reorder children under their current parents.
DBX is an accessibility dream; I don't believe there would be any
problems there.
Then just have a regular old button at the bottom of the screen "Save Page
Orders" that would submit a regular old form populated by JS with the
value of the DBX cookie. No AJAX needed. In fact, doing AJAX on every
drag and drop would be a mess.
You'd have to be carefull with the hierarchical HTML so that list-
manipulation would play nice. You wouldn't want to delete a parent page
and have all its children disappear from the screen as well. Stick with
tables; it should be a flat table (no nested tables) with nested *tbody*
elements that define the dbx_groups and draggable elements. (I'm not sure
if that'd be valid HTML... anyone know?).
--
Ticket URL: <http://trac.wordpress.org/ticket/2702>
WordPress Trac <http://wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list