Too many changes :(
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user