Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d0916e7b39 | |||
| a55df0be90 |
@@ -47,11 +47,23 @@
|
||||
const targetEventListId = filters.dataset.eventlistId || 'eventlist';
|
||||
const list = document.getElementById(targetEventListId);
|
||||
|
||||
if (!list) {
|
||||
console.warn(`[event_filter] Target event list #${targetEventListId} was not found.`);
|
||||
const applyDefaultGrid = (targetList) => {
|
||||
if (!targetList) {
|
||||
return;
|
||||
}
|
||||
|
||||
list?.classList.add('event-filter-target-list');
|
||||
targetList.classList.add('event-filter-target-list');
|
||||
targetList.classList.add('grid');
|
||||
};
|
||||
|
||||
if (!list) {
|
||||
console.warn(`[event_filter] Target event list #${targetEventListId} was not found.`);
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
applyDefaultGrid(document.getElementById(targetEventListId));
|
||||
}, { once: true });
|
||||
}
|
||||
|
||||
applyDefaultGrid(list);
|
||||
|
||||
const events = list ? Array.from(list.querySelectorAll(':scope > .event')) : [];
|
||||
const tagSelect = filters.querySelector('#tag-filter');
|
||||
|
||||
Reference in New Issue
Block a user