forked from extern/egroupware
Et2Image: Show as clickable if image has href OR onclick
This commit is contained in:
parent
0f362f9717
commit
0d6d18e3fa
@ -42,8 +42,7 @@ export class Et2Image extends Et2Widget(LitElement) implements et2_IDetachedDOM
|
|||||||
* Added here as there's no Lion parent
|
* Added here as there's no Lion parent
|
||||||
*/
|
*/
|
||||||
label: {
|
label: {
|
||||||
type: String,
|
type: String
|
||||||
translate: true
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -150,14 +149,14 @@ export class Et2Image extends Et2Widget(LitElement) implements et2_IDetachedDOM
|
|||||||
* Handle changes that have to happen based on changes to properties
|
* Handle changes that have to happen based on changes to properties
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
requestUpdate(name : PropertyKey, oldValue)
|
updated(changedProperties)
|
||||||
{
|
{
|
||||||
super.requestUpdate(name, oldValue);
|
super.updated(changedProperties);
|
||||||
|
|
||||||
// if there's an href, make it look clickable
|
// if there's an href or onclick, make it look clickable
|
||||||
if(name == 'href')
|
if(changedProperties.has("href") || changedProperties.has("onclick"))
|
||||||
{
|
{
|
||||||
this.classList.toggle("et2_clickable", this.href)
|
this.classList.toggle("et2_clickable", this.href || this.onclick)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user