Opened 5 years ago
Closed 5 years ago
#6988 closed enhancement (fixed)
Add sorting to gallery items
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.6 |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | has-patch needs-testing blessed |
| Cc: |
Description
The idea is to integrate the functionality that my Reorder Gallery plugin offers into core as per Matt Mullenweg's suggestion over at my blog.
It should be rather easy, I'll try to get a patch up real soon. Hopefully Matt will stop by and let me know what version he'd like to integrate it into.
Attachments (5)
Change History (23)
AaronCampbell — 5 years ago
comment:1
AaronCampbell — 5 years ago
- Keywords has-patch needs-testing added
AaronCampbell — 5 years ago
comment:4
AaronCampbell — 5 years ago
The 002 diff is to be used instead of 001. It's 001 with the missing entry in script-loader for gallery.js (aliased as "admin-gallery").
This adds an interface.js requirement. We're trying to eliminate interface requirements. Can jQuery UI be used instead?
comment:6
AaronCampbell — 5 years ago
I'm sure it could, it was set up to mimic wp-admin/js/widgets.js which does the widget sorting. I'll take a look at jQuery UI in the next day or two and convert it.
Yeah, widgets admin needs to be ported to jQuery UI. jQuery UI wasn't up to the task when 2.5 was released, but the latest jQuery UI beta might work.
comment:8
AaronCampbell — 5 years ago
To use the jquery ui sortables, we need the ui.sortable file (duh), but we also have to add the latest jquery.js from trunk. Should I ADD it (tag it as jquery125), or replace the current one with it?
comment:10
ryan — 5 years ago
Related: #7007
comment:11
AaronCampbell — 5 years ago
003 is the newest update.
- It updates to the latest wp-includes/js/jquery/jquery.js from trunk (1.2.5 built from revision 5652)
- It updates to the latest wp-includes/js/jquery/ui.core.js from trunk (built from revision 5652)
- It adds wp-includes/js/jquery/ui.sortable.js (built from revision 5652)
- It adds wp-admin/js/gallery.js (the new version that uses UI)
- Adds the new stuff to script loader
- Adds in the new "menu_order" field
- Updates colors-fresh and colors-classic to use the same .sorthelper class for the widgets and the gallery.
- Updates media.css to add the "move" cursor to the elements
AaronCampbell — 5 years ago
comment:12
AaronCampbell — 5 years ago
My wikiformatting didn't work so great on that last post (left of a leading space before all my list items), so here it is:
Regarding 003:
- It updates to the latest wp-includes/js/jquery/jquery.js from trunk (1.2.5 built from revision 5652)
- It updates to the latest wp-includes/js/jquery/ui.core.js from trunk (built from revision 5652)
- It adds wp-includes/js/jquery/ui.sortable.js (built from revision 5652)
- It adds wp-admin/js/gallery.js (the new version that uses UI)
- Adds the new stuff to script loader 1. Adds in the new "menu_order" field
- Updates colors-fresh and colors-classic to use the same .sorthelper class for the widgets and the gallery.
- Updates media.css to add the "move" cursor to the elements
comment:13
ryan — 5 years ago
- Resolution set to fixed
- Status changed from new to closed
comment:14
azaozz — 5 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Seems to be broken now. Error in FB:
sort.instance is undefined http://site.com/wp26/wp-admin/js/gallery.js?ver=20080520 Line 13
AaronCampbell — 5 years ago
comment:15
AaronCampbell — 5 years ago
6988.004.diff fixes it for me. Seems they changed something in how it works.
comment:16
ryan — 5 years ago
- Resolution set to fixed
- Status changed from reopened to closed
comment:17
nbachiyski — 5 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Version in script-loader.php has to be bumped.
We should be extra careful about that in the future, because if Gears is in use, disabling the browser cache doesn't help.
nbachiyski — 5 years ago
comment:18
ryan — 5 years ago
- Resolution set to fixed
- Status changed from reopened to closed

I uploaded the patch, works on my trunk install.