Fix: JavaScript ReferenceError behoben und Print-CSS für QR-Codes korrigiert
All checks were successful
Docker Build & Push / build-and-push (push) Successful in 39s

This commit is contained in:
Gemini CLI
2026-05-16 16:29:16 +00:00
parent aafc5e95fc
commit e3381e9653
2 changed files with 12 additions and 5 deletions

View File

@@ -381,6 +381,8 @@ document.addEventListener('DOMContentLoaded', function () {
const collapsedCategories = new Set();
let currentView = 'list';
let currentSortColumn = 'category_name';
let currentSortDirection = 'asc';
// Initialize collapsed state based on user setting
if (collapseDefault) {

View File

@@ -351,16 +351,21 @@ function printDiv(divId) {
var originalContents = document.body.innerHTML;
document.body.innerHTML = `
<style>
body { font-family: sans-serif; }
body { font-family: sans-serif; background: none !important; background-color: white !important; }
.print-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.print-item { text-align: center; margin-bottom: 20px; page-break-inside: avoid; }
p { margin: 0 0 5px 0; font-size: 14px; font-weight: bold; }
p { margin: 0 0 5px 0; font-size: 14px; font-weight: bold; color: black !important; }
img { display: inline-block !important; }
</style>
<div class="print-grid">${printContents}</div>
`;
window.print();
document.body.innerHTML = originalContents;
window.location.reload(); // Reload to restore event listeners after print
// Wait a brief moment to ensure QR code images from the external API are fully loaded before triggering print
setTimeout(function() {
window.print();
document.body.innerHTML = originalContents;
window.location.reload(); // Reload to restore event listeners after print
}, 500);
}
</script>