Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#6988 closed enhancement (fixed)

Add sorting to gallery items

Reported by: aaroncampbell's profile AaronCampbell Owned by: ryan's profile ryan
Milestone: 2.6 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch needs-testing blessed
Focuses: 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)

6988.001.diff (2.0 KB) - added by AaronCampbell 17 years ago.
6988.002.diff (2.9 KB) - added by AaronCampbell 17 years ago.
6988.003.diff (163.0 KB) - added by AaronCampbell 17 years ago.
6988.004.diff (529 bytes) - added by AaronCampbell 17 years ago.
gallery-script-loader-bump.diff (721 bytes) - added by nbachiyski 17 years ago.

Download all attachments as: .zip

Change History (23)

#1 @AaronCampbell
17 years ago

  • Keywords has-patch needs-testing added

I uploaded the patch, works on my trunk install.

#2 @ryan
17 years ago

  • Owner changed from anonymous to ryan

#3 @matt
17 years ago

  • Keywords blessed added
  • Milestone changed from 2.5.2 to 2.6

+1

#4 @AaronCampbell
17 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").

#5 @ryan
17 years ago

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

#6 @AaronCampbell
17 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.

#7 @ryan
17 years ago

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.

#8 @AaronCampbell
17 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?

#9 @ryan
17 years ago

Replace the current one.

#10 @ryan
17 years ago

Related: #7007

#11 @AaronCampbell
17 years ago

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)
  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
  6. Adds in the new "menu_order" field
  7. Updates colors-fresh and colors-classic to use the same .sorthelper class for the widgets and the gallery.
  8. Updates media.css to add the "move" cursor to the elements

#12 @AaronCampbell
17 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:

  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

#13 @ryan
17 years ago

  • Resolution set to fixed
  • Status changed from new to closed

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

#14 @azaozz
17 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

#15 @AaronCampbell
17 years ago

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

#16 @ryan
17 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

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

#17 @nbachiyski
17 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.

#18 @ryan
17 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

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

Note: See TracTickets for help on using tickets.