From 77a11cb5fe79efacb7ef1f7acc59f64b64440dc0 Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 8 Apr 2022 14:03:29 -0600 Subject: [PATCH] Fix image src not getting set --- api/etemplate.php | 1 + api/js/etemplate/Et2Image/Et2Image.ts | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/api/etemplate.php b/api/etemplate.php index 31e94bbdca..13a445ca9a 100644 --- a/api/etemplate.php +++ b/api/etemplate.php @@ -161,6 +161,7 @@ function send_template() if (!empty($attrs['image']) && (empty($attrs['background_image']) || $attrs['background_image'] === 'false')) { $tag = 'et2-image'; + $attrs['src'] = $attrs['image']; } // novalidation --> noValidation if (!empty($attrs['novalidation']) && in_array($attrs['novalidation'], ['true', '1'], true)) diff --git a/api/js/etemplate/Et2Image/Et2Image.ts b/api/js/etemplate/Et2Image/Et2Image.ts index fffc37e39c..3212b2b285 100644 --- a/api/js/etemplate/Et2Image/Et2Image.ts +++ b/api/js/etemplate/Et2Image/Et2Image.ts @@ -122,6 +122,11 @@ export class Et2Image extends Et2Widget(LitElement) implements et2_IDetachedDOM } } + get src() + { + return this.__src; + } + _handleClick(_ev : MouseEvent) : boolean { if(this.href)