From 9d2a319821c3d76788910ab75b3903ce8e672c5f Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 17 Oct 2022 15:18:13 -0600 Subject: [PATCH] If widget has onclick attribute, add et2_clickable class --- api/js/etemplate/Et2Widget/Et2Widget.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/js/etemplate/Et2Widget/Et2Widget.ts b/api/js/etemplate/Et2Widget/Et2Widget.ts index 5fbe51337d..cf50068617 100644 --- a/api/js/etemplate/Et2Widget/Et2Widget.ts +++ b/api/js/etemplate/Et2Widget/Et2Widget.ts @@ -394,6 +394,10 @@ const Et2WidgetMixin = (superClass : T) => this.egw().tooltipBind(this, this.statustext); } } + if(changedProperties.has("onclick")) + { + this.classList.toggle("et2_clickable", this.onclick != null && typeof this.onclick != "undefined"); + } } /**