mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
Fix handling of modified widget type.
It wasn't working if a Transform changed the widget type to a webcomponent
This commit is contained in:
parent
a80d810926
commit
ff6d0ef785
@ -239,7 +239,7 @@ function send_template()
|
||||
preg_match_all('/(^|\s)([a-z0-9_-]+)="([^"]*)"/i', $matches[4], $attrs, PREG_PATTERN_ORDER);
|
||||
$attrs = array_combine($attrs[2], $attrs[3]);
|
||||
|
||||
if(!$matches[2] || in_array($matches[2], ['sort']))
|
||||
if(!$matches[2] || in_array($matches[2], ['sort']) || ($matches[2] == "custom" && !$attrs['widget_type']))
|
||||
{
|
||||
return $matches[0];
|
||||
}
|
||||
|
@ -796,7 +796,7 @@ export class et2_widget extends ClassWithAttributes
|
||||
|
||||
// Get the constructor - if the widget is readonly, use the special "_ro"
|
||||
// constructor if it is available
|
||||
if (typeof et2_registry[_nodeName] === "undefined")
|
||||
if(typeof et2_registry[_nodeName] === "undefined" && typeof window.customElements.get(_nodeName) == "undefined")
|
||||
{
|
||||
_nodeName = 'placeholder';
|
||||
}
|
||||
@ -806,9 +806,9 @@ export class et2_widget extends ClassWithAttributes
|
||||
constructor = et2_registry[_nodeName + "_ro"];
|
||||
}
|
||||
|
||||
if(typeof window.customElements.get(_node.nodeName.toLowerCase()) !== "undefined")
|
||||
if(typeof window.customElements.get(_nodeName) !== "undefined")
|
||||
{
|
||||
widget = loadWebComponent(_node.nodeName.toLowerCase(), _node, this);
|
||||
widget = loadWebComponent(_nodeName, _node, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user