From 6ad53d62ee700cbb2f0dd2f3625b1d2ed01f452e Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 2 Nov 2003 17:20:47 +0000 Subject: [PATCH] added parameter to alternate_row_color to return class-name instead of a color-value --- phpgwapi/inc/class.nextmatchs.inc.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/phpgwapi/inc/class.nextmatchs.inc.php b/phpgwapi/inc/class.nextmatchs.inc.php index ef5b45ccb1..46714d31e1 100644 --- a/phpgwapi/inc/class.nextmatchs.inc.php +++ b/phpgwapi/inc/class.nextmatchs.inc.php @@ -678,8 +678,9 @@ @function alternate_row_color @abstract alternate row colour @param $currentcolor default '' + @param $do_class boolean default False return the color-value or just the class-name */ - function alternate_row_color($currentcolor = '') + function alternate_row_color($currentcolor = '',$do_class=False) { if (! $currentcolor) { @@ -688,14 +689,14 @@ if ($currentcolor == $GLOBALS['phpgw_info']['theme']['row_on']) { - $GLOBALS['tr_color'] = $GLOBALS['phpgw_info']['theme']['row_off']; + $GLOBALS['tr_color'] = $GLOBALS['phpgw_info']['theme'][$class='row_off']; } else { - $GLOBALS['tr_color'] = $GLOBALS['phpgw_info']['theme']['row_on']; + $GLOBALS['tr_color'] = $GLOBALS['phpgw_info']['theme'][$class='row_on']; } - return $GLOBALS['tr_color']; + return $do_class ? $class : $GLOBALS['tr_color']; } // If you are using the common bgcolor="{tr_color}"