Auto-commit local changes before build (2026-01-01 17:23:31)
This commit is contained in:
parent
74836d57eb
commit
241d00ff99
@ -1 +1 @@
|
|||||||
v20260101-08-run-checks-shift-multiselect-persist
|
v20260101-09-run-checks-shift-multiselect-range-highlight-fix
|
||||||
|
|||||||
@ -351,8 +351,19 @@ function statusClass(status) {
|
|||||||
return ids.filter(function (x) { return Number.isFinite(x); });
|
return ids.filter(function (x) { return Number.isFinite(x); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function refreshRowHighlights() {
|
||||||
|
var cbs = table.querySelectorAll('tbody .rc_row_cb');
|
||||||
|
cbs.forEach(function (cb) {
|
||||||
|
var tr = cb.closest ? cb.closest('tr') : null;
|
||||||
|
if (!tr) return;
|
||||||
|
if (cb.checked) tr.classList.add('table-active');
|
||||||
|
else tr.classList.remove('table-active');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function updateButtons() {
|
function updateButtons() {
|
||||||
var ids = getSelectedJobIds();
|
var ids = getSelectedJobIds();
|
||||||
|
refreshRowHighlights();
|
||||||
if (btnMark) btnMark.disabled = ids.length === 0;
|
if (btnMark) btnMark.disabled = ids.length === 0;
|
||||||
if (btnUnmark) btnUnmark.disabled = ids.length === 0;
|
if (btnUnmark) btnUnmark.disabled = ids.length === 0;
|
||||||
if (statusEl) statusEl.textContent = ids.length ? (ids.length + ' selected') : '';
|
if (statusEl) statusEl.textContent = ids.length ? (ids.length + ' selected') : '';
|
||||||
@ -382,10 +393,11 @@ table.addEventListener('mousedown', function (e) {
|
|||||||
var t = e.target;
|
var t = e.target;
|
||||||
if (!t) return;
|
if (!t) return;
|
||||||
|
|
||||||
if (t.classList && t.classList.contains('rc_row_cb')) {
|
var cb = (t.classList && t.classList.contains('rc_row_cb')) ? t : (t.closest ? t.closest('.rc_row_cb') : null);
|
||||||
|
if (cb) {
|
||||||
// Remember state before click so Shift-click logic can reliably compute the intended target state
|
// Remember state before click so Shift-click logic can reliably compute the intended target state
|
||||||
lastMouseDownCb = t;
|
lastMouseDownCb = cb;
|
||||||
lastMouseDownChecked = t.checked;
|
lastMouseDownChecked = cb.checked;
|
||||||
|
|
||||||
if (e.shiftKey) {
|
if (e.shiftKey) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@ -399,7 +411,10 @@ table.addEventListener('mousedown', function (e) {
|
|||||||
// Handle Shift-click range selection on the checkbox inputs (delegated)
|
// Handle Shift-click range selection on the checkbox inputs (delegated)
|
||||||
table.addEventListener('click', function (e) {
|
table.addEventListener('click', function (e) {
|
||||||
var t = e.target;
|
var t = e.target;
|
||||||
if (!t || !(t.classList && t.classList.contains('rc_row_cb'))) return;
|
if (!t) return;
|
||||||
|
var cb = (t.classList && t.classList.contains('rc_row_cb')) ? t : (t.closest ? t.closest('.rc_row_cb') : null);
|
||||||
|
if (!cb) return;
|
||||||
|
t = cb;
|
||||||
|
|
||||||
// Custom handling so we can reliably read shiftKey and control the toggle + range
|
// Custom handling so we can reliably read shiftKey and control the toggle + range
|
||||||
if (e.shiftKey && lastCheckedCb && lastCheckedCb !== t) {
|
if (e.shiftKey && lastCheckedCb && lastCheckedCb !== t) {
|
||||||
@ -416,15 +431,19 @@ table.addEventListener('click', function (e) {
|
|||||||
lastMouseDownCb = null;
|
lastMouseDownCb = null;
|
||||||
lastMouseDownChecked = null;
|
lastMouseDownChecked = null;
|
||||||
|
|
||||||
var cbs = Array.prototype.slice.call(table.querySelectorAll('tbody .rc_row_cb'));
|
var rows = Array.prototype.slice.call(table.querySelectorAll('tbody tr'));
|
||||||
var start = cbs.indexOf(lastCheckedCb);
|
var startRow = lastCheckedCb.closest ? lastCheckedCb.closest('tr') : null;
|
||||||
var end = cbs.indexOf(t);
|
var endRow = t.closest ? t.closest('tr') : null;
|
||||||
|
|
||||||
|
var start = startRow ? rows.indexOf(startRow) : -1;
|
||||||
|
var end = endRow ? rows.indexOf(endRow) : -1;
|
||||||
|
|
||||||
if (start !== -1 && end !== -1) {
|
if (start !== -1 && end !== -1) {
|
||||||
var lo = Math.min(start, end);
|
var lo = Math.min(start, end);
|
||||||
var hi = Math.max(start, end);
|
var hi = Math.max(start, end);
|
||||||
for (var i = lo; i <= hi; i++) {
|
for (var i = lo; i <= hi; i++) {
|
||||||
cbs[i].checked = targetChecked;
|
var cb = rows[i].querySelector('.rc_row_cb');
|
||||||
|
if (cb) cb.checked = targetChecked;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -451,10 +470,12 @@ table.addEventListener('click', function (e) {
|
|||||||
|
|
||||||
// Fallback for keyboard toggles (space) and other state changes
|
// Fallback for keyboard toggles (space) and other state changes
|
||||||
table.addEventListener('change', function (e) {
|
table.addEventListener('change', function (e) {
|
||||||
if (e.target && e.target.classList && e.target.classList.contains('rc_row_cb')) {
|
var t = e.target;
|
||||||
lastCheckedCb = e.target;
|
if (!t) return;
|
||||||
updateButtons();
|
var cb = (t.classList && t.classList.contains('rc_row_cb')) ? t : (t.closest ? t.closest('.rc_row_cb') : null);
|
||||||
}
|
if (!cb) return;
|
||||||
|
lastCheckedCb = cb;
|
||||||
|
updateButtons();
|
||||||
});
|
});
|
||||||
|
|
||||||
function postJson(url, body) {
|
function postJson(url, body) {
|
||||||
|
|||||||
@ -158,6 +158,15 @@
|
|||||||
- Fixed Shift-click multi-select on the Run Checks page so the initial checkbox selection is preserved when selecting additional rows with Shift.
|
- Fixed Shift-click multi-select on the Run Checks page so the initial checkbox selection is preserved when selecting additional rows with Shift.
|
||||||
- Made Shift range selection use the checkbox pre-click state to prevent unintended double-toggles across browsers.
|
- Made Shift range selection use the checkbox pre-click state to prevent unintended double-toggles across browsers.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## v20260101-09-run-checks-shift-multiselect-range-highlight-fix
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Fixed shift-click multi-select behavior on the Run Checks page to include the clicked row in the selection range.
|
||||||
|
- Corrected an off-by-one issue where selection previously stopped one row above the clicked item.
|
||||||
|
- Added visual highlighting for all rows that are selected via checkmarks to clearly indicate active selection.
|
||||||
|
|
||||||
================================================================================================================================================
|
================================================================================================================================================
|
||||||
## v0.1.14
|
## v0.1.14
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user