Fix: JS-Confirms durch Modals ersetzt, Massenbearbeitung gefixt und QR zu Barcode geändert
All checks were successful
Docker Build & Push / build-and-push (push) Successful in 36s
All checks were successful
Docker Build & Push / build-and-push (push) Successful in 36s
This commit is contained in:
@@ -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 () {
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php require_once 'footer.php'; ?>rTable();
|
||||
});
|
||||
|
||||
renderTable();
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php require_once 'footer.php'; ?>
|
||||
@@ -282,8 +282,9 @@ $conn->close();
|
||||
<div class="card h-100 border-info d-flex flex-column shadow-sm">
|
||||
<div class="card-header bg-info text-white flex-shrink-0 d-flex justify-content-between align-items-center py-2">
|
||||
<h5 class="mb-0"><i class="fas fa-table me-2"></i>Auf dem Tisch</h5>
|
||||
<form method="post" onsubmit="return confirm('Möchtest du wirklich alle Artikel, die auf dem Tisch liegen, wieder ins Lager räumen?');" style="margin:0;">
|
||||
<button type="submit" name="empty_table" class="btn btn-sm btn-outline-light" title="Tisch leeren"><i class="fas fa-broom"></i></button>
|
||||
<form method="post" id="emptyTableForm" style="margin:0;">
|
||||
<input type="hidden" name="empty_table" value="1">
|
||||
<button type="button" class="btn btn-sm btn-outline-light" title="Tisch leeren" data-bs-toggle="modal" data-bs-target="#emptyTableModal"><i class="fas fa-broom"></i></button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="card-body pane-content table-nested-sortable flex-grow-1" id="table-container" data-carrier-id="null" style="overflow-y: auto;">
|
||||
@@ -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();
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="emptyTableModal" tabindex="-1" aria-labelledby="emptyTableModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="emptyTableModalLabel"><i class="fas fa-broom me-2"></i>Tisch leeren</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Möchtest du wirklich alle Artikel, die auf dem Tisch liegen, wieder ins Lager räumen?
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Abbrechen</button>
|
||||
<button type="button" class="btn btn-primary" onclick="document.getElementById('emptyTableForm').submit();">Ja, Tisch leeren</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php require_once 'footer.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();
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php require_once 'footer.php'; ?>
|
||||
ationName;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="barcodeModal" tabindex="-1" aria-labelledby="barcodeModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="barcodeModalLabel"><i class="fas fa-barcode me-2"></i>Lagerort Barcode</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body text-center">
|
||||
<p class="fw-bold" id="barcodeLocationName"></p>
|
||||
<p class="small text-muted mb-4">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.</p>
|
||||
<img id="barcodeImage" src="" alt="Barcode" class="img-fluid border p-2 bg-white mb-3" style="max-width: 100%;">
|
||||
<div class="mt-2">
|
||||
<a id="barcodeLink" href="" target="_blank" class="btn btn-outline-primary btn-sm"><i class="fas fa-external-link-alt me-2"></i>Link manuell testen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php require_once 'footer.php'; ?>
|
||||
|
||||
Reference in New Issue
Block a user