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: http://core.svn.wordpress.org/trunk@22709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Daryl Koopersmith 2012-11-20 11:52:08 +00:00
parent 31c525b289
commit fd78be75d9
1 changed files with 2 additions and 2 deletions

View File

@ -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 ) {