mirror of
git://develop.git.wordpress.org/
synced 2025-02-28 18:43:03 +01:00
Media Uploader: Change an uploaded attachment's 'updating' key with the rest of the returned attributes to allow events bound to 'change:updating' to access the new properties. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22709 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3f362417c7
commit
e707481dcf
@ -194,11 +194,11 @@ window.wp = window.wp || {};
|
|||||||
else if ( ! response.success )
|
else if ( ! response.success )
|
||||||
return error( response.data.message, response.data, file );
|
return error( response.data.message, response.data, file );
|
||||||
|
|
||||||
_.each(['file','loaded','size','uploading','percent'], function( key ) {
|
_.each(['file','loaded','size','percent'], function( key ) {
|
||||||
file.attachment.unset( key );
|
file.attachment.unset( key );
|
||||||
});
|
});
|
||||||
|
|
||||||
file.attachment.set( response.data );
|
file.attachment.set( _.extend( response.data, { uploading: false }) );
|
||||||
wp.media.model.Attachment.get( response.data.id, file.attachment );
|
wp.media.model.Attachment.get( response.data.id, file.attachment );
|
||||||
|
|
||||||
complete = Uploader.queue.all( function( attachment ) {
|
complete = Uploader.queue.all( function( attachment ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user