Changeset 22713
- Timestamp:
- 11/20/2012 02:04:59 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/js/media-upload.js
r22699 r22713 321 321 selection.gallery = attachments.gallery; 322 322 323 // Fetch the query's attachments, and then break ties from the 324 // query to allow for sorting. 325 selection.more().done( function() { 326 // Break ties with the query. 327 selection.props.set({ query: false }); 328 selection.unmirror(); 329 selection.props.unset('orderby'); 330 }); 331 323 332 return wp.media({ 324 333 frame: 'post', -
trunk/wp-includes/js/media-views.js
r22712 r22713 2541 2541 2542 2542 this.initSortable(); 2543 this.collection.props.on( 'change:orderby', this.refreshSortable, this ); 2543 2544 2544 2545 _.bindAll( this, 'css' ); … … 2550 2551 2551 2552 destroy: function() { 2553 this.collection.props.off( null, null, this ); 2552 2554 this.collection.off( 'add remove reset', null, this ); 2553 2555 this.model.off( 'change:edge change:gutter', this.css, this ); … … 2627 2629 this.$el.sortable( 'option', 'disabled', !! collection.comparator ); 2628 2630 }, this ); 2631 }, 2632 2633 refreshSortable: function() { 2634 if ( ! this.options.sortable || ! $.fn.sortable ) 2635 return; 2636 2637 // If the `collection` has a `comparator`, disable sorting. 2638 this.$el.sortable( 'option', 'disabled', !! this.collection.comparator ); 2629 2639 }, 2630 2640
Note: See TracChangeset
for help on using the changeset viewer.