mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 17:38:19 +01:00
Fix bug in nm rowProvider preventing some re-ordered columns from getting their value
This commit is contained in:
parent
5fecbf3051
commit
83fd11f7c7
@ -218,7 +218,7 @@ var et2_nextmatch_rowProvider = /** @class */ (function () {
|
|||||||
* @param {et2_widget} _widget
|
* @param {et2_widget} _widget
|
||||||
*/
|
*/
|
||||||
et2_nextmatch_rowProvider.prototype._getVariableAttributeSet = function (_widget) {
|
et2_nextmatch_rowProvider.prototype._getVariableAttributeSet = function (_widget) {
|
||||||
var variableAttributes = [];
|
var variableAttributes = [];
|
||||||
var process = function (_widget) {
|
var process = function (_widget) {
|
||||||
// Create the attribtues
|
// Create the attribtues
|
||||||
var hasAttr = false;
|
var hasAttr = false;
|
||||||
@ -230,11 +230,11 @@ var et2_nextmatch_rowProvider = /** @class */ (function () {
|
|||||||
for (var key in _widget.attributes) {
|
for (var key in _widget.attributes) {
|
||||||
if (!_widget.attributes[key].ignore &&
|
if (!_widget.attributes[key].ignore &&
|
||||||
typeof _widget.options[key] != "undefined") {
|
typeof _widget.options[key] != "undefined") {
|
||||||
var val = _widget.options[key];
|
var val = _widget.options[key];
|
||||||
// TODO: Improve detection
|
// TODO: Improve detection
|
||||||
if (typeof val == "string" && val.indexOf("$") >= 0) {
|
if (typeof val == "string" && val.indexOf("$") >= 0) {
|
||||||
hasAttr = true;
|
hasAttr = true;
|
||||||
widgetData.data.push({
|
widgetData.data.push({
|
||||||
"attribute": key,
|
"attribute": key,
|
||||||
"expression": val
|
"expression": val
|
||||||
});
|
});
|
||||||
@ -247,26 +247,26 @@ var et2_nextmatch_rowProvider = /** @class */ (function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
// Check each column
|
// Check each column
|
||||||
var columns = _widget.getChildren();
|
var columns = _widget._widgets;
|
||||||
for (var i = 0; i < columns.length; i++) {
|
for (var i = 0; i < columns.length; i++) {
|
||||||
// If column is hidden, don't process it
|
// If column is hidden, don't process it
|
||||||
if (this._context && this._context.columns && this._context.columns[i] && !this._context.columns[i].visible) {
|
if (typeof columns[i] === 'undefined' || this._context && this._context.columns && this._context.columns[i] && !this._context.columns[i].visible) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
columns[i].iterateOver(process, this);
|
columns[i].iterateOver(process, this);
|
||||||
}
|
}
|
||||||
return variableAttributes;
|
return variableAttributes;
|
||||||
};
|
};
|
||||||
et2_nextmatch_rowProvider.prototype._seperateWidgets = function (_varAttrs) {
|
et2_nextmatch_rowProvider.prototype._seperateWidgets = function (_varAttrs) {
|
||||||
// The detachable array contains all widgets which implement the
|
// The detachable array contains all widgets which implement the
|
||||||
// et2_IDetachedDOM interface for all needed attributes
|
// et2_IDetachedDOM interface for all needed attributes
|
||||||
var detachable = [];
|
var detachable = [];
|
||||||
// The remaining array creates all widgets which have to be completely
|
// The remaining array creates all widgets which have to be completely
|
||||||
// cloned when the widget tree is created
|
// cloned when the widget tree is created
|
||||||
var remaining = [];
|
var remaining = [];
|
||||||
// Iterate over the widgets
|
// Iterate over the widgets
|
||||||
for (var i = 0; i < _varAttrs.length; i++) {
|
for (var i = 0; i < _varAttrs.length; i++) {
|
||||||
var widget = _varAttrs[i].widget;
|
var widget = _varAttrs[i].widget;
|
||||||
// Check whether the widget parents are not allready in the "remaining"
|
// Check whether the widget parents are not allready in the "remaining"
|
||||||
// slot - if this is the case do not include the widget at all.
|
// slot - if this is the case do not include the widget at all.
|
||||||
var insertWidget = true;
|
var insertWidget = true;
|
||||||
@ -490,8 +490,8 @@ var et2_nextmatch_rowWidget = /** @class */ (function (_super) {
|
|||||||
this._row.childNodes[row_id].align = this._widgets[i].align;
|
this._row.childNodes[row_id].align = this._widgets[i].align;
|
||||||
}
|
}
|
||||||
row_id++;
|
row_id++;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Returns the column node for the given sender
|
* Returns the column node for the given sender
|
||||||
*
|
*
|
||||||
|
@ -297,11 +297,11 @@ export class et2_nextmatch_rowProvider
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Check each column
|
// Check each column
|
||||||
const columns = _widget.getChildren();
|
const columns = _widget._widgets;
|
||||||
for (var i = 0; i < columns.length; i++)
|
for (var i = 0; i < columns.length; i++)
|
||||||
{
|
{
|
||||||
// If column is hidden, don't process it
|
// If column is hidden, don't process it
|
||||||
if(this._context && this._context.columns && this._context.columns[i] && !this._context.columns[i].visible)
|
if(typeof columns[i] === 'undefined' || this._context && this._context.columns && this._context.columns[i] && !this._context.columns[i].visible)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user