Move tables elements to top
authorJamie Cameron <jcameron@webmin.com>
Thu, 5 Jun 2008 23:39:24 +0000 (23:39 +0000)
committerJamie Cameron <jcameron@webmin.com>
Thu, 5 Jun 2008 23:39:24 +0000 (23:39 +0000)
ui-lib.pl

index be04d62..af4654b 100644 (file)
--- a/ui-lib.pl
+++ b/ui-lib.pl
@@ -204,20 +204,20 @@ if ($emptymsg && !@$data) {
        }
 
 # Are there any checkboxes in each column? If so, make those columns narrow
-local @tds = ( );
+local @tds = map { "valign=top" } @$heads;
 local $maxwidth = 0;
 foreach my $r (@$data) {
        local $cc = 0;
        foreach my $c (@$r) {
                if (ref($c) &&
                    ($c->{'type'} eq 'checkbox' || $c->{'type'} eq 'radio')) {
-                       $tds[$cc] = "width=5";
+                       $tds[$cc] .= " width=5";
                        }
                $cc++;
                }
        $maxwidth = $cc if ($cc > $maxwidth);
        }
-$rv .= &ui_columns_start($heads, $width, $noborder, \@tds, $title);
+$rv .= &ui_columns_start($heads, $width, 0, \@tds, $title);
 
 # Add the data rows
 foreach my $r (@$data) {