mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:07 +01:00
Etemplate: Fix TypeScript conversion error in historylog widget
Legacy options could not be accessed
This commit is contained in:
parent
15a252c151
commit
676be91387
@ -341,11 +341,12 @@ var et2_historylog = /** @class */ (function (_super) {
|
||||
// Parse / set legacy options
|
||||
if (options) {
|
||||
var mgr = this.getArrayMgr("content");
|
||||
for (var i_3 = 0; i_3 < options.length && i_3 < widget.legacyOptions.length; i_3++) {
|
||||
var legacy = widget.constructor.legacyOptions || [];
|
||||
for (var i_3 = 0; i_3 < options.length && i_3 < legacy.length; i_3++) {
|
||||
// Not set
|
||||
if (options[i_3] === "")
|
||||
continue;
|
||||
var attr = widget.attributes[widget.legacyOptions[i_3]];
|
||||
var attr = widget.attributes[legacy[i_3]];
|
||||
var attrValue = options[i_3];
|
||||
// If the attribute is marked as boolean, parse the
|
||||
// expression as bool expression.
|
||||
@ -355,12 +356,12 @@ var et2_historylog = /** @class */ (function (_super) {
|
||||
else {
|
||||
attrValue = mgr.expandName(attrValue);
|
||||
}
|
||||
attrs[widget.legacyOptions[i_3]] = attrValue;
|
||||
if (typeof widget['set_' + widget.legacyOptions[i_3]] === 'function') {
|
||||
widget['set_' + widget.legacyOptions[i_3]].call(widget, attrValue);
|
||||
attrs[legacy[i_3]] = attrValue;
|
||||
if (typeof widget['set_' + legacy[i_3]] === 'function') {
|
||||
widget['set_' + legacy[i_3]].call(widget, attrValue);
|
||||
}
|
||||
else {
|
||||
widget.options[widget.legacyOptions[i_3]] = attrValue;
|
||||
widget.options[legacy[i_3]] = attrValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -471,12 +471,13 @@ export class et2_historylog extends et2_valueWidget implements et2_IDataProvider
|
||||
if(options)
|
||||
{
|
||||
const mgr = this.getArrayMgr("content");
|
||||
for(let i = 0; i < options.length && i < widget.legacyOptions.length; i++)
|
||||
let legacy = widget.constructor.legacyOptions || [];
|
||||
for(let i = 0; i < options.length && i < legacy.length; i++)
|
||||
{
|
||||
// Not set
|
||||
if(options[i] === "") continue;
|
||||
|
||||
const attr = widget.attributes[widget.legacyOptions[i]];
|
||||
const attr = widget.attributes[legacy[i]];
|
||||
let attrValue = options[i];
|
||||
|
||||
// If the attribute is marked as boolean, parse the
|
||||
@ -489,14 +490,14 @@ export class et2_historylog extends et2_valueWidget implements et2_IDataProvider
|
||||
{
|
||||
attrValue = mgr.expandName(attrValue);
|
||||
}
|
||||
attrs[widget.legacyOptions[i]] = attrValue;
|
||||
if(typeof widget['set_'+widget.legacyOptions[i]] === 'function')
|
||||
attrs[legacy[i]] = attrValue;
|
||||
if(typeof widget['set_'+legacy[i]] === 'function')
|
||||
{
|
||||
widget['set_'+widget.legacyOptions[i]].call(widget, attrValue);
|
||||
widget['set_'+legacy[i]].call(widget, attrValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
widget.options[widget.legacyOptions[i]] = attrValue;
|
||||
widget.options[legacy[i]] = attrValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user