Make WordPress Core

Ticket #27028: 27028.diff

File 27028.diff, 968 bytes (added by wonderboymusic, 10 years ago)
  • src/wp-includes/js/media-views.js

     
    48404840                                this.model.on( 'selection:single selection:unsingle', this.details, this );
    48414841                                this.details( this.model, this.controller.state().get('selection') );
    48424842                        }
     4843
     4844                        this.listenTo( this.controller, 'attachment:compat:waiting attachment:compat:ready', this.updateSave );
    48434845                },
    48444846                /**
    48454847                 * @returns {wp.media.view.Attachment} Returns itself to allow chaining
     
    69086910                                data[ pair.name ] = pair.value;
    69096911                        });
    69106912
    6911                         this.model.saveCompat( data );
     6913                        this.controller.trigger( 'attachment:compat:waiting', ['waiting'] );
     6914                        this.model.saveCompat( data ).always( _.bind( this.postSave, this ) );
     6915                },
     6916
     6917                postSave: function() {
     6918                        this.controller.trigger( 'attachment:compat:ready', ['ready'] );
    69126919                }
    69136920        });
    69146921