From 588be949b14028758ee8ac9cba5a324c80618c2f Mon Sep 17 00:00:00 2001 From: Daryl Koopersmith Date: Thu, 27 Sep 2012 05:28:37 +0000 Subject: [PATCH] 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: http://core.svn.wordpress.org/trunk@22040 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/js/media-views.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wp-includes/js/media-views.js b/wp-includes/js/media-views.js index 4d30d594b6..aaac41e364 100644 --- a/wp-includes/js/media-views.js +++ b/wp-includes/js/media-views.js @@ -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;