mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +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)
|
||||
{
|
||||
let value : LinkInfo = {app: "", id: ""};
|
||||
let value : LinkInfo = {app: this.only_app, id: ""};
|
||||
|
||||
if(typeof val === 'string' && val.length > 0)
|
||||
{
|
||||
@ -309,9 +309,16 @@ export class Et2LinkEntry extends Et2InputWidget(FormControlMixin(ValidateMixin(
|
||||
{
|
||||
val = val.replace(",", ":");
|
||||
}
|
||||
const vals = val.split(':');
|
||||
value.app = vals[0];
|
||||
value.id = vals[1];
|
||||
if (val.indexOf(':') > 0)
|
||||
{
|
||||
const vals = val.split(':');
|
||||
value.app = vals[0];
|
||||
value.id = vals[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
value.id = val;
|
||||
}
|
||||
}
|
||||
else if(typeof val === "number" && val)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user