mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
Fix context menu "Copy ..." of text contents
This commit is contained in:
parent
3c0ea24aa7
commit
5f2aba2af9
@ -662,7 +662,7 @@ export class EgwPopupActionImplementation implements EgwActionImplementation {
|
||||
}
|
||||
let os_clipboard_caption = "";
|
||||
if (this._context.event) {
|
||||
os_clipboard_caption = this._context.innerText.trim();
|
||||
os_clipboard_caption = this._context.event.target.innerText.trim()
|
||||
clipboard_action.set_caption(window.egw.lang('Copy "%1"', os_clipboard_caption.length > 20 ? os_clipboard_caption.substring(0, 20) + '...' : os_clipboard_caption));
|
||||
clipboard_action.data.target = this._context.target;
|
||||
}
|
||||
|
@ -52,6 +52,11 @@ export class Et2DateDurationReadonly extends Et2DateDuration
|
||||
this.requestUpdate("value", old_value);
|
||||
}
|
||||
|
||||
get innerText() : string
|
||||
{
|
||||
return this.shadowRoot.querySelector('span').innerText;
|
||||
}
|
||||
|
||||
render()
|
||||
{
|
||||
let parsed = this.__value;
|
||||
|
@ -50,6 +50,12 @@ export class Et2DateReadonly extends Et2Widget(LitElement) implements et2_IDetac
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
get innerText() : string
|
||||
{
|
||||
let parsed : Date | Boolean = this.value ? this.parser(this.value, this.dataFormat) : false
|
||||
return this.value ? this.formatter(<Date>parsed) : '';
|
||||
}
|
||||
|
||||
render()
|
||||
{
|
||||
let parsed : Date | Boolean = this.value ? this.parser(this.value, this.dataFormat) : false
|
||||
|
@ -426,6 +426,10 @@ export class Et2Link extends ExposeMixin<Et2Widget>(Et2Widget(LitElement)) imple
|
||||
return false;
|
||||
}
|
||||
|
||||
get innerText() : string
|
||||
{
|
||||
return this.title;
|
||||
}
|
||||
getDetachedAttributes(_attrs : string[])
|
||||
{
|
||||
_attrs.push("app", "entryId", "statustext");
|
||||
|
@ -227,6 +227,15 @@ li {
|
||||
return this.__select_options;
|
||||
}
|
||||
|
||||
get innerText() : string
|
||||
{
|
||||
return typeof this.value == "string" ? this.select_options.find(o => o.value == this.value) :
|
||||
this.select_options
|
||||
.filter(o => this.value.includes("" + o.value))
|
||||
.map(o => o.label)
|
||||
.join(", ");
|
||||
}
|
||||
|
||||
render()
|
||||
{
|
||||
const value = this.getValueAsArray();
|
||||
|
Loading…
Reference in New Issue
Block a user