Auto-commit local changes before build (2026-01-01 17:42:47)
This commit is contained in:
parent
dc7cc5e02b
commit
5a3beaae96
@ -1 +1 @@
|
||||
v20260101-11-run-checks-select-all-indeterminate-clear-selection
|
||||
v20260101-12-run-checks-select-all-indeterminate-clear-selection-fix
|
||||
|
||||
@ -279,38 +279,6 @@
|
||||
var btnMark = document.getElementById('btn_mark_reviewed');
|
||||
var btnUnmark = document.getElementById('btn_unmark_reviewed');
|
||||
var statusEl = document.getElementById('rc_status');
|
||||
// Header checkbox behavior:
|
||||
// - When indeterminate (partial selection), clicking/pressing Space clears all selections.
|
||||
// - Otherwise behaves as a normal "select all / select none".
|
||||
function clearAllSelections() {
|
||||
var cbs = table.querySelectorAll('tbody .rc_row_cb');
|
||||
cbs.forEach(function (cb) { cb.checked = false; });
|
||||
if (selectAll) {
|
||||
selectAll.indeterminate = false;
|
||||
selectAll.checked = false;
|
||||
}
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
if (selectAll) {
|
||||
selectAll.addEventListener('click', function (e) {
|
||||
if (selectAll.indeterminate) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
clearAllSelections();
|
||||
}
|
||||
});
|
||||
|
||||
selectAll.addEventListener('keydown', function (e) {
|
||||
// Space toggles checkbox via keyboard
|
||||
if ((e.key === ' ' || e.key === 'Spacebar' || e.code === 'Space') && selectAll.indeterminate) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
clearAllSelections();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var currentJobId = null;
|
||||
var currentRunId = null;
|
||||
@ -413,13 +381,50 @@ function statusClass(status) {
|
||||
}
|
||||
|
||||
if (selectAll) {
|
||||
function clearAllSelection() {
|
||||
var cbs = table.querySelectorAll('tbody .rc_row_cb');
|
||||
cbs.forEach(function (cb) { cb.checked = false; });
|
||||
// Ensure header checkbox is reset as well.
|
||||
selectAll.indeterminate = false;
|
||||
selectAll.checked = false;
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
// When the header checkbox is indeterminate (partial selection), users expect a click
|
||||
// to clear the selection, not to select everything.
|
||||
var selectAllWasIndeterminate = false;
|
||||
|
||||
selectAll.addEventListener('mousedown', function () {
|
||||
selectAllWasIndeterminate = !!selectAll.indeterminate;
|
||||
}, true);
|
||||
|
||||
selectAll.addEventListener('click', function (e) {
|
||||
if (selectAllWasIndeterminate) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
clearAllSelection();
|
||||
selectAllWasIndeterminate = false;
|
||||
}
|
||||
}, true);
|
||||
|
||||
selectAll.addEventListener('keydown', function (e) {
|
||||
// Space toggles checkboxes. If indeterminate, treat Space as "clear selection".
|
||||
if ((e.key === ' ' || e.code === 'Space') && selectAll.indeterminate) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
clearAllSelection();
|
||||
}
|
||||
}, true);
|
||||
|
||||
selectAll.addEventListener('change', function () {
|
||||
// Safety net: in case the checkbox becomes checked while it was indeterminate,
|
||||
// treat it as "clear all" (expected UX).
|
||||
if (selectAll.indeterminate && selectAll.checked) {
|
||||
clearAllSelections();
|
||||
// Safety net: if any browser still fires change after an indeterminate click,
|
||||
// force the expected "clear" behavior.
|
||||
if (selectAllWasIndeterminate) {
|
||||
clearAllSelection();
|
||||
selectAllWasIndeterminate = false;
|
||||
return;
|
||||
}
|
||||
|
||||
var cbs = table.querySelectorAll('tbody .rc_row_cb');
|
||||
cbs.forEach(function (cb) { cb.checked = selectAll.checked; });
|
||||
updateButtons();
|
||||
|
||||
@ -184,6 +184,14 @@
|
||||
- Prevented unintended full selection when toggling from an indeterminate state.
|
||||
- Ensured consistent behavior between mouse click and keyboard (Space) interaction on the header checkbox.
|
||||
|
||||
---
|
||||
|
||||
## v20260101-12-run-checks-select-all-indeterminate-clear-selection-fix
|
||||
|
||||
- Fixed the Run Checks header “select all” checkbox: when it is indeterminate (partial selection), clicking it now clears the current selection instead of selecting all rows.
|
||||
- Implemented click interception before the browser toggles the checkbox state to prevent unintended full selection from the indeterminate state.
|
||||
- Added consistent keyboard behavior: pressing Space on the indeterminate header checkbox now also clears the selection.
|
||||
|
||||
================================================================================================================================================
|
||||
## v0.1.14
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user