@@ -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();
}
+
+
+
+
+
+ Möchtest du wirklich alle Artikel, die auf dem Tisch liegen, wieder ins Lager räumen?
+
+
+
+
+
+
\ 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;
- });
- }
-});
-
+
+
+
+
+
+
+
Hinweis: Einen Standard-Barcode (1D) mit einer URL können viele Smartphone-Kameras nicht nativ als Weblink öffnen (dafür sind QR-Codes gedacht). Für das Scannen wird in der Regel eine Barcode-Scanner-App benötigt.
+
![Barcode]()
+
+
+
+
+