Jun 26 - Fix AI Analysis History delete icon

This commit is contained in:
2026-06-26 14:07:31 -04:00
parent 5b94858f7f
commit 6da29529a3
+4 -4
View File
@@ -473,10 +473,9 @@ if (IS_ADMIN) {
if (e.target.classList.contains('hist-cb')) _updateBulkBar(); if (e.target.classList.contains('hist-cb')) _updateBulkBar();
}); });
// Row delete icon — delegated // Row delete icon — direct listeners (delegated won't work: td stopPropagation swallows the event)
document.addEventListener('click', function(e) { document.querySelectorAll('.js-delete-row').forEach(function(btn) {
var btn = e.target.closest('.js-delete-row'); btn.addEventListener('click', function(e) {
if (!btn) return;
e.stopPropagation(); e.stopPropagation();
var id = btn.dataset.id; var id = btn.dataset.id;
if (!confirm('Delete this analysis? This cannot be undone.')) return; if (!confirm('Delete this analysis? This cannot be undone.')) return;
@@ -487,6 +486,7 @@ if (IS_ADMIN) {
_updateBulkBar(); _updateBulkBar();
}); });
}); });
});
} }
function _updateBulkBar() { function _updateBulkBar() {