Initial commit: Location Management Flask app

This commit is contained in:
ske087
2026-02-26 19:24:17 +02:00
commit 7a22575dab
52 changed files with 3481 additions and 0 deletions

22
app/static/js/app.js Normal file
View File

@@ -0,0 +1,22 @@
/**
* app.js Global Socket.IO connection & UI helpers
*/
document.addEventListener("DOMContentLoaded", function () {
// ── Bootstrap alert auto-dismiss after 4 s ──────────────────────────────
document.querySelectorAll(".alert").forEach(function (el) {
setTimeout(function () {
const bsAlert = bootstrap.Alert.getOrCreateInstance(el);
if (bsAlert) bsAlert.close();
}, 4000);
});
// ── Confirm-before-submit for data-confirm forms ─────────────────────────
document.querySelectorAll("form[data-confirm]").forEach(function (form) {
form.addEventListener("submit", function (e) {
if (!confirm(form.getAttribute("data-confirm"))) {
e.preventDefault();
}
});
});
});