use explicit odd/even classes since some browsers don't support css3 odd/even selector
authorBill Erickson <berick@esilibrary.com>
Wed, 19 Jan 2011 18:17:48 +0000 (13:17 -0500)
committerBill Erickson <berick@esilibrary.com>
Wed, 19 Jan 2011 18:17:48 +0000 (13:17 -0500)
Open-ILS/web/templates/default/opac/results.tt2

index f862973..a0e13a8 100644 (file)
@@ -6,6 +6,7 @@
     #record_table { border-collapse: collapse; width:100%; }
     #record_table td { padding: 3px; border-bottom: 1px solid #ddd; }
     #record_table tr:nth-child(odd) { background-color:#ded; }
+    .record-table-odd { background-color:#ded; }
     #form_div { text-align: center; width: 100%; margin-top: 10px;}
     #links_div { margin-bottom: 10px; padding: 5px;}
 </style>
@@ -78,7 +79,7 @@
                     attrs = {marc_xml => rec.marc_xml};
                     PROCESS get_marc_attrs args=attrs;
                 %]
-                <tr>
+                <tr [% IF loop.count % 2 == 1 %] class='record-table-odd' [% END %]>
                     <td style='width:52px;height:72px'>
                         [% IF attrs.isbn %]
                         <img width='50' height='70' src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% attrs.isbn_clean || attrs.upc %]'/>