Too many changes :(

This commit is contained in:
Ross
2025-07-29 09:20:58 +01:00
parent ad4be1e9a6
commit 4460545442
20 changed files with 361 additions and 81 deletions
+35 -1
View File
@@ -176,6 +176,37 @@ $(document).ready(function () {
});
// Table row selection
// Delegate click event to all table rows
document.querySelectorAll('.row-selector tbody tr').forEach(function(row) {
row.addEventListener('click', function(e) {
// Ignore clicks on links or checkboxes
if (e.target.tagName === 'A' || e.target.tagName === 'INPUT') return;
// Find the checkbox in this row
const checkbox = row.querySelector('input[name="selection"]');
if (checkbox) {
checkbox.checked = !checkbox.checked;
row.classList.toggle('selected', checkbox.checked);
}
});
// Keep row visually in sync with checkbox state (e.g. after page reload)
const checkbox = row.querySelector('input[name="selection"]');
if (checkbox && checkbox.checked) {
row.classList.add('selected');
}
// Also toggle row selection when checkbox is clicked directly
if (checkbox) {
checkbox.addEventListener('click', function(e) {
row.classList.toggle('selected', checkbox.checked);
// Prevent row click event from firing
e.stopPropagation();
});
}
});
});
window.loadDicomViewerEvent = new Event('loadDicomViewer');
@@ -482,6 +513,8 @@ async function setUpDicom(element) {
}
window.setUpDicom = setUpDicom;
//function keyUpHandler(e) {
// if (e.key == "Control") {
// dicomViewer.registerPrimaryDicomInterface(e);
@@ -681,4 +714,5 @@ function initializeClock(id, endtime) {
updateClock();
}
window.initializeClock = initializeClock
window.initializeClock = initializeClock