mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 11:28:24 +00:00 
			
		
		
		
	Refactor "delete-button" to "link-action" (#34962)
This commit is contained in:
		| @@ -145,11 +145,12 @@ function onShowModalClick(el: HTMLElement, e: MouseEvent) { | ||||
|  | ||||
|     const attrTargetCombo = attrib.name.substring(modalAttrPrefix.length); | ||||
|     const [attrTargetName, attrTargetProp] = attrTargetCombo.split('.'); | ||||
|     // try to find target by: "#target" -> "[name=target]" -> ".target" -> "<target> tag" | ||||
|     // try to find target by: "#target" -> "[name=target]" -> ".target" -> "<target> tag", and then try the modal itself | ||||
|     const attrTarget = elModal.querySelector(`#${attrTargetName}`) || | ||||
|       elModal.querySelector(`[name=${attrTargetName}]`) || | ||||
|       elModal.querySelector(`.${attrTargetName}`) || | ||||
|       elModal.querySelector(`${attrTargetName}`); | ||||
|       elModal.querySelector(`${attrTargetName}`) || | ||||
|       (elModal.matches(`${attrTargetName}`) || elModal.matches(`#${attrTargetName}`) || elModal.matches(`.${attrTargetName}`) ? elModal : null); | ||||
|     if (!attrTarget) { | ||||
|       if (!window.config.runModeIsProd) throw new Error(`attr target "${attrTargetCombo}" not found for modal`); | ||||
|       continue; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user