Add filters to the dashboard catch list and filter by clicking top 10 rows
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8eeb7894a3
commit
9f07d41cb0
11 files changed
+771
-83
No files matched your search
@@ -108,3 +108,29 @@
|
||||
});
|
||||
}
|
||||
})();
|
||||
|
||||
(() => {
|
||||
const form = document.querySelector("form.filters");
|
||||
if (form) {
|
||||
form.addEventListener("submit", () => {
|
||||
for (const field of form.elements) {
|
||||
if (field.name && field.value === "") {
|
||||
field.disabled = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
for (const select of form.querySelectorAll("select[data-autosubmit]")) {
|
||||
select.addEventListener("change", () => form.requestSubmit());
|
||||
}
|
||||
}
|
||||
|
||||
for (const row of document.querySelectorAll("tr[data-href]")) {
|
||||
row.addEventListener("click", event => {
|
||||
if (event.target.closest("a") || !window.getSelection()?.isCollapsed) {
|
||||
return;
|
||||
}
|
||||
window.location.href = row.dataset.href;
|
||||
});
|
||||
}
|
||||
})();
|
||||
Reference in new issue
Block a user