mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 15:33:23 +01:00
fix class on et2-image was lost
This commit is contained in:
parent
7211dc789e
commit
f88fa76866
@ -167,13 +167,15 @@ export class Et2Image extends Et2Widget(LitElement) implements et2_IDetachedDOM
|
||||
// set title on et2-image for both bootstrap-image via css-class and embedded img tag
|
||||
this.title = this.statustext || this.label || "";
|
||||
|
||||
this.classList.forEach(_class => {
|
||||
if (_class.startsWith('bi-')) this.classList.remove(_class);
|
||||
});
|
||||
const bootstrap = url.match(/\/node_modules\/bootstrap-icons\/icons\/([^.]+)\.svg/);
|
||||
if (bootstrap)
|
||||
{
|
||||
this.className = 'bi-'+bootstrap[1];
|
||||
this.classList.add('bi-'+bootstrap[1]);
|
||||
return html``;
|
||||
}
|
||||
this.className = '';
|
||||
return html`
|
||||
<img ${this.id ? html`id="${this.id}"` : ''}
|
||||
src="${url}"
|
||||
|
Loading…
Reference in New Issue
Block a user