diff options
author | Yorhel <git@yorhel.nl> | 2010-11-27 09:51:30 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2010-11-27 09:51:30 +0100 |
commit | 156a362991ac6922f33e61a08f39f31048310183 (patch) | |
tree | 2e38eba4ddfe66c22b72fc3c325db532b78913b6 | |
parent | fabd5720d5157754406ea5b69e900db632ed035e (diff) |
Re-added producer role to collapsed view on producer pages
And rewrote the expand/collapse JS/CSS code so that the difference
between expanded and collapsed view is merely the class of the
containing table. This way the JS code doesn't have to pass through the
table rows and is thus noticeably faster for larger tables (i.e. /p65).
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | data/script.js | 9 | ||||
-rw-r--r-- | data/style.css | 9 | ||||
-rw-r--r-- | lib/VNDB/Handler/Producers.pm | 4 |
4 files changed, 12 insertions, 11 deletions
@@ -3,6 +3,7 @@ - New release filters: voiced and animation - Added Atom feeds for the recent announcements, changes and posts (located in /www/feeds and updated every 15 min. by Multi::Feed) + - Re-added producer role to collapsed view on producer pages - JS: Reverted to the old selection box date selector - JS: Split script.js into a separate file for each language - Improved performance of update_vnpopularity() on PostgreSQL 9.0 diff --git a/data/script.js b/data/script.js index aafdf62b..8cf49e97 100644 --- a/data/script.js +++ b/data/script.js @@ -2202,14 +2202,7 @@ if(byId('expandprodrel')) { setexpand = function() { var exp = !(getCookie('prodrelexpand') == 1); setText(lnk, exp ? mt('_js_collapse') : mt('_js_expand')); - var l = byClass(byId('prodrel'), 'tr', 'rel'); - for(var i=0; i<l.length; i++) - setClass(l[i], 'hidden', !exp); - var l = byClass(byId('prodrel'), 'tr', exp ? 'vn_lst' : 'vn'); - for(var i=0; i<l.length; i++) { - setClass(l[i], 'vn', exp); - setClass(l[i], 'vn_lst', !exp); - } + setClass(byId('prodrel'), 'collapse', !exp); }; setexpand(); lnk.onclick = function () { diff --git a/data/style.css b/data/style.css index 2346ecf4..243e15e5 100644 --- a/data/style.css +++ b/data/style.css @@ -825,9 +825,12 @@ div.scr_uploader { visibility: hidden; overflow: hidden; width: 1px; height: 1px #prodrel { width: 100%; } #prodrel tr.vn td { background: url($_boxbg$) repeat; font-weight: bold; } -#prodrel tr.vn i { display: none } -#prodrel tr.vn_lst td { padding: 1px } -#prodrel tr.vn_lst i { font-style: normal; display: block; float: left; width: 80px; padding: 0 0 0 40px; } +#prodrel tr.vn i, +#prodrel tr.vn span { display: none } +#prodrel.collapse tr.vn td { padding: 1px; background: none; font-weight: normal } +#prodrel.collapse tr.vn i { font-style: normal; display: block; float: left; width: 80px; padding: 0 0 0 40px; } +#prodrel.collapse tr.vn span { display: inline; font-weight: normal; color: $grayedout$; padding: 0 0 0 5px } +#prodrel.collapse tr.rel { display: none } #prodrel td.tc1 { width: 80px; padding-left: 30px; } #prodrel td.tc2 { width: 50px; text-align: center; } #prodrel td.tc3 { width: 120px; text-align: right; padding: 0; } diff --git a/lib/VNDB/Handler/Producers.pm b/lib/VNDB/Handler/Producers.pm index f743b4ca..6e11e829 100644 --- a/lib/VNDB/Handler/Producers.pm +++ b/lib/VNDB/Handler/Producers.pm @@ -153,6 +153,10 @@ sub _releases { td colspan => 6; i; lit $self->{l10n}->datestr($vn{$v->{vid}}[0]{released}); end; a href => "/v$v->{vid}", title => $v->{original}, $v->{title}; + span '('.join(', ', + (grep($_->{developer}, @{$vn{$v->{vid}}}) ? mt '_prodpage_dev' : ()), + (grep($_->{publisher}, @{$vn{$v->{vid}}}) ? mt '_prodpage_pub' : ()) + ).')'; end; end; for my $rel (@{$vn{$v->{vid}}}) { |