Fix TypeError: Cannot set property options

This commit is contained in:
ralf 2022-03-10 14:57:00 +02:00
parent 782958d7fc
commit 0099b094b9
2 changed files with 6 additions and 0 deletions

View File

@ -88,6 +88,8 @@ function send_template()
'customfields' => 'sub-type,use-private,field-names', 'customfields' => 'sub-type,use-private,field-names',
'date' => 'data_format,ignore', // Legacy option "mode" was never implemented in et2 'date' => 'data_format,ignore', // Legacy option "mode" was never implemented in et2
'description' => 'bold-italic,link,activate_links,label_for,link_target,link_popup_size,link_title', 'description' => 'bold-italic,link,activate_links,label_for,link_target,link_popup_size,link_title',
'button' => 'image,ro_image',
'buttononly' => 'image,ro_image',
); );
// prefer more specific type-subtype over just type // prefer more specific type-subtype over just type
$names = $legacy_options[$matches[1].$matches[2]] ?? $legacy_options[$matches[1]] ?? null; $names = $legacy_options[$matches[1].$matches[2]] ?? $legacy_options[$matches[1]] ?? null;

View File

@ -1350,6 +1350,10 @@ function transformAttributes(widget, mgr : et2_arrayMgr, attributes)
// Set as attribute (reflected in DOM) // Set as attribute (reflected in DOM)
widget.setAttribute(attribute, attrValue); widget.setAttribute(attribute, attrValue);
} }
else if (attribute === 'options')
{
console.trace('Ignored setting depricated "options" attribute for widget #'+widget.id, widget);
}
else else
{ {
// Set as property, not attribute // Set as property, not attribute