forked from Ruderverein-Donau-Linz/rowt
		
	[TASK] add sort element user management
This commit is contained in:
		| @@ -23,6 +23,7 @@ document.addEventListener("DOMContentLoaded", function () { | ||||
|   addRelationMagic(<HTMLElement>document.querySelector("body")); | ||||
|   reloadPage(); | ||||
|   setCurrentdate(<HTMLInputElement>document.querySelector("#departure")); | ||||
|   initDropdown(); | ||||
| }); | ||||
|  | ||||
| function changeTheme() { | ||||
| @@ -795,3 +796,21 @@ function replaceStrings() { | ||||
|     weekday.innerHTML = weekday.innerHTML.replace("Freitag", "Markttag"); | ||||
|   }); | ||||
| } | ||||
|  | ||||
| function initDropdown() { | ||||
|   const popoverTriggerList = document.querySelectorAll('[data-dropdown]');     | ||||
|  | ||||
|   popoverTriggerList.forEach((popoverTriggerEl: Element) => { | ||||
|     const id = popoverTriggerEl.getAttribute('data-dropdown'); | ||||
|      | ||||
|     if (id) { | ||||
|       const element = document.getElementById(id); | ||||
|       if (element) { | ||||
|         // Toggle visibility of the dropdown when clicked | ||||
|         popoverTriggerEl.addEventListener('click', () => { | ||||
|           element.classList.toggle('hidden'); | ||||
|         }); | ||||
|       } | ||||
|     } | ||||
|   }); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Marie Birner
					Marie Birner