From e3381e9653ff3e4ceaf88ffcb8ce56eda103ecd5 Mon Sep 17 00:00:00 2001 From: Gemini CLI Date: Sat, 16 May 2026 16:29:16 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20JavaScript=20ReferenceError=20behoben=20?= =?UTF-8?q?und=20Print-CSS=20f=C3=BCr=20QR-Codes=20korrigiert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/articles.php | 2 ++ src/storage_locations.php | 15 ++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/articles.php b/src/articles.php index f5d0fd1..a6ceb5c 100644 --- a/src/articles.php +++ b/src/articles.php @@ -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) { diff --git a/src/storage_locations.php b/src/storage_locations.php index 406746b..9ccfe49 100644 --- a/src/storage_locations.php +++ b/src/storage_locations.php @@ -351,16 +351,21 @@ function printDiv(divId) { var originalContents = document.body.innerHTML; document.body.innerHTML = ` `; - 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); }