mirror of
				https://github.com/Theodor-Springmann-Stiftung/musenalm.git
				synced 2025-10-30 01:35:32 +00:00 
			
		
		
		
	hot reload, search refactor begin
This commit is contained in:
		
							
								
								
									
										17
									
								
								views/routes/suche/components/_fieldscript.gohtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								views/routes/suche/components/_fieldscript.gohtml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | ||||
| <script type="module"> | ||||
| 	let fieldset = document.querySelector("fieldset.selectgroup"); | ||||
| 	let checkboxes = Array.from(fieldset.querySelectorAll('input[type="checkbox"]')); | ||||
| 	fieldset.addEventListener("change", (event) => { | ||||
| 		let target = event.target; | ||||
| 		if (target.type === "checkbox") { | ||||
| 			let name = target.name; | ||||
| 			let checked = target.checked; | ||||
| 			if (!checked) { | ||||
| 				let allchecked = checkboxes.filter((checkbox) => checkbox.checked); | ||||
| 				if (allchecked.length === 0) { | ||||
| 					target.checked = true; | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 	}); | ||||
| </script> | ||||
		Reference in New Issue
	
	Block a user
	 Simon Martens
					Simon Martens