Leere Dolibarr-Confirm-Box entfernen (MutationObserver) [deploy]
All checks were successful
Deploy bericht / deploy (push) Successful in 1s
All checks were successful
Deploy bericht / deploy (push) Successful in 1s
This commit is contained in:
parent
bf368122aa
commit
d5b89747be
1 changed files with 12 additions and 1 deletions
13
js/editor.js
13
js/editor.js
|
|
@ -1353,5 +1353,16 @@
|
||||||
}
|
}
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', init);
|
// Dolibarr injiziert eine globale leere jQuery-UI-Confirm-Box (#confirm-dialog-box
|
||||||
|
// und #confirm-dialog-box-<btnid>) — die hat bei uns nie Inhalt weil wir eigene
|
||||||
|
// Modals nutzen. Kille sie beim Laden und beobachte weitere Einfügungen.
|
||||||
|
function killDolibarrConfirmBoxes() {
|
||||||
|
document.querySelectorAll('[id^="confirm-dialog-box"]').forEach(el => {
|
||||||
|
const wrap = el.closest('.ui-dialog') || el;
|
||||||
|
wrap.remove();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
new MutationObserver(killDolibarrConfirmBoxes)
|
||||||
|
.observe(document.documentElement, { childList: true, subtree: true });
|
||||||
|
document.addEventListener('DOMContentLoaded', () => { killDolibarrConfirmBoxes(); init(); });
|
||||||
})();
|
})();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue