diff --git a/addressbook/templates/default/index.xet b/addressbook/templates/default/index.xet index 2d1d754342..ed4bf7d17b 100644 --- a/addressbook/templates/default/index.xet +++ b/addressbook/templates/default/index.xet @@ -100,7 +100,7 @@ - + diff --git a/api/etemplate.php b/api/etemplate.php index 9fd8ab4735..6affb49636 100644 --- a/api/etemplate.php +++ b/api/etemplate.php @@ -13,7 +13,7 @@ use EGroupware\Api; // add et2- prefix to following widgets/tags -const ADD_ET2_PREFIX_REGEXP = '#<((/?)([vh]?box|textbox|textarea|button|colorpicker|description|url(-email|-phone|-fax)?))(/?|\s[^>]*)>#m'; +const ADD_ET2_PREFIX_REGEXP = '#<((/?)([vh]?box|textbox|textarea|button|colorpicker|description|image|url(-email|-phone|-fax)?))(/?|\s[^>]*)>#m'; const ADD_ET2_PREFIX_LAST_GROUP = 5; // switch evtl. set output-compression off, as we cant calculate a Content-Length header with transparent compression diff --git a/api/js/etemplate/Et2Image/Et2Image.ts b/api/js/etemplate/Et2Image/Et2Image.ts index bad502406a..c9508ed779 100644 --- a/api/js/etemplate/Et2Image/Et2Image.ts +++ b/api/js/etemplate/Et2Image/Et2Image.ts @@ -155,6 +155,29 @@ export class Et2Image extends Et2Widget(LitElement) implements et2_IDetachedDOM } } + transformAttributes(_attrs : any) + { + super.transformAttributes(_attrs); + + // Expand src with additional stuff. Copy & paste from legacy. + if(typeof _attrs["src"] != "undefined") + { + let manager = this.getArrayMgr("content"); + if(manager && _attrs["src"]) + { + let src = manager.getEntry(_attrs["src"], false, true); + if(typeof src != "undefined" && src !== null) + { + if(typeof src == "object") + { + src = egw().link('/index.php', src); + } + this.src = src; + } + } + } + } + /** * Code for implementing et2_IDetachedDOM *