From 1fa9d91d5992b9b6280fc6b5cf0d50bc2318cbb1 Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 1 Feb 2023 14:31:17 -0700 Subject: [PATCH] Et2Description: Fix links were not clickable activateLinks property got typoed to activeLinks in the template conversion --- api/js/etemplate/Et2Description/Et2Description.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/js/etemplate/Et2Description/Et2Description.ts b/api/js/etemplate/Et2Description/Et2Description.ts index 36223429f0..c14f191f00 100644 --- a/api/js/etemplate/Et2Description/Et2Description.ts +++ b/api/js/etemplate/Et2Description/Et2Description.ts @@ -49,7 +49,7 @@ export class Et2Description extends Et2Widget(LitElement) implements et2_IDetach * Scan the value, and if there are any links (URL, mailto:) then wrap them in a clickable * tag */ - activeLinks: { + activateLinks: { type: Boolean, reflect: true }, @@ -88,7 +88,7 @@ export class Et2Description extends Et2Widget(LitElement) implements et2_IDetach super(); // Initialize properties - this.activeLinks = false; + this.activateLinks = false; this.extraLinkPopup = ""; this.extraLinkTarget = "_browser"; // Don't initialize this to avoid href(unknown) when rendered @@ -148,7 +148,7 @@ export class Et2Description extends Et2Widget(LitElement) implements et2_IDetach super.requestUpdate(...arguments); // Due to how we do the rendering into the light DOM (not sure it's right) we need this after // value change or it won't actually show up - if(["value", "href", "activeLinks"].indexOf(attribute) != -1 && this.parentNode) + if(["value", "href", "activateLinks"].indexOf(attribute) != -1 && this.parentNode) { this.updateComplete.then(() => render(this._renderContent(), this)); } @@ -171,7 +171,7 @@ export class Et2Description extends Et2Widget(LitElement) implements et2_IDetach render = this.wrapLink(this.href, this.value); } // If we want to activate links inside, do that - else if(this.activeLinks && this.value) + else if(this.activateLinks && this.value) { render = this.getActivatedValue(this.value, this.href ? this.extraLinkTarget : '_blank'); }