mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
"nextmatch filter- or sort-headers can now made to nextmatch-headers (label only), by making them readonly"
This commit is contained in:
parent
8a0060add1
commit
f64c51778b
@ -189,13 +189,13 @@ class nextmatch_widget
|
|||||||
|
|
||||||
case 'nextmatch-sortheader': // Option: default sort: ASC(default) or DESC
|
case 'nextmatch-sortheader': // Option: default sort: ASC(default) or DESC
|
||||||
$extension_data['default_sort'] = $cell['size']&&preg_match('/^(ASC|DESC)/i',$cell['size'],$matches) ? strtoupper($matches[1]) : 'ASC';
|
$extension_data['default_sort'] = $cell['size']&&preg_match('/^(ASC|DESC)/i',$cell['size'],$matches) ? strtoupper($matches[1]) : 'ASC';
|
||||||
$cell['type'] = 'button';
|
$cell['type'] = $cell['readonly'] ? 'label' : 'button';
|
||||||
$cell['onchange'] = True;
|
$cell['onchange'] = True;
|
||||||
if (!$cell['help'])
|
if (!$cell['help'])
|
||||||
{
|
{
|
||||||
$cell['help'] = 'click to order after that criteria';
|
$cell['help'] = 'click to order after that criteria';
|
||||||
}
|
}
|
||||||
if (self::last_part($name) == $nm_global['order']) // we're the active column
|
if (self::last_part($name) == $nm_global['order'] && !$cell['readonly']) // we're the active column
|
||||||
{
|
{
|
||||||
$sorting = $cell;
|
$sorting = $cell;
|
||||||
unset($sorting['align']);
|
unset($sorting['align']);
|
||||||
@ -531,12 +531,14 @@ class nextmatch_widget
|
|||||||
'sel_options' => $field['values'],
|
'sel_options' => $field['values'],
|
||||||
'size' => $field['label'],
|
'size' => $field['label'],
|
||||||
'no_lang' => True,
|
'no_lang' => True,
|
||||||
|
'readonly' => $cell['readonly'],
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$header =& etemplate::empty_cell('nextmatch-sortheader',self::CF_PREFIX.$name,array(
|
$header =& etemplate::empty_cell('nextmatch-sortheader',self::CF_PREFIX.$name,array(
|
||||||
'label' => $field['label'],
|
'label' => $field['label'],
|
||||||
|
'readonly' => $cell['readonly'],
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
etemplate::add_child($cell,$header);
|
etemplate::add_child($cell,$header);
|
||||||
|
Loading…
Reference in New Issue
Block a user