mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +01:00
fix only_app attribute not taking into account when setting value, which is in that case just an id
This commit is contained in:
parent
7f877082d2
commit
673e0b859c
@ -301,7 +301,7 @@ export class Et2LinkEntry extends Et2InputWidget(FormControlMixin(ValidateMixin(
|
|||||||
|
|
||||||
set value(val : LinkInfo | string | number)
|
set value(val : LinkInfo | string | number)
|
||||||
{
|
{
|
||||||
let value : LinkInfo = {app: "", id: ""};
|
let value : LinkInfo = {app: this.only_app, id: ""};
|
||||||
|
|
||||||
if(typeof val === 'string' && val.length > 0)
|
if(typeof val === 'string' && val.length > 0)
|
||||||
{
|
{
|
||||||
@ -309,10 +309,17 @@ export class Et2LinkEntry extends Et2InputWidget(FormControlMixin(ValidateMixin(
|
|||||||
{
|
{
|
||||||
val = val.replace(",", ":");
|
val = val.replace(",", ":");
|
||||||
}
|
}
|
||||||
|
if (val.indexOf(':') > 0)
|
||||||
|
{
|
||||||
const vals = val.split(':');
|
const vals = val.split(':');
|
||||||
value.app = vals[0];
|
value.app = vals[0];
|
||||||
value.id = vals[1];
|
value.id = vals[1];
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
value.id = val;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if(typeof val === "number" && val)
|
else if(typeof val === "number" && val)
|
||||||
{
|
{
|
||||||
value.id = String(val);
|
value.id = String(val);
|
||||||
|
Loading…
Reference in New Issue
Block a user