mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-01 04:13:28 +01:00
"fix nm widget to deal with same header in multiple columns (eg. InfoLog's 2 time columns)"
This commit is contained in:
parent
d8c99b809e
commit
7d92143b11
@ -570,21 +570,14 @@ class nextmatch_widget
|
||||
$cols['__content__'] =& $content;
|
||||
$tmpl->widget_tree_walk(array($this,'_cols_from_tpl_walker'),$cols);
|
||||
unset($cols['__content__']);
|
||||
$name2col = is_array($cols['name2col']) ? $cols['name2col'] : array(); unset($cols['name2col']);
|
||||
$col2names = is_array($cols['col2names']) ? $cols['col2names'] : array(); unset($cols['col2names']);
|
||||
//_debug_array($col2names);
|
||||
//_debug_array($cols);
|
||||
foreach($cols as $name => $label)
|
||||
{
|
||||
if (!$label) unset($cols[$name]);
|
||||
}
|
||||
//_debug_array($cols);
|
||||
//_debug_array($name2col);
|
||||
// now we check if a column of the grid has more then one header
|
||||
$col2names = array();
|
||||
foreach($name2col as $name => $col)
|
||||
{
|
||||
if ($name != $col) $col2names[$col][] = $name;
|
||||
}
|
||||
//_debug_array($col2names);
|
||||
$cols2 = $cols;
|
||||
$cols = array();
|
||||
foreach($cols2 as $name => $label)
|
||||
@ -667,10 +660,9 @@ class nextmatch_widget
|
||||
elseif (strpos($cols[$col],$label) === false)
|
||||
{
|
||||
$cols[$col] .= ($cols[$col] ? ', ' : '').$label;
|
||||
$cols['name2col'][$col] = $col;
|
||||
}
|
||||
}
|
||||
$cols['name2col'][$widget['name']] = $col;
|
||||
$cols['col2names'][$col][] = $widget['name'];
|
||||
|
||||
//echo "<p>$path: $widget[name] $label</p>\n";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user