Automatically add any uploading media files to the group of selected files.

This also automatically adds any files uploaded on the gallery screen to that gallery.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22040 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith 2012-09-27 05:28:37 +00:00
parent 513cacb398
commit c6b63ec34d

View File

@ -403,6 +403,7 @@
// Track uploading attachments.
wp.Uploader.queue.on( 'add remove reset change:percent', this.renderUploadProgress, this );
wp.Uploader.queue.on( 'add', this.selectUpload, this );
},
render: function() {
@ -429,6 +430,10 @@
}, this.options.uploader ) );
},
selectUpload: function( attachment ) {
this.controller.selection.add( attachment );
},
renderUploadProgress: function() {
var queue = wp.Uploader.queue;