mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-24 03:41:53 +02:00
Et2ButtonIcon: Keep set image property so we can check it
This commit is contained in:
parent
05be3df77e
commit
2208ba1b99
@ -32,9 +32,11 @@ export class Et2ButtonIcon extends ButtonMixin(Et2InputWidget(SlIconButton))
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private __image;
|
||||||
|
|
||||||
set image(new_image : string)
|
set image(new_image : string)
|
||||||
{
|
{
|
||||||
let oldValue = this.__src;
|
let oldValue = this.__image;
|
||||||
if(new_image.indexOf("http") >= 0 || new_image.indexOf(this.egw().webserverUrl) >= 0)
|
if(new_image.indexOf("http") >= 0 || new_image.indexOf(this.egw().webserverUrl) >= 0)
|
||||||
{
|
{
|
||||||
this.src = new_image
|
this.src = new_image
|
||||||
@ -43,6 +45,7 @@ export class Et2ButtonIcon extends ButtonMixin(Et2InputWidget(SlIconButton))
|
|||||||
{
|
{
|
||||||
this.src = this.egw().image(new_image);
|
this.src = this.egw().image(new_image);
|
||||||
}
|
}
|
||||||
|
this.__image = new_image;
|
||||||
|
|
||||||
// For some reason setting it directly does not show the image
|
// For some reason setting it directly does not show the image
|
||||||
this.updateComplete.then(() =>
|
this.updateComplete.then(() =>
|
||||||
@ -63,7 +66,7 @@ export class Et2ButtonIcon extends ButtonMixin(Et2InputWidget(SlIconButton))
|
|||||||
|
|
||||||
get image()
|
get image()
|
||||||
{
|
{
|
||||||
return this.src || this.name;
|
return this.__image || this.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user