]> mj.ucw.cz Git - pciids.git/commitdiff
Make the 'name' column bigger
authorMichal Vaner <vorner@ucw.cz>
Tue, 26 Aug 2008 21:04:18 +0000 (23:04 +0200)
committerMichal Vaner <vorner@ucw.cz>
Tue, 26 Aug 2008 21:04:18 +0000 (23:04 +0200)
And make description smaller, it is not used so often and isn't that
important.

PciIds/Html/List.pm
PciIds/Html/Util.pm
static/print.css
static/screen.css

index 4e1cdc60a64f15aad4258beadacd535e140e2458..2e08e2dc9b37346778f0fd932818e909fd9a132e 100644 (file)
@@ -69,7 +69,7 @@ sub list( $$$$ ) {
                my $url = '/read/'.$address->get().buildExcept( 'sort', $args );
                my $sort = ( $args->{'sort'} or 'id' );
                my( $sort_id, $sort_name ) = ( ( $sort eq 'id' ? 'rid' : 'id' ), ( $sort eq 'name' ? 'rname' : 'name' ) );
-               genTableHead( 'subnodes', [ '<a href="'.$url.'?sort='.$sort_id.'">Id</a>', '<a href="'.$url.'?sort='.$sort_name.'">Name</a>', 'Description' ] );
+               genTableHead( 'subnodes', [ '<a href="'.$url.'?sort='.$sort_id.'">Id</a>', '<a href="'.$url.'?sort='.$sort_name.'">Name</a>', 'Description' ], [ 'id-col', 'name-col', 'desc-col' ] );
                $args->{'restrict'} = $address->defaultRestrict() unless( defined( $args->{'restrict'} ) );
                $tables->nodes( $address->get(), $args );
                genTableTail();
index 1bda66d5804143d03bbc73560b4ee305ebd5a964..54d1935572e0a8bcc27523754859b12b549ae21e 100644 (file)
@@ -68,13 +68,16 @@ sub genMenu( $$$ ) {
        genCustomMenu( $address, $args, \@list );
 }
 
-sub genTableHead( $$ ) {
-       my( $class, $captions ) = @_;
-       print '<table class="'.$class.'"><tr>';
+sub genTableHead( $$$ ) {
+       my( $class, $captions, $cols ) = @_;
+       print '<table class="'.$class.'">';
+       foreach( @{$cols} ) {
+               print "<col class='$_'>\n";
+       }
+       print "<tr>\n";
        foreach( @{$captions} ) {
-               print '<th>'.$_;
+               print '<th>'.$_."\n";
        }
-       print '</tr>';
 }
 
 sub genTableTail() {
index 2f718ecb59e21696a83bea1b5d01e7394723c9f0..4da8f267ce9705226f9f79e12eed865f29bc3dbe 100644 (file)
        border-bottom: dotted;
        border-bottom-width: 1px;
 }
+table.subnodes
+{
+       width: 99%;
+       table-layout: fixed;
+}
+col.id-col
+{
+       width: 3em;
+}
+col.name-col
+{
+       width: 60%;
+}
index e8e66a065067db0d4a8cdeeff0c39f4b4e721154..58118980113bd1f51c5aaa69f59e35fd551b8a14 100644 (file)
@@ -43,3 +43,16 @@ body
 {
        list-style-type: none;
 }
+table.subnodes
+{
+       width: 99%;
+       table-layout: fixed;
+}
+col.id-col
+{
+       width: 3em;
+}
+col.name-col
+{
+       width: 60%;
+}