aufraeumen
This commit is contained in:
+1
-3
@@ -3,13 +3,10 @@ function initSorter() {
|
|||||||
const form = document.getElementById('search-form-id');
|
const form = document.getElementById('search-form-id');
|
||||||
const sortRadios = document.querySelectorAll('.sort-radio');
|
const sortRadios = document.querySelectorAll('.sort-radio');
|
||||||
|
|
||||||
console.log("Sorter geladen. Formular gefunden:", !!form, "Radios gefunden:", sortRadios.length);
|
|
||||||
|
|
||||||
if (!form) return;
|
if (!form) return;
|
||||||
|
|
||||||
sortRadios.forEach(radio => {
|
sortRadios.forEach(radio => {
|
||||||
radio.addEventListener('change', function() {
|
radio.addEventListener('change', function() {
|
||||||
console.log("Sortierung geändert auf:", this.value);
|
|
||||||
|
|
||||||
const pageInput = document.getElementById('s-res-page-input');
|
const pageInput = document.getElementById('s-res-page-input');
|
||||||
if (pageInput) {
|
if (pageInput) {
|
||||||
@@ -21,6 +18,7 @@ function initSorter() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ist das DOM bereits vollständig aufgebaut?
|
||||||
if (document.readyState === 'loading') {
|
if (document.readyState === 'loading') {
|
||||||
document.addEventListener('DOMContentLoaded', initSorter);
|
document.addEventListener('DOMContentLoaded', initSorter);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user