modal w panelu admina
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// preview-modal.js
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
// Obsługa przycisków podglądu produktów
|
||||
const modalElement = document.getElementById("productPreviewModal");
|
||||
const modal = new bootstrap.Modal(modalElement);
|
||||
|
||||
document.querySelectorAll(".preview-btn").forEach((btn) => {
|
||||
btn.addEventListener("click", async () => {
|
||||
const listId = btn.dataset.listId;
|
||||
@@ -10,7 +11,6 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
modalTitle.textContent = "Ładowanie...";
|
||||
productList.innerHTML = '<li class="list-group-item bg-dark text-white">⏳ Ładowanie produktów...</li>';
|
||||
|
||||
const modal = new bootstrap.Modal(document.getElementById("productPreviewModal"));
|
||||
modal.show();
|
||||
|
||||
try {
|
||||
|
Reference in New Issue
Block a user