Hi,

The table labeling of odd and even actually begins with "odd", as it is the "first" row. This became apparent as when you drag a row to a new location, the draggable JS reassigns the row classes.

This patch simply modulates on $count + 1, as arrays are 0 indexed but the table rows should "start" at 1.

=== modified file 'sites/all/modules/weight/weight-view-weight-form.tpl.php'
--- sites/all/modules/weight/weight-view-weight-form.tpl.php 2011-05-16 17:20:32 +0000
+++ sites/all/modules/weight/weight-view-weight-form.tpl.php 2011-05-17 21:27:20 +0000
@@ -21,7 +21,7 @@

if (count($rows)):
foreach ($rows as $count => $row):
-
print ($count % 2 == 0) ? 'even' : 'odd'; draggable">
+
print (($count + 1) % 2 == 0) ? 'even' : 'odd'; draggable">
foreach ($row as $field => $content): print isset($fields[$field]) ? $fields[$field] : '' ">
print $content;

Comments

davisben’s picture

Status: Active » Fixed

This has been applied and committed to 6.x and 7.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.