mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 09:05:16 +01:00
Fix grid with auto-repeat rows
This commit is contained in:
parent
6e30816758
commit
da42c28e57
@ -377,6 +377,13 @@ var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM, et2_IAligned],
|
||||
var y = 0;
|
||||
var x = 0;
|
||||
var readRowNode;
|
||||
var nm = false;
|
||||
var widget = this;
|
||||
while(!nm && widget != this.getRoot())
|
||||
{
|
||||
nm = (widget._type == 'nextmatch');
|
||||
widget = widget.getParent();
|
||||
}
|
||||
et2_filteredNodeIterator(rows, function(node, nodeName) {
|
||||
|
||||
readRowNode = function _readRowNode(node, nodeName) {
|
||||
@ -427,6 +434,26 @@ var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM, et2_IAligned],
|
||||
// Create the element
|
||||
if(!cell.disabled)
|
||||
{
|
||||
//Skip if it is a nextmatch while the nextmatch handles row adjustment by itself
|
||||
if(!nm)
|
||||
{
|
||||
// Adjust for the row
|
||||
var mgrs = this.getArrayMgrs();
|
||||
for(var name in mgrs)
|
||||
{
|
||||
this.getArrayMgr(name).perspectiveData.row = y;
|
||||
}
|
||||
if(this._getCell(cells, x, y).rowData.id)
|
||||
{
|
||||
this._getCell(cells, x, y).rowData.id = this.getArrayMgr("content").expandName(this._getCell(cells, x, y).rowData.id);
|
||||
}
|
||||
if(this._getCell(cells, x, y).rowData.class)
|
||||
{
|
||||
this._getCell(cells, x, y).rowData.class = this.getArrayMgr("content").expandName(this._getCell(cells, x, y).rowData.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var widget = this.createElementFromNode(node, nodeName);
|
||||
}
|
||||
|
||||
@ -487,20 +514,6 @@ var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM, et2_IAligned],
|
||||
// Extra content rows
|
||||
for(y; y < h; y++) {
|
||||
var x = 0;
|
||||
// Adjust for the row
|
||||
var mgrs = this.getArrayMgrs();
|
||||
for(var name in mgrs)
|
||||
{
|
||||
this.getArrayMgr(name).perspectiveData.row = y;
|
||||
}
|
||||
if(this._getCell(cells, x, y).rowData.id)
|
||||
{
|
||||
this._getCell(cells, x, y).rowData.id = this.getArrayMgr("content").expandName(this._getCell(cells, x, y).rowData.id);
|
||||
}
|
||||
if(this._getCell(cells, x, y).rowData.class)
|
||||
{
|
||||
this._getCell(cells, x, y).rowData.class = this.getArrayMgr("content").expandName(this._getCell(cells, x, y).rowData.class);
|
||||
}
|
||||
|
||||
et2_filteredNodeIterator(this.lastRowNode, readRowNode, this);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user