mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
Better handling for disabled columns.
Disabled grid columns don't create widgets, which caused the nm issues as it expected a widget in each cell.
This commit is contained in:
parent
591bb48410
commit
3b65d807ba
@ -579,6 +579,12 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput],
|
||||
RowLoop:
|
||||
for(var i = 0; i < _row.length; i++)
|
||||
{
|
||||
if(_row[i].disabled)
|
||||
{
|
||||
_colData[i].disabled = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Customfields needs special processing
|
||||
if(_row[i].widget.instanceOf(et2_nextmatch_customfields))
|
||||
{
|
||||
@ -692,6 +698,17 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput],
|
||||
},
|
||||
|
||||
_parseHeaderRow: function(_row, _colData) {
|
||||
|
||||
// Make sure there's a widget - cols disabled in template can be missing them, and the header really likes to have a widget
|
||||
|
||||
for (var x = 0; x < _row.length; x++)
|
||||
{
|
||||
if(!_row[x].widget)
|
||||
{
|
||||
_row[x].widget = et2_createWidget("label");
|
||||
}
|
||||
}
|
||||
|
||||
// Get column display preference
|
||||
this._applyUserPreferences(_row, _colData);
|
||||
|
||||
|
@ -547,6 +547,9 @@ var et2_nextmatch_rowWidget = et2_widget.extend(et2_IDOMNode,
|
||||
this._widgets = new Array(_widgets.length);
|
||||
for (var i = 0; i < _widgets.length; i++)
|
||||
{
|
||||
// Disabled columns might be missing widget - skip it
|
||||
if(!_widgets[i]) continue;
|
||||
|
||||
this._widgets[i] = _widgets[i].clone(this);
|
||||
this._widgets[i].loadingFinished();
|
||||
// Set column alignment from widget
|
||||
|
Loading…
Reference in New Issue
Block a user