From 702d59ca69cf280618565911fa365d44dfae8be9 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 17 Mar 2007 19:36:03 +0000 Subject: [PATCH] r1479: Remove the need for $stylevar[alt_color] by using the altcolor CSS class by changing the values swapped when calculating rows and using trackerhome_bits.tpl --- explain.php | 4 ++-- favorite.php | 2 +- index.php | 2 +- search.php | 2 +- showhistory.php | 2 +- templates/trackerhome_bits.tpl | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/explain.php b/explain.php index 4ccf0b0..f396e9d 100644 --- a/explain.php +++ b/explain.php @@ -79,7 +79,7 @@ if ($_REQUEST['do'] == 'products') { $left = $product['title']; $right = $product['description']; - $trextra = ' style="background-color: ' . $stylevar['alt_color'] . '"'; + $trextra = ' class="altcolor"'; eval('$productlist .= "' . $template->fetch('explain_row') . '";'); if (is_array($components["$product[productid]"])) @@ -130,7 +130,7 @@ if ($_REQUEST['do'] == 'automations') { $left = _('Add Comment'); $right = $automation['comment']; - $trextra = ' style="background-color: ' . $stylevar['alt_color'] . '"'; + $trextra = ' class="altcolor"'; eval('$automations .= "' . $template->fetch('explain_row') . '";'); } diff --git a/favorite.php b/favorite.php index 65717f9..0f2c73d 100644 --- a/favorite.php +++ b/favorite.php @@ -93,7 +93,7 @@ if ($_REQUEST['do'] == 'manage') while ($bug = $db->fetch_array($favorites)) { - $funct->exec_swap_bg($stylevar['alt_color'], ''); + $funct->exec_swap_bg('altcolor', ''); ProcessBugDataForDisplay(&$bug, $funct->bgcolour); $bugs .= $sort->constructRow($bug); } diff --git a/index.php b/index.php index d501d38..a314ded 100644 --- a/index.php +++ b/index.php @@ -64,7 +64,7 @@ $bugs_fetch = $db->query($sort->fetch_sql_query(null, $pagination->fetchLimit($p while ($bug = $db->fetch_array($bugs_fetch)) { - $funct->exec_swap_bg($stylevar['alt_color'], ''); + $funct->exec_swap_bg('altcolor', ''); ProcessBugDataForDisplay(&$bug, $funct->bgcolour); $bugs .= $sort->constructRow($bug); } diff --git a/search.php b/search.php index 5f2ceb9..8922947 100644 --- a/search.php +++ b/search.php @@ -695,7 +695,7 @@ if ($_POST['do'] == 'results') $search = $db->query("SELECT * FROM " . TABLE_PREFIX . "bug WHERE bugid IN ($search[ids]) $search[orderby] LIMIT " . $pagination->fetchLimit($pagination->getPage() - 1) . ", " . $pagination->getPerPage()); while ($bug = $db->fetch_array($search)) { - $funct->exec_swap_bg($stylevar['alt_color'], ''); + $funct->exec_swap_bg('altcolor', ''); ProcessBugDataForDisplay(&$bug, $funct->bgcolour); $bugs .= $sort->constructRow($bug, "&hilight=$hilight"); } diff --git a/showhistory.php b/showhistory.php index cc3c2db..f79f88e 100644 --- a/showhistory.php +++ b/showhistory.php @@ -100,7 +100,7 @@ foreach ($logs AS $dateline => $logitems) continue; } - $funct->exec_swap_bg('', $stylevar['alt_color']); + $funct->exec_swap_bg('', 'altcolor'); $bgcolor = $funct->bgcolour; if (preg_match('#^(comment|attachment)\.(.*)#', $log['field'], $matches)) diff --git a/templates/trackerhome_bits.tpl b/templates/trackerhome_bits.tpl index e0317c8..5ec5db5 100644 --- a/templates/trackerhome_bits.tpl +++ b/templates/trackerhome_bits.tpl @@ -1,6 +1,6 @@ - style="background-color: $bug[bgcolor]; font-style: italic"> + style="background-color: $bug[bgcolor]; font-style: italic" class="$bug[bgcolor]" style="font-style: italic"> $fields -- 2.43.5