mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 18:03:39 +01:00
Legacy dialog
- Fix load event was not bubbling through to the listener - Fix value was missing
This commit is contained in:
parent
2f616281e0
commit
85e247d4d6
@ -38,6 +38,10 @@ export class et2_dialog extends Et2Dialog
|
|||||||
super.template = value;
|
super.template = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
|
* @returns {any}
|
||||||
|
*/
|
||||||
get div()
|
get div()
|
||||||
{
|
{
|
||||||
return this;
|
return this;
|
||||||
@ -82,6 +86,7 @@ for(const [key, value] of Object.entries(et2_dialog.properties))
|
|||||||
|
|
||||||
attrs[key] = {type: type_map[attr.type?.name || attr.name] || "string"};
|
attrs[key] = {type: type_map[attr.type?.name || attr.name] || "string"};
|
||||||
}
|
}
|
||||||
|
attrs["value"] = {type: "any"};
|
||||||
et2_attribute_registry[et2_dialog.name] = attrs
|
et2_attribute_registry[et2_dialog.name] = attrs
|
||||||
|
|
||||||
customElements.define("legacy-dialog", et2_dialog);
|
customElements.define("legacy-dialog", et2_dialog);
|
@ -696,7 +696,12 @@ export class etemplate2
|
|||||||
app[this.app].et2_ready(this, this.name);
|
app[this.app].et2_ready(this, this.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
jQuery(this._DOMContainer).trigger('load', this);
|
// Dispatch an event that will bubble through shadow DOM boundary (pass through custom elements)
|
||||||
|
this._DOMContainer.dispatchEvent(new CustomEvent('load', {
|
||||||
|
bubbles: true,
|
||||||
|
composed: true,
|
||||||
|
detail: this
|
||||||
|
}));
|
||||||
|
|
||||||
if(etemplate2.templates[this.name].attributes.onload)
|
if(etemplate2.templates[this.name].attributes.onload)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user