Skip to content

Commit

Permalink
Quick/Bulk Edit: Ensure the “All” checkbox is properly toggled in cer…
Browse files Browse the repository at this point in the history
…tain scenarios.

When removing a single item from the bulk edit box or when adding more items, the “All” checkboxes at the top and bottom of the posts list table should be properly toggled.

Props hiteshtalpada, oglekler, webcommsat, ugyensupport, chaion07, Toru.
Fixes #59121.

git-svn-id: https://develop.svn.wordpress.org/trunk@57745 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
swissspidy committed Feb 29, 2024
1 parent 0fb376b commit 186eeaf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/_enqueues/admin/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ $( function() {
lastClicked = this;

// Toggle the "Select all" checkboxes depending if the other ones are all checked or not.
var unchecked = $(this).closest('tbody').find(':checkbox').filter(':visible:enabled').not(':checked');
var unchecked = $(this).closest('tbody').find('tr.iedit').find(':checkbox').filter(':visible:enabled').not(':checked');

/**
* Determines if all checkboxes are checked.
Expand Down
1 change: 1 addition & 0 deletions src/js/_enqueues/admin/inline-edit-post.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ window.wp = window.wp || {};
$prev = $this.parent().prev().children( '.ntdelbutton' ),
$next = $this.parent().next().children( '.ntdelbutton' );

$( 'input#cb-select-all-1, input#cb-select-all-2' ).prop( 'checked', false );
$( 'table.widefat input[value="' + id + '"]' ).prop( 'checked', false );
$( '#_' + id ).parent().remove();
wp.a11y.speak( wp.i18n.__( 'Item removed.' ), 'assertive' );
Expand Down

0 comments on commit 186eeaf

Please sign in to comment.