mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-14 12:04:54 +01:00
Fix link to did not link
This commit is contained in:
parent
e72671bc20
commit
368c9fae63
@ -87,8 +87,8 @@ export class Et2LinkSearch extends Et2Select
|
|||||||
|
|
||||||
// Set a value we don't have as an option? That's OK, we'll just add it
|
// Set a value we don't have as an option? That's OK, we'll just add it
|
||||||
if(changedProperties.has("value") && this.value && this.value.length > 0 && (
|
if(changedProperties.has("value") && this.value && this.value.length > 0 && (
|
||||||
this.getAllOptions().length == 0 ||
|
this.select_options.length == 0 ||
|
||||||
this.getAllOptions().filter && this.getAllOptions().filter(item => this.getValueAsArray().includes(item.value)).length == 0
|
this.select_options.filter && this.select_options.filter(item => this.getValueAsArray().includes(item.value)).length == 0
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
this._missingOption(this.value)
|
this._missingOption(this.value)
|
||||||
|
@ -141,7 +141,7 @@ export class Et2LinkTo extends Et2InputWidget(ScopedElementsMixin(FormControlMix
|
|||||||
<et2-link-entry .onlyApp="${this.onlyApp}"
|
<et2-link-entry .onlyApp="${this.onlyApp}"
|
||||||
.applicationList="${this.applicationList}"
|
.applicationList="${this.applicationList}"
|
||||||
.readonly=${this.readonly}
|
.readonly=${this.readonly}
|
||||||
@sl-select=${this.handleEntrySelected}
|
@sl-change=${this.handleEntrySelected}
|
||||||
@sl-clear="${this.handleEntryCleared}">
|
@sl-clear="${this.handleEntryCleared}">
|
||||||
</et2-link-entry>
|
</et2-link-entry>
|
||||||
<et2-button id="link_button" label="Link" class="link" .noSubmit=${true}
|
<et2-button id="link_button" label="Link" class="link" .noSubmit=${true}
|
||||||
@ -405,6 +405,7 @@ export class Et2LinkTo extends Et2InputWidget(ScopedElementsMixin(FormControlMix
|
|||||||
if(event.target == this.select._searchNode)
|
if(event.target == this.select._searchNode)
|
||||||
{
|
{
|
||||||
this.classList.add("can_link");
|
this.classList.add("can_link");
|
||||||
|
this.link_button.focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1023,7 +1023,7 @@ export const Et2WithSearchMixin = dedupeMixin(<T extends Constructor<LitElement>
|
|||||||
// Show a spinner
|
// Show a spinner
|
||||||
let spinner = document.createElement("sl-spinner");
|
let spinner = document.createElement("sl-spinner");
|
||||||
spinner.slot = "expand-icon";
|
spinner.slot = "expand-icon";
|
||||||
this.appendChild(spinner);
|
this.select.appendChild(spinner);
|
||||||
|
|
||||||
// Hide clear button
|
// Hide clear button
|
||||||
let clear_button = <HTMLElement>this._searchInputNode.shadowRoot.querySelector(".input__clear")
|
let clear_button = <HTMLElement>this._searchInputNode.shadowRoot.querySelector(".input__clear")
|
||||||
@ -1077,9 +1077,6 @@ export const Et2WithSearchMixin = dedupeMixin(<T extends Constructor<LitElement>
|
|||||||
{
|
{
|
||||||
let target = this._optionTargetNode || this;
|
let target = this._optionTargetNode || this;
|
||||||
|
|
||||||
// Remove "no suggestions"
|
|
||||||
target.querySelector(".no-results")?.remove();
|
|
||||||
|
|
||||||
// Remove any previously selected remote options that aren't used anymore
|
// Remove any previously selected remote options that aren't used anymore
|
||||||
this._selected_remote = this._selected_remote.filter((option) =>
|
this._selected_remote = this._selected_remote.filter((option) =>
|
||||||
{
|
{
|
||||||
@ -1090,14 +1087,7 @@ export const Et2WithSearchMixin = dedupeMixin(<T extends Constructor<LitElement>
|
|||||||
{
|
{
|
||||||
return prev + ":not([value='" + ('' + current.value).replace(/'/g, "\\\'") + "'])";
|
return prev + ":not([value='" + ('' + current.value).replace(/'/g, "\\\'") + "'])";
|
||||||
}, "");
|
}, "");
|
||||||
target.querySelectorAll(".remote" + keepers).forEach(o => o.remove());
|
|
||||||
target.childNodes.forEach((n) =>
|
|
||||||
{
|
|
||||||
if(n.nodeType == Node.COMMENT_NODE)
|
|
||||||
{
|
|
||||||
n.remove();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// Not searching anymore, clear flag
|
// Not searching anymore, clear flag
|
||||||
this.select_options.map((o) => o.isMatch = null);
|
this.select_options.map((o) => o.isMatch = null);
|
||||||
this.requestUpdate("select_options");
|
this.requestUpdate("select_options");
|
||||||
|
Loading…
Reference in New Issue
Block a user