mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
bind overall tooltip only on the combobox and not on the whole popup.
The tree can now show its own tooltips without interference
This commit is contained in:
parent
55c6b122d2
commit
986e83750c
@ -85,6 +85,17 @@ export class Et2SelectCategory extends Et2StaticSelectMixin(Et2TreeDropdown)
|
||||
});
|
||||
}
|
||||
|
||||
bindTooltip()
|
||||
{
|
||||
//overide so tooltip wont be bound
|
||||
this.updateComplete.then(() => {
|
||||
const box = this.shadowRoot?.querySelector('.tree-dropdown__combobox');
|
||||
if(box){
|
||||
this.egw().tooltipBind(box, this.egw().lang(this.statustext))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
willUpdate(changedProperties : PropertyValues)
|
||||
{
|
||||
super.willUpdate(changedProperties);
|
||||
|
@ -891,7 +891,7 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement) implements Fin
|
||||
part="item"
|
||||
exportparts="checkbox, label, item:item-item"
|
||||
id=${value}
|
||||
title=${selectOption.tooltip || nothing}
|
||||
title=${selectOption.tooltip ||selectOption.title || nothing}
|
||||
class=${selectOption.class || nothing}
|
||||
?selected=${typeof this.value == "string" && this.value == value || Array.isArray(this.value) && this.value.includes(value)}
|
||||
?expanded=${expandState}
|
||||
|
@ -313,13 +313,17 @@ const Et2WidgetMixin = <T extends Constructor>(superClass : T) =>
|
||||
super.connectedCallback();
|
||||
|
||||
this.addEventListener("click", this._handleClick);
|
||||
|
||||
if (this.statustext && !egwIsMobile())
|
||||
{
|
||||
this.egw().tooltipBind(this, this.egw().lang(this.statustext));
|
||||
this.bindTooltip();
|
||||
}
|
||||
}
|
||||
|
||||
bindTooltip()
|
||||
{
|
||||
this.egw().tooltipBind(this, this.egw().lang(this.statustext));
|
||||
}
|
||||
|
||||
disconnectedCallback()
|
||||
{
|
||||
this.egw()?.tooltipUnbind(this);
|
||||
@ -327,6 +331,7 @@ const Et2WidgetMixin = <T extends Constructor>(superClass : T) =>
|
||||
this.removeEventListener("click", this._handleClick);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* NOT the setter, since we cannot add to the DOM before connectedCallback()
|
||||
*
|
||||
@ -513,7 +518,7 @@ const Et2WidgetMixin = <T extends Constructor>(superClass : T) =>
|
||||
this.egw().tooltipUnbind(this);
|
||||
if(this.statustext)
|
||||
{
|
||||
this.egw().tooltipBind(this, this.statustext);
|
||||
this.bindTooltip()
|
||||
}
|
||||
}
|
||||
if(changedProperties.has("onclick"))
|
||||
|
Loading…
Reference in New Issue
Block a user