Et2Link: Fix unwanted indent in front of et2-link-string, fix expose in et2-link-list

This commit is contained in:
nathan 2023-05-26 11:36:25 -06:00
parent 4d133c04b8
commit 27cd57d428
3 changed files with 20 additions and 10 deletions

View File

@ -181,6 +181,7 @@ export class Et2Link extends ExposeMixin<Et2Widget>(Et2Widget(LitElement)) imple
._parent=${this} ._parent=${this}
href="${link.href}" href="${link.href}"
src=${this.egw().image("" + link.icon)} src=${this.egw().image("" + link.icon)}
?disabled=${!(link.href || link.icon)}
></et2-image-expose>`; ></et2-image-expose>`;
} }

View File

@ -507,7 +507,8 @@ export function ExposeMixin<B extends Constructor<LitElement>>(superclass : B)
// Try for all exposable of the same type in the parent widget // Try for all exposable of the same type in the parent widget
try try
{ {
this.getParent().getDOMNode().querySelectorAll(this.localName).forEach((exposable, index) => const others = (this.getParent().closest("[exposable]") || this.getParent().getDOMNode()).querySelectorAll(this.localName);
others.forEach((exposable, index) =>
{ {
if(exposable === this) if(exposable === this)
{ {
@ -518,6 +519,10 @@ export function ExposeMixin<B extends Constructor<LitElement>>(superclass : B)
mediaContent.push(...exposable.getMedia(Object.assign({}, IMAGE_DEFAULT, exposable.exposeValue))); mediaContent.push(...exposable.getMedia(Object.assign({}, IMAGE_DEFAULT, exposable.exposeValue)));
} }
}); });
if(!others || others.length == 0)
{
mediaContent = this.getMedia(_value);
}
} }
catch(e) catch(e)
{ {

View File

@ -1292,6 +1292,10 @@ ul.et2_link_string {
display: inline; display: inline;
} }
et2-link-string et2-link::part(base) {
margin-right: -0.5ex;
}
.et2_link_string li:not(:last-child):after { .et2_link_string li:not(:last-child):after {
content: '\002C\00A0'; content: '\002C\00A0';
} }