In `media.view.BulkSelectionActionButton.click()`, do not assume that `delete` is the only possible bulk action.

Fixes #29101.


git-svn-id: https://develop.svn.wordpress.org/trunk@29403 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-08-06 17:23:49 +00:00
parent 99a0a62442
commit 1d1d95f4d5
1 changed files with 6 additions and 4 deletions

View File

@ -647,10 +647,12 @@
var selection = this.controller.controller.state().get('selection');
media.view.Button.prototype.click.apply( this, arguments );
// Currently assumes delete is the only action
if ( confirm( l10n.warnBulkDelete ) ) {
while ( selection.length > 0) {
selection.at(0).destroy();
if ( 'delete' === this.controller.model.get( 'currentAction' ) ) {
// Currently assumes delete is the only action
if ( confirm( l10n.warnBulkDelete ) ) {
while ( selection.length > 0 ) {
selection.at(0).destroy();
}
}
}