mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +01:00
- Detached widgets still need a loadingFinished() for if they are children of legacy widgets
- Add description click handler
This commit is contained in:
parent
602ac44c15
commit
5bdf12f1b9
@ -82,11 +82,6 @@ export class Et2DateReadonly extends Et2Widget(LitElement) implements et2_IDetac
|
|||||||
{
|
{
|
||||||
// nope
|
// nope
|
||||||
}
|
}
|
||||||
|
|
||||||
loadingFinished()
|
|
||||||
{
|
|
||||||
// already done, I'm a wc with no children
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-ignore TypeScript is not recognizing that this widget is a LitElement
|
// @ts-ignore TypeScript is not recognizing that this widget is a LitElement
|
||||||
|
@ -79,6 +79,8 @@ export class Et2Description extends Et2Widget(LitElement) implements et2_IDetach
|
|||||||
this.extra_link_target = "_browser";
|
this.extra_link_target = "_browser";
|
||||||
this.href = "";
|
this.href = "";
|
||||||
this.value = "";
|
this.value = "";
|
||||||
|
|
||||||
|
this._handleClick = this._handleClick.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_value(value)
|
set_value(value)
|
||||||
@ -101,7 +103,7 @@ export class Et2Description extends Et2Widget(LitElement) implements et2_IDetach
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Do we do this here, or in transformAttributes()?
|
// Do we do this here, or in transformAttributes()?
|
||||||
if(!this.no_lang)
|
if(_value && !this.no_lang)
|
||||||
{
|
{
|
||||||
_value = this.egw().lang(_value);
|
_value = this.egw().lang(_value);
|
||||||
}
|
}
|
||||||
@ -146,11 +148,11 @@ export class Et2Description extends Et2Widget(LitElement) implements et2_IDetach
|
|||||||
|
|
||||||
async firstUpdated()
|
async firstUpdated()
|
||||||
{
|
{
|
||||||
this.removeEventListener('click.extra_link');
|
this.removeEventListener('click.extra_link', this._handleClick);
|
||||||
if(this.extra_link_popup || this.mime)
|
if(this.extra_link_popup || this.mime)
|
||||||
{
|
{
|
||||||
// Add click listener
|
// Add click listener
|
||||||
this.addEventListener('click.extra_link', this._handleClick.bind(this));
|
this.addEventListener('click.extra_link', this._handleClick);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,11 +209,6 @@ export class Et2Description extends Et2Widget(LitElement) implements et2_IDetach
|
|||||||
{
|
{
|
||||||
// nope
|
// nope
|
||||||
}
|
}
|
||||||
|
|
||||||
loadingFinished()
|
|
||||||
{
|
|
||||||
// already done, I'm a wc with no children
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-ignore TypeScript is not recognizing that this widget is a LitElement
|
// @ts-ignore TypeScript is not recognizing that this widget is a LitElement
|
||||||
|
Loading…
Reference in New Issue
Block a user