mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
For attachment-compat fields, show a spinner while wp.media.model.Attachment.saveCompat() is firing.
Fixes #27028. git-svn-id: https://develop.svn.wordpress.org/trunk@29831 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ecac4d4a94
commit
a6f6556fca
@ -4840,6 +4840,8 @@
|
||||
this.model.on( 'selection:single selection:unsingle', this.details, this );
|
||||
this.details( this.model, this.controller.state().get('selection') );
|
||||
}
|
||||
|
||||
this.listenTo( this.controller, 'attachment:compat:waiting attachment:compat:ready', this.updateSave );
|
||||
},
|
||||
/**
|
||||
* @returns {wp.media.view.Attachment} Returns itself to allow chaining
|
||||
@ -6908,7 +6910,12 @@
|
||||
data[ pair.name ] = pair.value;
|
||||
});
|
||||
|
||||
this.model.saveCompat( data );
|
||||
this.controller.trigger( 'attachment:compat:waiting', ['waiting'] );
|
||||
this.model.saveCompat( data ).always( _.bind( this.postSave, this ) );
|
||||
},
|
||||
|
||||
postSave: function() {
|
||||
this.controller.trigger( 'attachment:compat:ready', ['ready'] );
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user