Ticket #6988 (closed enhancement: fixed)

Opened 3 months ago

Last modified 2 months ago

Add sorting to gallery items

Reported by: AaronCampbell Assigned to: ryan
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

6988.001.diff (2.0 kB) - added by AaronCampbell on 05/17/08 22:50:29.
6988.002.diff (2.9 kB) - added by AaronCampbell on 05/18/08 20:31:57.
6988.003.diff (163.0 kB) - added by AaronCampbell on 05/21/08 15:21:27.
6988.004.diff (0.5 kB) - added by AaronCampbell on 07/05/08 04:44:37.
gallery-script-loader-bump.diff (0.7 kB) - added by nbachiyski on 07/06/08 07:47:16.

Change History

05/17/08 22:50:29 changed by AaronCampbell

  • attachment 6988.001.diff added.

05/17/08 22:51:10 changed by AaronCampbell

  • keywords set to has-patch needs-testing.

I uploaded the patch, works on my trunk install.

05/18/08 20:11:57 changed by ryan

  • owner changed from anonymous to ryan.

05/18/08 20:17:28 changed by matt

  • keywords changed from has-patch needs-testing to has-patch needs-testing blessed.
  • milestone changed from 2.5.2 to 2.6.

+1

05/18/08 20:31:57 changed by AaronCampbell

  • attachment 6988.002.diff added.

05/18/08 20:34:26 changed by AaronCampbell

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").

05/19/08 15:38:58 changed by ryan

This adds an interface.js requirement. We're trying to eliminate interface requirements. Can jQuery UI be used instead?

05/19/08 15:49:30 changed by AaronCampbell

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.

05/19/08 20:12:35 changed by ryan

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.

05/21/08 03:48:43 changed by AaronCampbell

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?

05/21/08 05:36:25 changed by ryan

Replace the current one.

05/21/08 05:37:35 changed by ryan

Related: #7007

05/21/08 15:20:53 changed by AaronCampbell

003 is the newest update. 1. It updates to the latest wp-includes/js/jquery/jquery.js from trunk (1.2.5 built from revision 5652) 1. It updates to the latest wp-includes/js/jquery/ui.core.js from trunk (built from revision 5652) 1. It adds wp-includes/js/jquery/ui.sortable.js (built from revision 5652) 1. It adds wp-admin/js/gallery.js (the new version that uses UI) 1. Adds the new stuff to script loader 1. Adds in the new "menu_order" field 1. Updates colors-fresh and colors-classic to use the same .sorthelper class for the widgets and the gallery. 1. Updates media.css to add the "move" cursor to the elements

05/21/08 15:21:27 changed by AaronCampbell

  • attachment 6988.003.diff added.

05/21/08 15:31:16 changed by AaronCampbell

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:

  1. It updates to the latest wp-includes/js/jquery/jquery.js from trunk (1.2.5 built from revision 5652)
  2. It updates to the latest wp-includes/js/jquery/ui.core.js from trunk (built from revision 5652)
  3. It adds wp-includes/js/jquery/ui.sortable.js (built from revision 5652)
  4. It adds wp-admin/js/gallery.js (the new version that uses UI)
  5. Adds the new stuff to script loader 1. Adds in the new "menu_order" field
  6. Updates colors-fresh and colors-classic to use the same .sorthelper class for the widgets and the gallery.
  7. Updates media.css to add the "move" cursor to the elements

05/21/08 18:29:47 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [7974]) Add sorting to gallery. Props AaronCampbell?. fixes #6988

07/04/08 20:20:02 changed by azaozz

  • status changed from closed to reopened.
  • resolution deleted.

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

07/05/08 04:44:37 changed by AaronCampbell

  • attachment 6988.004.diff added.

07/05/08 04:45:19 changed by AaronCampbell

6988.004.diff fixes it for me. Seems they changed something in how it works.

07/05/08 05:01:28 changed by ryan

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [8259]) Gallery sort fix from AaronCampbell?. fixes #6988

07/06/08 07:46:53 changed by nbachiyski

  • status changed from closed to reopened.
  • resolution deleted.

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.

07/06/08 07:47:16 changed by nbachiyski

  • attachment gallery-script-loader-bump.diff added.

07/06/08 16:41:48 changed by ryan

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [8262]) Bump version for gallery. Props nbachiyski. fixes #6988