Make WordPress Core

Changeset 29427


Ignore:
Timestamp:
08/07/2014 05:02:18 AM (11 years ago)
Author:
wonderboymusic
Message:

Media Grid: remove some unused Trash/Delete handler logic. Rendered useless since [29266] and made official by [29322].

See #28819.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/media-grid.js

    r29426 r29427  
    237237        template: media.template( 'attachment-details-two-column' ),
    238238
    239         preDestroy: function( event ) {
    240             event.preventDefault();
    241 
    242             this.lastIndex = this.controller.getCurrentIndex();
    243             this.hasNext = this.controller.hasNext();
    244         },
    245 
    246         trashAttachment: function( event ) {
    247             this.preDestroy( event );
    248             media.view.Attachment.Details.prototype.trashAttachment.apply( this, arguments );
    249         },
    250 
    251         deleteAttachment: function( event ) {
    252             this.preDestroy( event );
    253             media.view.Attachment.Details.prototype.deleteAttachment.apply( this, arguments );
    254         },
    255 
    256239        editAttachment: function( event ) {
    257240            event.preventDefault();
     
    263246         */
    264247        toggleSelectionHandler: function() {},
    265 
    266         afterDelete: function( model ) {
    267             if ( ! model.destroyed ) {
    268                 return;
    269             }
    270 
    271             var frame = this.controller, index = this.lastIndex;
    272 
    273             if ( ! frame.library.length ) {
    274                 media.frame.modal.close();
    275                 return;
    276             }
    277 
    278             if ( this.hasNext ) {
    279                 index -= 1;
    280             }
    281             frame.model = frame.library.at( index );
    282             frame.nextMediaItem();
    283         },
    284248
    285249        render: function() {
Note: See TracChangeset for help on using the changeset viewer.