From 58fd05e996e441018f90f0fb9ba54a0da9bd21b7 Mon Sep 17 00:00:00 2001 From: Gemini Date: Fri, 15 May 2026 15:36:04 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20JS-Confirms=20durch=20Modals=20ersetzt,?= =?UTF-8?q?=20Massenbearbeitung=20gefixt=20und=20QR=20zu=20Barcode=20ge?= =?UTF-8?q?=C3=A4ndert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/articles.php | 8 +++++++- src/manage_packing_list_items.php | 32 ++++++++++++++++++++++++++---- src/storage_locations.php | 33 +++++++++++++++++++++++++------ 3 files changed, 62 insertions(+), 11 deletions(-) diff --git a/src/articles.php b/src/articles.php index 69b530c..98e2cb0 100644 --- a/src/articles.php +++ b/src/articles.php @@ -656,7 +656,6 @@ document.addEventListener('DOMContentLoaded', function () { updateBulkUI(); } - const bulkSelectedArticles = new Set(); function updateBulkUI() { const count = bulkSelectedArticles.size; document.getElementById('bulk-selected-count').textContent = count; @@ -690,4 +689,11 @@ document.addEventListener('DOMContentLoaded', function () { }); +rTable(); + }); + + renderTable(); +}); + + \ No newline at end of file diff --git a/src/manage_packing_list_items.php b/src/manage_packing_list_items.php index e9f0e54..a43aacf 100644 --- a/src/manage_packing_list_items.php +++ b/src/manage_packing_list_items.php @@ -282,8 +282,9 @@ $conn->close();
Auf dem Tisch
-
- + + +
@@ -1019,10 +1020,15 @@ $conn->close(); if (button.classList.contains('remove-item-btn')) { const isTable = (itemEl.closest('#table-container') !== null); if (isTable) { - if (confirm('Diesen Artikel wirklich aus der Liste entfernen?')) { + if (!window.deleteItemModalInstance) { + window.deleteItemModalInstance = new bootstrap.Modal(document.getElementById('deleteItemModal')); + } + document.getElementById('btn-delete-confirm').onclick = () => { itemEl.remove(); syncListState(); - } + window.deleteItemModalInstance.hide(); + }; + window.deleteItemModalInstance.show(); } else { itemToRemoveId = itemId; itemToRemoveEl = itemEl; @@ -1090,4 +1096,22 @@ $conn->close(); } + + \ No newline at end of file diff --git a/src/storage_locations.php b/src/storage_locations.php index 5881802..34a7563 100644 --- a/src/storage_locations.php +++ b/src/storage_locations.php @@ -279,13 +279,34 @@ document.addEventListener('DOMContentLoaded', function() { }); } }); + +function showBarcode(token, name) { + const baseUrl = window.location.origin + window.location.pathname.replace('storage_locations.php', 'public_location.php?token='); + const url = baseUrl + token; + document.getElementById('barcodeLocationName').textContent = name; + document.getElementById('barcodeImage').src = 'https://bwipjs-api.metafloor.com/?bcid=code128&text=' + encodeURIComponent(url) + '&scale=2&includetext=false'; + document.getElementById('barcodeLink').href = url; + new bootstrap.Modal(document.getElementById('barcodeModal')).show(); +} - -ationName; - }); - } -}); - +