forked from extern/egroupware
Et2Dialog changes
- Set template's DOM ID so CSS can style it This is the best way to set [minimum] dimensions, though you can set width & height on the Et2Dialog.
This commit is contained in:
parent
d7400503ac
commit
e9a381da69
@ -418,7 +418,7 @@ export class Et2Dialog extends Et2Widget(ScopedElementsMixin(SlotMixin(LionDialo
|
||||
}
|
||||
}
|
||||
// set template-name as id, to allow to style dialogs
|
||||
//this.div.children().attr('id', new_template_name.replace(/^(.*\/)?([^/]+)(\.xet)?$/, '$2').replace(/\./g, '-'));
|
||||
this._template_widget.DOMContainer.setAttribute('id', this.__template.replace(/^(.*\/)?([^/]+)(\.xet)?$/, '$2').replace(/\./g, '-'));
|
||||
|
||||
}
|
||||
|
||||
|
@ -48,6 +48,7 @@ export class Et2DialogOverlay extends SlotMixin(LitElement)
|
||||
}
|
||||
#overlay-content-node-wrapper {
|
||||
flex: 1 1 auto;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.overlay__heading > .overlay__close-button {
|
||||
@ -111,9 +112,9 @@ export class Et2DialogOverlay extends SlotMixin(LitElement)
|
||||
async getUpdateComplete()
|
||||
{
|
||||
let result = await super.getUpdateComplete();
|
||||
if(this._contentNode && this._contentNode.getUpdateComplete)
|
||||
if(this._contentNode && this._contentNode instanceof LitElement)
|
||||
{
|
||||
await this._contentNode.getUpdateComplete();
|
||||
await (<LitElement>this._contentNode).updateComplete;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -125,13 +126,12 @@ export class Et2DialogOverlay extends SlotMixin(LitElement)
|
||||
this.updateComplete
|
||||
.then(async() =>
|
||||
{
|
||||
if(this._contentNode && this._contentNode.getUpdateComplete)
|
||||
if(this._contentNode && this._contentNode instanceof LitElement)
|
||||
{
|
||||
|
||||
// Re-do render to get proper images
|
||||
this._contentNode.requestUpdate();
|
||||
|
||||
await this._contentNode.getUpdateComplete();
|
||||
await this._contentNode.updateComplete;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user