diff --git a/app/templates/base.html b/app/templates/base.html index d35052c..9d24adb 100755 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -243,7 +243,7 @@
- + diff --git a/app/templates/consumables/index.html b/app/templates/consumables/index.html index d68a2a9..afa3b48 100755 --- a/app/templates/consumables/index.html +++ b/app/templates/consumables/index.html @@ -100,10 +100,10 @@
- + -
diff --git a/app/templates/shared/list_base.html b/app/templates/shared/list_base.html index c89a7b4..b94ce91 100755 --- a/app/templates/shared/list_base.html +++ b/app/templates/shared/list_base.html @@ -9,13 +9,20 @@
-
+
- +
@@ -78,14 +85,34 @@

// Basis-Suchfunktion document.addEventListener('DOMContentLoaded', function() { const searchInput = document.getElementById('searchInput'); + const clearSearch = document.getElementById('clearSearch'); + if (searchInput) { searchInput.addEventListener('input', function(e) { const searchTerm = e.target.value.toLowerCase(); + + // Clear-Button anzeigen/ausblenden + if (clearSearch) { + if (searchTerm.length > 0) { + clearSearch.classList.remove('hidden'); + } else { + clearSearch.classList.add('hidden'); + } + } + document.querySelectorAll('.data-row').forEach(row => { const searchableContent = row.textContent.toLowerCase(); row.style.display = searchableContent.includes(searchTerm) ? '' : 'none'; }); }); + + if (clearSearch) { + clearSearch.addEventListener('click', function() { + searchInput.value = ''; + searchInput.focus(); + searchInput.dispatchEvent(new Event('input')); + }); + } } // Sortier-Funktionalität diff --git a/app/templates/tools/index.html b/app/templates/tools/index.html index 67b46f1..3a78220 100755 --- a/app/templates/tools/index.html +++ b/app/templates/tools/index.html @@ -158,10 +158,10 @@
{% if tool.barcode %} - + - {% else %} diff --git a/app/templates/workers/index.html b/app/templates/workers/index.html index 3823603..de9995f 100755 --- a/app/templates/workers/index.html +++ b/app/templates/workers/index.html @@ -93,10 +93,10 @@
- + -