Ticket #24355: 24355.diff
File 24355.diff, 948 bytes (added by , 12 years ago) |
---|
-
wp-includes/js/media-views.js
2428 2428 var requires = button.options.requires, 2429 2429 disabled = false; 2430 2430 2431 // Prevent insertion of attachments if any of them are still uploading2432 2431 disabled = _.some( selection.models, function( attachment ) { 2433 return attachment.get('uploading') === true; 2432 2433 // Prevent insertion of attachments if any of them are still uploading. 2434 if ( attachment.get('uploading') === true ) 2435 return true; 2436 2437 // Prevent insertion of file types that do not match the library's current filter. 2438 if ( library.props.get('type') && attachment.get('type') !== library.props.get('type') ) 2439 return true; 2440 2441 return false; 2434 2442 }); 2435 2443 2436 2444 if ( requires.selection && selection && ! selection.length )