mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Some more fixes for historylog widget
- Fix options in proper format could be interpreted as sub-widgets - Fix numeric values
This commit is contained in:
parent
12151139ff
commit
c26732a913
@ -229,6 +229,10 @@ export function cleanSelectOptions(options : SelectOption[] | string[] | object)
|
|||||||
for(let key in <any>options)
|
for(let key in <any>options)
|
||||||
{
|
{
|
||||||
let option : any = options[key];
|
let option : any = options[key];
|
||||||
|
if(typeof option === 'number')
|
||||||
|
{
|
||||||
|
option = "" + option;
|
||||||
|
}
|
||||||
if(typeof option === 'string')
|
if(typeof option === 'string')
|
||||||
{
|
{
|
||||||
option = {label: option};
|
option = {label: option};
|
||||||
@ -237,7 +241,7 @@ export function cleanSelectOptions(options : SelectOption[] | string[] | object)
|
|||||||
{
|
{
|
||||||
option = {label: key + ""};
|
option = {label: key + ""};
|
||||||
}
|
}
|
||||||
option.value = option.value??key.trim(); // link_search prefixes keys with one space
|
option.value = option.value ?? key.trim(); // link_search prefixes keys with one space
|
||||||
fixed_options.push(option);
|
fixed_options.push(option);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -420,7 +420,8 @@ export class et2_historylog extends et2_valueWidget implements et2_IDataProvider
|
|||||||
{
|
{
|
||||||
// Require widget to be a widget, to avoid invalid widgets
|
// Require widget to be a widget, to avoid invalid widgets
|
||||||
// (and template, which is a widget and an infolog todo status)
|
// (and template, which is a widget and an infolog todo status)
|
||||||
if(et2_registry[field[j]] && ['template'].indexOf(field[j]) < 0 || customElements.get(field[j]) || typeof field[j] == "object")
|
if(et2_registry[field[j]] && ['template'].indexOf(field[j]) < 0 || customElements.get(field[j]) ||
|
||||||
|
typeof field[j] == "object" && typeof field[j].value == "undefined")
|
||||||
{
|
{
|
||||||
need_box = true;
|
need_box = true;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user