fixed the behavior of the right and last arrows,

added the parm 'no_cat' to disable the cats-selection
This commit is contained in:
Ralf Becker 2002-09-22 09:30:29 +00:00
parent f6e5990487
commit b98f9f2978

View File

@ -47,6 +47,10 @@
$value['template'] = $cell['size']; $value['template'] = $cell['size'];
} }
$nextmatch = new etemplate('etemplate.nextmatch_widget'); $nextmatch = new etemplate('etemplate.nextmatch_widget');
if ($value['no_cat'])
{
$nextmatch->disable_cells('cat_id');
}
if ($value['no_filter']) if ($value['no_filter'])
{ {
$nextmatch->disable_cells('filter'); $nextmatch->disable_cells('filter');
@ -103,12 +107,17 @@
} }
elseif ($value['left']) elseif ($value['left'])
{ {
$value['start'] -= $max; $value['start'] = $old_value['start'] - $max;
$templ->loop = True; $templ->loop = True;
} }
elseif ($value['right']) elseif ($value['right'])
{ {
$value['start'] = $old_value['total'] / $max * $max; $value['start'] = $old_value['start'] + $max;
$templ->loop = True;
}
elseif ($value['last'])
{
$value['start'] = (int) (($old_value['total']-2) / $max) * $max;
$templ->loop = True; $templ->loop = True;
} }
return True; return True;