Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Do not run bulk edit when the user clicks on a filter, fixes #17733
git-svn-id: http://svn.automattic.com/wordpress/trunk@18222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
azaozz committed Jun 10, 2011
1 parent d831ae7 commit ec2778d
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 19 deletions.
16 changes: 9 additions & 7 deletions wp-admin/edit.php
Expand Up @@ -120,13 +120,15 @@
$sendback = add_query_arg('deleted', $deleted, $sendback);
break;
case 'edit':
$done = bulk_edit_posts($_REQUEST);

if ( is_array($done) ) {
$done['updated'] = count( $done['updated'] );
$done['skipped'] = count( $done['skipped'] );
$done['locked'] = count( $done['locked'] );
$sendback = add_query_arg( $done, $sendback );
if ( isset($_REQUEST['bulk_edit']) ) {
$done = bulk_edit_posts($_REQUEST);

if ( is_array($done) ) {
$done['updated'] = count( $done['updated'] );
$done['skipped'] = count( $done['skipped'] );
$done['locked'] = count( $done['locked'] );
$sendback = add_query_arg( $done, $sendback );
}
}
break;
}
Expand Down
9 changes: 7 additions & 2 deletions wp-admin/includes/class-wp-list-table.php
Expand Up @@ -288,8 +288,13 @@ function bulk_actions() {

echo "<select name='action$two'>\n";
echo "<option value='-1' selected='selected'>" . __( 'Bulk Actions' ) . "</option>\n";
foreach ( $this->_actions as $name => $title )
echo "\t<option value='$name'>$title</option>\n";

foreach ( $this->_actions as $name => $title ) {
$class = 'edit' == $name ? ' class="hide-if-no-js"' : '';

echo "\t<option value='$name'$class>$title</option>\n";
}

echo "</select>\n";

submit_button( __( 'Apply' ), 'button-secondary action', false, false, array( 'id' => "doaction$two" ) );
Expand Down
6 changes: 3 additions & 3 deletions wp-admin/js/inline-edit-post.dev.js
Expand Up @@ -74,9 +74,9 @@ inlineEditPost = {
}
});

$('#post-query-submit').click(function(e){
if ( $('form#posts-filter tr.inline-editor').length > 0 )
t.revert();
$('#post-query-submit').mousedown(function(e){
t.revert();
$('select[name^="action"]').val('-1');
});
},

Expand Down
2 changes: 1 addition & 1 deletion wp-admin/js/inline-edit-post.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions wp-admin/js/inline-edit-tax.dev.js
Expand Up @@ -20,9 +20,8 @@ inlineEditTax = {
$('a.save', row).click(function() { return inlineEditTax.save(this); });
$('input, select', row).keydown(function(e) { if(e.which == 13) return inlineEditTax.save(this); });

$('#posts-filter input[type="submit"]').click(function(e){
if ( $('form#posts-filter tr.inline-editor').length > 0 )
t.revert();
$('#posts-filter input[type="submit"]').mousedown(function(e){
t.revert();
});
},

Expand Down
2 changes: 1 addition & 1 deletion wp-admin/js/inline-edit-tax.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ec2778d

Please sign in to comment.