modal w panelu admina
This commit is contained in:
@@ -2,6 +2,12 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
const modalElement = document.getElementById("productPreviewModal");
|
||||
const modal = new bootstrap.Modal(modalElement);
|
||||
|
||||
modalElement.addEventListener('hidden.bs.modal', function () {
|
||||
document.querySelectorAll('.modal-backdrop').forEach(el => el.remove());
|
||||
document.body.classList.remove('modal-open');
|
||||
document.body.style.overflow = '';
|
||||
});
|
||||
|
||||
document.querySelectorAll(".preview-btn").forEach((btn) => {
|
||||
btn.addEventListener("click", async () => {
|
||||
const listId = btn.dataset.listId;
|
||||
@@ -71,4 +77,4 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user