0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-25 05:02:57 +01:00

Use bulk actions header's checkbox to detect bulk actions in listing styles

bulk-action-checkbox is the checkbox in the <td> elements. On page
listings, if you're searching and there are no results, the table will
still be displayed (to give you the option to search the whole site).
The table has no data rows, which means there are no elements with
bulk-action-checkbox class.

Change the selector to target the bulk-actions-filter-checkbox class
instead, which is the bulk action's <th> checkbox. This element (in the
header cell) is always available even when there are no results.
This commit is contained in:
Sage Abdullah 2024-01-15 12:41:50 +00:00 committed by Thibaud Colas
parent 50bdb724b5
commit bbd22d8c43

View File

@ -91,7 +91,7 @@ ul.listing {
}
}
&:has(.bulk-action-checkbox) {
&:has(.bulk-actions-filter-checkbox) {
td:first-child,
th:first-child {
// Bulk actions, use smaller width (48px) for smaller screens
@ -609,7 +609,7 @@ table.listing {
padding-inline-start: 50px;
}
&:has(.bulk-action-checkbox) {
&:has(.bulk-actions-filter-checkbox) {
// Bulk actions, match the width of the header spacing up until
// the page title (final breadcrumb item):
// Breadcrumbs left padding: 20px
@ -632,7 +632,7 @@ table.listing {
// If no bulk actions are present, and nice padding is not applied,
// apply the same 80px padding via the first column's left padding.
&:not(.nice-padding &, .report &):not(:has(.bulk-action-checkbox)) {
&:not(.nice-padding &, .report &):not(:has(.bulk-actions-filter-checkbox)) {
th:first-child,
td:first-child {
padding-inline-start: theme('spacing.20');