Files
kitcheninv/assets/app.js
2025-08-31 12:52:17 +02:00

14 lines
396 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Kleine UX-Helferlein keine externen Abhängigkeiten nötig.
(function(){
// Confirm bei Ausbuchen-Buttons (nur mit .danger)
document.addEventListener('click', function(e){
const btn = e.target.closest('button.btn.danger');
if(!btn) return;
const form = btn.closest('form');
if(!form) return;
if(!confirm('Einheit wirklich ausbuchen?')){
e.preventDefault();
e.stopPropagation();
}
});
})();