mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 00:58:56 +01:00
Fix grid auto-repeat. It's always the last row that repeats, if there's data
This commit is contained in:
parent
caa76a3235
commit
8a1386ecdb
@ -127,7 +127,7 @@ class etemplate_new extends etemplate_widget_template
|
||||
self::$request->changes = $changes;
|
||||
self::$request->sel_options = $sel_options ? $sel_options : array();
|
||||
self::$request->readonlys = $readonlys ? $readonlys : array();
|
||||
self::$request->preserv = $preserv ? $preserve : array();
|
||||
self::$request->preserv = $preserv ? $preserv : array();
|
||||
self::$request->method = $method;
|
||||
self::$request->ignore_validation = $ignore_validation;
|
||||
self::$request->app_header = $GLOBALS['egw_info']['flags']['app_header'];
|
||||
|
@ -192,11 +192,11 @@ var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM, et2_IAligned], {
|
||||
|
||||
// Add in repeated rows
|
||||
// TODO: It would be nice if we could skip header (thead) & footer (tfoot) or treat them separately
|
||||
var rowIndex = 0;
|
||||
if(this.getArrayMgr("content"))
|
||||
{
|
||||
var content = this.getArrayMgr("content");
|
||||
var rowDataEntry = rowData[rowData.length-1];
|
||||
var rowIndex = rowData.length-1;
|
||||
// Find out if we have any content rows, and how many
|
||||
while(true)
|
||||
{
|
||||
@ -206,11 +206,6 @@ var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM, et2_IAligned], {
|
||||
|
||||
rowIndex++;
|
||||
}
|
||||
else if (rowIndex == 0)
|
||||
{
|
||||
// Sometimes the header takes a row, so try at 1
|
||||
rowIndex++;
|
||||
}
|
||||
else
|
||||
{
|
||||
// No more rows, stop
|
||||
@ -218,7 +213,7 @@ var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM, et2_IAligned], {
|
||||
}
|
||||
}
|
||||
}
|
||||
if(rowIndex <= 1)
|
||||
if(rowIndex <= rowData.length - 1)
|
||||
{
|
||||
// No auto-repeat
|
||||
this.lastRowNode = null;
|
||||
|
Loading…
Reference in New Issue
Block a user