mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
Fix Et2Image did not double-transform src for as legacy image did
eg: if $content[0][type] = "group" ${row}[type] => "0[type]" (single transform) 0[type] => "group" (double transform) Also, fix type from addressbook list to not need double-transform
This commit is contained in:
parent
6ed888a80e
commit
e3be42721e
@ -100,7 +100,7 @@
|
||||
</vbox>
|
||||
</row>
|
||||
<row class="$row_cont[class] $row_cont[cat_id]" valign="top">
|
||||
<image align="center" label="$row_cont[type_label]" src="${row}[type]" no_lang="1"/>
|
||||
<et2-image align="center" label="$row_cont[type_label]" src="$row_cont[type]" no_lang="1"/>
|
||||
<vbox id="${row}[id]">
|
||||
<description id="${row}[line1]" no_lang="1"/>
|
||||
<description id="${row}[line2]" no_lang="1"/>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user