Fix some places in Link widgets where readonly & disabled were not applied

This commit is contained in:
nathan 2024-12-12 11:36:28 -07:00
parent c89f0578d4
commit 6169647c24
2 changed files with 5 additions and 2 deletions

View File

@ -376,7 +376,7 @@ export class Et2LinkEntry extends Et2InputWidget(LitElement)
?appIcons=${this.appIcons}
applicationList=${this.applicationList ? this.applicationList : nothing}
?disabled=${this.disabled}
?readonly=${this.disabled}
?readonly=${this.readonly}
.value=${this.__value?.app ? this.__value.app : nothing}
@change=${this.handleAppChange}
></et2-link-apps>

View File

@ -153,7 +153,7 @@ export class Et2LinkTo extends Et2InputWidget(LitElement)
getClipboardFiles().then((files) =>
{
if(files.length > 0)
if(files.length > 0 && !this.disabled && !this.readonly)
{
this.pasteButton.removeAttribute("disabled");
}
@ -166,6 +166,7 @@ export class Et2LinkTo extends Et2InputWidget(LitElement)
part="vfs button"
exportparts="base:button_base"
id="link"
?disabled=${this.disabled}
?readonly=${this.readonly}
method=${method || nothing}
method-id=${method_id || nothing}
@ -235,6 +236,7 @@ export class Et2LinkTo extends Et2InputWidget(LitElement)
<et2-link-entry .onlyApp="${this.onlyApp}"
.applicationList="${this.applicationList}"
.readonly=${this.readonly}
?disabled=${this.disabled}
@sl-change=${this.handleEntrySelected}
@sl-clear="${this.handleEntryCleared}">
</et2-link-entry>
@ -262,6 +264,7 @@ export class Et2LinkTo extends Et2InputWidget(LitElement)
// Make the whole template a drop target
drop_target: this.getInstanceManager().DOMContainer.getAttribute("id"),
readonly: this.readonly,
disabled: this.disabled,
// Change to this tab when they drop
onStart: function(event, file_count)