mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +01:00
Fix the failing clone()
This commit is contained in:
parent
8f81266b1d
commit
a027649ae5
@ -289,7 +289,7 @@ const Et2WidgetMixin = (superClass) =>
|
||||
{
|
||||
let oldValue = this._widget_id;
|
||||
this._widget_id = value;
|
||||
this.setAttribute("id", this._widget_id ? this.getInstanceManager().uniqueId + '_' + this._widget_id.replace(/\./g, '-') : "");
|
||||
this.setAttribute("id", this._widget_id ? this.getInstanceManager()?.uniqueId + '_' + this._widget_id.replace(/\./g, '-') : "");
|
||||
this.requestUpdate("id", oldValue);
|
||||
}
|
||||
|
||||
@ -828,13 +828,6 @@ const Et2WidgetMixin = (superClass) =>
|
||||
// Create the copy
|
||||
var copy = <Et2WidgetClass>this.cloneNode();
|
||||
|
||||
let widget_class = window.customElements.get(this.localName);
|
||||
let properties = widget_class ? widget_class.properties : [];
|
||||
for(let key in properties)
|
||||
{
|
||||
copy[key] = this[key];
|
||||
}
|
||||
|
||||
if(_parent)
|
||||
{
|
||||
copy.setParent(_parent);
|
||||
@ -848,6 +841,13 @@ const Et2WidgetMixin = (superClass) =>
|
||||
copy.setInstanceManager(this.getInstanceManager());
|
||||
}
|
||||
|
||||
let widget_class = window.customElements.get(this.localName);
|
||||
let properties = widget_class ? widget_class.properties : [];
|
||||
for(let key in properties)
|
||||
{
|
||||
copy[key] = this[key];
|
||||
}
|
||||
|
||||
// Create a clone of all child widgets of the given object
|
||||
for(var i = 0; i < this.getChildren().length; i++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user