Make WordPress Core

Changeset 29322


Ignore:
Timestamp:
07/29/2014 02:57:21 PM (12 years ago)
Author:
SergeyBiryukov
Message:

Media Grid: Close the modal if the attachment is deleted.

props ericlewis.
fixes #28819.

File:
1 edited

Legend:

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

    r29312 r29322  
    363363                initialize: function() {
    364364                        var self = this;
     365
    365366                        media.view.Frame.prototype.initialize.apply( this, arguments );
    366367
    … …  
    372373                        this.gridRouter = this.options.gridRouter;
    373374                        this.library = this.options.library;
     375
    374376                        if ( this.options.model ) {
    375377                                this.model = this.options.model;
    … …  
    378380                        }
    379381
     382                        // Close the modal if the attachment is deleted.
     383                        this.listenTo( this.model, 'destroy', this.close, this );
     384
    380385                        this.createStates();
    381386
    … …  
    386391                        // Bind default title creation.
    387392                        this.on( 'title:create:default', this.createTitle, this );
    388                         this.title.mode('default');
     393                        this.title.mode( 'default' );
    389394
    390395                        this.options.hasPrevious = this.hasPrevious();
Note: See TracChangeset for help on using the changeset viewer.