Changeset 22597
- Timestamp:
- 11/15/2012 03:09:35 AM (12 years ago)
- Location:
- trunk/wp-includes/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/media-models.js
r22578 r22597 359 359 360 360 validate: function( attachment, options ) { 361 // Only retain the `silent` option. 362 options = { 363 silent: options && options.silent 364 }; 365 361 366 return this[ this.validator( attachment ) ? 'add' : 'remove' ]( attachment, options ); 362 367 }, -
trunk/wp-includes/js/media-views.js
r22594 r22597 459 459 media.controller.Upload = media.controller.Library.extend({ 460 460 defaults: _.defaults({ 461 id: 'upload', 462 upload: { text: l10n.uploadMoreFiles }, 463 searchable: false 461 id: 'upload', 462 upload: { text: l10n.uploadMoreFiles }, 463 searchable: false, 464 sortable: true 464 465 }, media.controller.Library.prototype.defaults ), 465 466 … … 472 473 if ( ! library ) { 473 474 library = new Attachments(); 474 library.props.set({475 orderby: 'date',476 order: 'ASC'477 });478 475 library.observe( wp.Uploader.queue ); 479 476 this.set( 'library', library ); … … 996 993 new media.controller.Library( _.defaults({ 997 994 selection: options.selection, 998 library: media.query( options.library ) 995 library: media.query( options.library ), 996 editable: true 999 997 }, main ) ), 1000 998 … … 1257 1255 mainAttachmentsToolbar: function() { 1258 1256 this.toolbar.view( new media.view.Toolbar.Insert({ 1259 controller: this 1257 controller: this, 1258 editable: this.state().get('editable') 1260 1259 }) ); 1261 1260 }, … … 1771 1770 priority: -40, 1772 1771 1773 editable: function() { 1772 // If the selection is editable, pass the callback to 1773 // switch the content mode. 1774 editable: this.options.editable && function() { 1774 1775 this.controller.content.mode('edit-selection'); 1775 1776 }
Note: See TracChangeset
for help on using the changeset viewer.