Fix tests!
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Producer / HTML.pm
index 5e61cec..8936f65 100644 (file)
@@ -1,9 +1,9 @@
 package SQL::Translator::Producer::HTML;
 
 # -------------------------------------------------------------------
-# $Id: HTML.pm,v 1.14 2004-03-10 22:52:17 kycl4rk Exp $
+# $Id$
 # -------------------------------------------------------------------
-# Copyright (C) 2002-4 SQLFairy Authors
+# Copyright (C) 2002-2009 SQLFairy Authors
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License as
@@ -22,10 +22,9 @@ package SQL::Translator::Producer::HTML;
 
 use strict;
 use Data::Dumper;
-use vars qw($VERSION $NOWRAP $NOLINKTABLE $NAME);
+use vars qw($NOWRAP $NOLINKTABLE $NAME);
 
-$VERSION = sprintf "%d.%02d", q$Revision: 1.14 $ =~ /(\d+)\.(\d+)/;
-$NAME = join ', ', __PACKAGE__, $VERSION;
+$NAME = __PACKAGE__;
 $NOWRAP = 0 unless defined $NOWRAP;
 $NOLINKTABLE = 0 unless defined $NOLINKTABLE;
 
@@ -150,6 +149,7 @@ sub produce {
                     ) 
                 );
 
+        my $i = 0;
         for my $field ( @fields ) {
             my $name      = $field->name      || '';
                $name      = qq[<a name="$table_name-$name">$name</a>];
@@ -173,8 +173,10 @@ sub produce {
             push @other, 'UNIQUE'      if $field->is_unique;
             push @other, 'NOT NULL'    unless $field->is_nullable;
             push @other, $comment      if $comment;
+            my $class = $i++ % 2 ? 'even' : 'odd';
             push @html,
                 $q->Tr(
+                    { -class => "tr-$class" },
                     $q->td({ -class => "FieldCellName" }, $name),
                     $q->td({ -class => "FieldCellType" }, $data_type),
                     $q->td({ -class => "FieldCellSize" }, $size),