Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@
## 2026-02-15 - [Semantic Form Labels]
**Learning:** Even with clear visual labels, missing `for` attributes on `<label>` elements prevents proper association with inputs for assistive technologies.
**Action:** Explicitly link labels and inputs using `for` and `id` attributes in all form components.

## 2026-02-21 - [Surgical Fixes for Mixed Line Endings]
**Learning:** In repositories with mixed line endings (CRLF/LF), using global reformatting tools like `dos2unix` creates large, noisy diffs that violate "micro-UX" constraints. Targeted `sed` commands or precise search blocks are preferred for minimal, safer changes.
**Action:** Use `sed` for single-line tag fixes and keep `replace_with_git_merge_diff` blocks as small as possible.
2 changes: 1 addition & 1 deletion app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
<!-- Scanner Animation -->
<div class="absolute w-full h-0.5 bg-primary/50 -top-1 left-0 animate-scanner after:content-[''] after:absolute after:top-0 after:left-0 after:w-full after:h-full after:bg-primary/30"></div>
</div>
</button>
</div>

<!-- Trennlinie -->
<div class="sidebar-divider"></div>
Expand Down
35 changes: 30 additions & 5 deletions app/templates/shared/list_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@
<div class="flex flex-col md:flex-row gap-4 items-center">
<div class="form-control flex-1">
<label for="searchInput" class="sr-only">Suchen</label>
<div class="input-group">
<div class="join w-full relative">
<input type="text"
placeholder="Suchen..."
class="input input-bordered w-full"
class="input input-bordered join-item w-full pr-10"
id="searchInput"
aria-label="Suchen">
<button type="button" class="btn btn-square" aria-label="Suche ausführen">
<button id="clearSearch" type="button" class="absolute right-14 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 hidden z-[10]" aria-label="Suche löschen">
<i class="fas fa-times-circle"></i>
</button>
<button type="button" class="btn btn-square join-item" aria-label="Suche ausführen">
<i class="fas fa-search"></i>
</button>
</div>
Expand Down Expand Up @@ -78,14 +81,24 @@ <h3 class="card-title text-lg">
// Basis-Suchfunktion
document.addEventListener('DOMContentLoaded', function() {
const searchInput = document.getElementById('searchInput');
const clearSearch = document.getElementById('clearSearch');
if (searchInput) {
searchInput.addEventListener('input', function(e) {
if (clearSearch) clearSearch.classList.toggle('hidden', !e.target.value);
const searchTerm = e.target.value.toLowerCase();
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.dispatchEvent(new Event('input'));
searchInput.focus();
});
}
}

// Sortier-Funktionalität
Expand All @@ -95,7 +108,10 @@ <h3 class="card-title text-lg">
document.querySelectorAll('th').forEach(th => {
if (!th.classList.contains('no-sort')) {
const wrapper = document.createElement('div');
wrapper.className = 'flex items-center gap-2 cursor-pointer select-none';
wrapper.className = 'flex items-center gap-2 cursor-pointer select-none focus:outline-none focus:ring-2 focus:ring-primary/50 rounded px-1 -mx-1';
wrapper.setAttribute('role', 'button');
wrapper.setAttribute('tabindex', '0');
wrapper.setAttribute('aria-label', `Sortieren nach ${th.textContent.trim()}`);
wrapper.innerHTML = `
${th.innerHTML}
<span class="sort-icons opacity-50">
Expand All @@ -105,9 +121,18 @@ <h3 class="card-title text-lg">
th.innerHTML = '';
th.appendChild(wrapper);

wrapper.addEventListener('click', () => {
const performSort = () => {
const column = Array.from(th.parentElement.children).indexOf(th);
sortTable(column, th);
th.parentElement.querySelectorAll('th').forEach(h => h.removeAttribute('aria-sort'));
th.setAttribute('aria-sort', currentSort.direction === 'asc' ? 'ascending' : 'descending');
};
wrapper.addEventListener('click', performSort);
wrapper.addEventListener('keydown', (e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
performSort();
}
});
}
});
Expand Down