Jun 26 - Fix AI Analysis History delete icon
This commit is contained in:
@@ -473,10 +473,9 @@ if (IS_ADMIN) {
|
||||
if (e.target.classList.contains('hist-cb')) _updateBulkBar();
|
||||
});
|
||||
|
||||
// Row delete icon — delegated
|
||||
document.addEventListener('click', function(e) {
|
||||
var btn = e.target.closest('.js-delete-row');
|
||||
if (!btn) return;
|
||||
// Row delete icon — direct listeners (delegated won't work: td stopPropagation swallows the event)
|
||||
document.querySelectorAll('.js-delete-row').forEach(function(btn) {
|
||||
btn.addEventListener('click', function(e) {
|
||||
e.stopPropagation();
|
||||
var id = btn.dataset.id;
|
||||
if (!confirm('Delete this analysis? This cannot be undone.')) return;
|
||||
@@ -487,6 +486,7 @@ if (IS_ADMIN) {
|
||||
_updateBulkBar();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function _updateBulkBar() {
|
||||
|
||||
Reference in New Issue
Block a user