Fix widgets don't appear disabled when they are

This commit is contained in:
nathan 2022-11-14 11:22:56 -07:00
parent f6687dd310
commit ed2eb30b32
2 changed files with 7 additions and 3 deletions

View File

@ -123,9 +123,12 @@ export class Et2DropdownButton extends Et2widgetWithSelectMixin(Et2Button)
{
return html`
<sl-button-group>
<sl-button size="${egwIsMobile()?"large":"medium"}" id="main">${this.label}</sl-button>
<sl-button size="${egwIsMobile() ? "large" : "medium"}" id="main" ?disabled=${this.disabled}>
${this.label}
</sl-button>
<sl-dropdown placement="bottom-end" hoist>
<sl-button size="${egwIsMobile()?"large":"medium"}" slot="trigger" caret></sl-button>
<sl-button size="${egwIsMobile() ? "large" : "medium"}" slot="trigger" caret
?disabled=${this.disabled}></sl-button>
<sl-menu>
</sl-menu>
</sl-dropdown>

View File

@ -755,7 +755,8 @@ export class et2_file extends et2_inputWidget
if (typeof _ro != "undefined")
{
this.options.readonly = _ro;
this.span.toggleClass('et2_file_ro',_ro);
this.span.toggleClass('et2_file_ro', _ro);
this.span[0].readonly = _ro;
if (this.options.readonly)
{
this.span.unbind('click');