mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-24 01:57:53 +01:00
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
This commit is contained in:
parent
2cdd7b7840
commit
588be949b1
@ -403,6 +403,7 @@
|
|||||||
|
|
||||||
// Track uploading attachments.
|
// Track uploading attachments.
|
||||||
wp.Uploader.queue.on( 'add remove reset change:percent', this.renderUploadProgress, this );
|
wp.Uploader.queue.on( 'add remove reset change:percent', this.renderUploadProgress, this );
|
||||||
|
wp.Uploader.queue.on( 'add', this.selectUpload, this );
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
@ -429,6 +430,10 @@
|
|||||||
}, this.options.uploader ) );
|
}, this.options.uploader ) );
|
||||||
},
|
},
|
||||||
|
|
||||||
|
selectUpload: function( attachment ) {
|
||||||
|
this.controller.selection.add( attachment );
|
||||||
|
},
|
||||||
|
|
||||||
renderUploadProgress: function() {
|
renderUploadProgress: function() {
|
||||||
var queue = wp.Uploader.queue;
|
var queue = wp.Uploader.queue;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user