diff options
author | Yorhel <git@yorhel.nl> | 2010-12-09 19:21:59 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2010-12-09 19:21:59 +0100 |
commit | 14bf96d3f0868cb18489fd559be129f7e5f55f9f (patch) | |
tree | d2eacdac113cf7eff7767b30e788692673d2bffd | |
parent | eacb0299a5b6124e36a7eed8a51e8b8c18b20ddf (diff) |
Removed expand/collapse from history browser switched to a combined view
Much less screen space wasted this way.
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | data/script.js | 3 | ||||
-rw-r--r-- | data/style.css | 30 | ||||
-rw-r--r-- | lib/VNDB/Util/BrowseHTML.pm | 14 |
4 files changed, 18 insertions, 30 deletions
@@ -1,4 +1,5 @@ 2.14 - ? + - Removed expand/collapse from history browser switched to a combined view - API: Allow extra whitespace after "get .." command - API: Allow non-numbers as "clientver" for the login command - API: Added "image_nsfw" member to "get vn" diff --git a/data/script.js b/data/script.js index 609db8da..f61ea0a4 100644 --- a/data/script.js +++ b/data/script.js @@ -2215,7 +2215,7 @@ if(byId('batchedit')) { }; } -// expand/collapse listings (/*/hist, /u+/posts) +// expand/collapse listings (/u+/posts) if(byId('expandlist')) { var lnk = byId('expandlist'); setexpand = function() { @@ -2230,6 +2230,7 @@ if(byId('expandlist')) { }; setexpand(); lnk.onclick = function () { + // cookie isn't correctly named now that it's not used for edit histories anymore setCookie('histexpand', getCookie('histexpand') == 1 ? 0 : 1); setexpand(); return false; diff --git a/data/style.css b/data/style.css index c1c70a08..37ab54ac 100644 --- a/data/style.css +++ b/data/style.css @@ -478,25 +478,14 @@ p#searchtabs a:hover, p#searchtabs a.sel { #q { width: 350px } /* history browser */ -div.mainbox.history td.tc1_1 { - padding-left: 0; - padding-right: 0; - text-align: right; - width: 60px; -} -div.mainbox.history td.tc1_2 { - padding-left: 0; - width: 25px; -} -div.mainbox.history td.tc2 { width: 65px; } -div.mainbox.history td.tc3 { width: 90px } -tr.msgsum td { - color: $grayedout$; - padding-top: 0; - text-align: right; -} -a#expandlist { float: right } -a#expandlist:hover { border-bottom: none } +div.history table { table-layout: fixed } +div.history td { white-space: nowrap } +div.history td.tc1_1 { width: 60px; padding-left: 0; padding-right: 0; text-align: right } +div.history td.tc1_2 { width: 25px; padding-left: 0 } +div.history td.tc2 { width: 65px } +div.history td.tc3 { width: 90px } +div.history td.tc4 { overflow: hidden } +div.history td.tc4 b { margin-left: 10px } @@ -957,6 +946,9 @@ div.browse.uposts td.tc1 { } .uposts td.tc3 { width: 65px; } +a#expandlist { float: right } +a#expandlist:hover { border-bottom: none } + diff --git a/lib/VNDB/Util/BrowseHTML.pm b/lib/VNDB/Util/BrowseHTML.pm index cc296cc7..d4c7c84e 100644 --- a/lib/VNDB/Util/BrowseHTML.pm +++ b/lib/VNDB/Util/BrowseHTML.pm @@ -113,10 +113,10 @@ sub htmlBrowseHist { pageurl => $url, class => 'history', header => [ - sub { td colspan => 2, class => 'tc1', mt '_hist_col_rev' }, + sub { td class => 'tc1_1', mt '_hist_col_rev'; td class => 'tc1_2', ''; }, [ mt '_hist_col_date' ], [ mt '_hist_col_user' ], - sub { td; a href => '#', id => 'expandlist', mt '_js_expand'; txt mt '_hist_col_page'; end; } + [ mt '_hist_col_page' ], ], row => sub { my($s, $n, $i) = @_; @@ -133,17 +133,11 @@ sub htmlBrowseHist { td class => 'tc3'; lit $self->{l10n}->userstr($i); end; - td; + td class => 'tc4'; a href => $revurl, title => $i->{ioriginal}, shorten $i->{ititle}, 80; + b class => 'grayedout'; lit bb2html $i->{comments}, 250; end; end; end; - if($i->{comments}) { - Tr class => $n % 2 ? 'collapse msgsum odd hidden' : 'collapse msgsum hidden'; - td colspan => 5; - lit bb2html $i->{comments}, 150; - end; - end; - } }, ); } |