- Added some stuff to MANIFEST.SKIP
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Producer / HTML.pm
index 9c53044..87c399d 100644 (file)
@@ -1,7 +1,7 @@
 package SQL::Translator::Producer::HTML;
 
 # -------------------------------------------------------------------
-# $Id: HTML.pm,v 1.12 2004-02-11 21:28:53 kycl4rk Exp $
+# $Id$
 # -------------------------------------------------------------------
 # Copyright (C) 2002-4 SQLFairy Authors
 #
@@ -24,7 +24,7 @@ use strict;
 use Data::Dumper;
 use vars qw($VERSION $NOWRAP $NOLINKTABLE $NAME);
 
-$VERSION = sprintf "%d.%02d", q$Revision: 1.12 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/;
 $NAME = join ', ', __PACKAGE__, $VERSION;
 $NOWRAP = 0 unless defined $NOWRAP;
 $NOLINKTABLE = 0 unless defined $NOLINKTABLE;
@@ -68,7 +68,7 @@ sub produce {
                 -title => $title,
                 %stylesheet,
                 -meta => { generator => $NAME },
-            });
+            }),
             $q->h1({ -class => 'SchemaDescription' }, $title),
             $q->hr;
     }
@@ -95,7 +95,7 @@ sub produce {
                 ),
             );
 
-        for my $table (sort @table_names) {
+        for my $table (@table_names) {
             my $table_name = $table->name;
             push @html, 
                 $q->comment("Start link to table '$table_name'"),
@@ -150,6 +150,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 +174,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),