From c0271b73603f19d98d1f7550113957189d53bf2f Mon Sep 17 00:00:00 2001 From: Gemini Agent Date: Fri, 5 Dec 2025 18:42:26 +0000 Subject: [PATCH] Feat: Added favicon and searchable dropdowns (Tom Select) to pack list manager --- src/header.php | 1 + src/manage_packing_list_items.php | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/header.php b/src/header.php index 2e92098..926474f 100644 --- a/src/header.php +++ b/src/header.php @@ -42,6 +42,7 @@ if (isset($_SESSION['user_id'])) { +
diff --git a/src/manage_packing_list_items.php b/src/manage_packing_list_items.php index ae9c1f1..819ac34 100644 --- a/src/manage_packing_list_items.php +++ b/src/manage_packing_list_items.php @@ -102,6 +102,9 @@ sort($manufacturers); $conn->close(); ?> + + +
@@ -217,6 +220,17 @@ $conn->close(); let childrenModal = null; document.addEventListener('DOMContentLoaded', () => { + // Initialize Tom Select for filters + const tsOptions = { + create: false, + sortField: { field: "text", direction: "asc" }, + onChange: function(value) { + this.input.dispatchEvent(new Event('change')); + } + }; + new TomSelect('#filter-category', tsOptions); + new TomSelect('#filter-manufacturer', tsOptions); + // Tooltip Logic const tooltip = document.getElementById('image-preview-tooltip'); if (tooltip) {