From: Michal Vaner Date: Tue, 26 Aug 2008 21:04:18 +0000 (+0200) Subject: Make the 'name' column bigger X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=7eff514a9a67dc42b3cb69b7706d6124780439ed;p=pciids.git Make the 'name' column bigger And make description smaller, it is not used so often and isn't that important. --- diff --git a/PciIds/Html/List.pm b/PciIds/Html/List.pm index 4e1cdc6..2e08e2d 100644 --- a/PciIds/Html/List.pm +++ b/PciIds/Html/List.pm @@ -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', [ 'Id', 'Name', 'Description' ] ); + genTableHead( 'subnodes', [ 'Id', 'Name', 'Description' ], [ 'id-col', 'name-col', 'desc-col' ] ); $args->{'restrict'} = $address->defaultRestrict() unless( defined( $args->{'restrict'} ) ); $tables->nodes( $address->get(), $args ); genTableTail(); diff --git a/PciIds/Html/Util.pm b/PciIds/Html/Util.pm index 1bda66d..54d1935 100644 --- a/PciIds/Html/Util.pm +++ b/PciIds/Html/Util.pm @@ -68,13 +68,16 @@ sub genMenu( $$$ ) { genCustomMenu( $address, $args, \@list ); } -sub genTableHead( $$ ) { - my( $class, $captions ) = @_; - print ''; +sub genTableHead( $$$ ) { + my( $class, $captions, $cols ) = @_; + print '
'; + foreach( @{$cols} ) { + print "\n"; + } + print "\n"; foreach( @{$captions} ) { - print ''; } sub genTableTail() { diff --git a/static/print.css b/static/print.css index 2f718ec..4da8f26 100644 --- a/static/print.css +++ b/static/print.css @@ -25,3 +25,16 @@ border-bottom: dotted; border-bottom-width: 1px; } +table.subnodes +{ + width: 99%; + table-layout: fixed; +} +col.id-col +{ + width: 3em; +} +col.name-col +{ + width: 60%; +} diff --git a/static/screen.css b/static/screen.css index e8e66a0..5811898 100644 --- a/static/screen.css +++ b/static/screen.css @@ -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%; +}
'.$_; + print ''.$_."\n"; } - print '