The most common approach to alternating the background color of rows is to apply an even or odd class as the rows are being generated. In the browse.php file you can find where the "rows" are generated (actually they are div's) and see that a for loop is used with a counter of $browseRow. So within that code I made the changes you can see below. Basically added a string variable named $rowClass setting it to 'odd' initially. Then take the $browseRow and get the modulus with 2, if 0 then the row is 'even'. Add the $rowClass string within the div definition next to the 'nuUnselectedRow' class. Now you can create a Style under Setup for '.even' and '.odd' to set the background-color to the value you want. To ensure the style change takes affect you may want to include "!important" with the color value.
Code: Select all
$left = 0;
$top = $top + $this->rowHeight;
$rowClass = 'odd';
if ($browseRow % 2 == 0) {
$rowClass = 'even';
}
for($i = 0 ; $i < count($this->Column) ; $i++){
$w = $this->Column[$i]->sbr_width;
$a = align($this->Column[$i]->sbr_align);
$s = $s . "$this->TAB<div onmouseover='MIN($param)' onmouseout='MOUT($param)' onclick='doIt($theID)' class='nuUnselectedRow $rowClass' id='$rowname$i' style='position:absolute;overflow:hidden;$cur;text-align:$a;top:$top"."px;left:$left"."px;width:$w"."px;height:$this->rowHeight"."px'>$this->CRLF";