diff options
-rw-r--r-- | data/tpl/defs.pl | 8 | ||||
-rw-r--r-- | data/tpl/rlist | 12 | ||||
-rw-r--r-- | data/tpl/vnpage_rel | 4 | ||||
-rw-r--r-- | lib/ChangeLog | 1 | ||||
-rw-r--r-- | lib/global.pl | 2 | ||||
-rw-r--r-- | static/files/def.js | 12 | ||||
-rw-r--r-- | static/files/style.css | 36 | ||||
-rw-r--r-- | static/files/uicons.png | bin | 0 -> 4404 bytes |
8 files changed, 47 insertions, 28 deletions
diff --git a/data/tpl/defs.pl b/data/tpl/defs.pl index a7355840..e16da538 100644 --- a/data/tpl/defs.pl +++ b/data/tpl/defs.pl @@ -264,13 +264,13 @@ sub rlist_dd { return qq|<div class="dropdown rlistdd" id="rlistDD$$r{id}"><ul><li><b>Release status</b></li>|. join('', map { - $r->{rlist} && $_ == $r->{rlist}{rstat} ? "<li><b> $$VNDB::RSTAT[$_]</b></li>" - : qq|<li><a href="/r$$r{id}/list?r=$_"> $$VNDB::RSTAT[$_]</a></li>| + $r->{rlist} && $_ == $r->{rlist}{rstat} ? qq|<li><b><acronym class="uicons r$_"> </acronym> $$VNDB::RSTAT[$_]</b></li>| + : qq|<li><a href="/r$$r{id}/list?r=$_"><acronym class="uicons r$_"> </acronym> $$VNDB::RSTAT[$_]</a></li>| } 0..$#$VNDB::RSTAT). qq|</ul><ul><li><b>Play status</b></li>|. join('', map { - $r->{rlist} && $_ == $r->{rlist}{vstat} ? "<li><b> $$VNDB::VSTAT[$_]</b></li>" - : qq|<li><a href="/r$$r{id}/list?v=$_"> $$VNDB::VSTAT[$_]</a></li>| + $r->{rlist} && $_ == $r->{rlist}{vstat} ? qq|<li><b><acronym class="uicons v$_"> </acronym> $$VNDB::VSTAT[$_]</b></li>| + : qq|<li><a href="/r$$r{id}/list?v=$_"><acronym class="uicons v$_"> </acronym> $$VNDB::VSTAT[$_]</a></li>| } 0..$#$VNDB::VSTAT). qq|</ul><ul class="full">|. ($r->{rlist} ? qq|<li class="center"><a href="/r$$r{id}/list?d=1">remove from my list</a></li>| diff --git a/data/tpl/rlist b/data/tpl/rlist index e95286f3..70f0b77f 100644 --- a/data/tpl/rlist +++ b/data/tpl/rlist @@ -29,13 +29,13 @@ [[ } ]]- <table id="rli"> <thead><tr> - <td colspan="4" class="tc1">Title -[[= sortbut($sourl, 'title') ]]</td> + <td colspan="3" class="tc1">Title -[[= sortbut($sourl, 'title') ]]</td> <td class="tc2" id="relhidpar"><b id="relhidparb">▸</b>Releases*</td> <td class="tc3">Vote -[[= sortbut($sourl, 'vote') ]]</td> </tr></thead> [[ for (@{$d{list}}) { $j=0; my $c = ' style="background-color: #'.($i++%2?'fff':'f5f5f5').'"'; ]]- <tr[[=$c]]> - <td colspan="4" class="tc1"><a href="/v[[= $_->{vid} ]]" title="[[: $_->{title} ]]">[[= shorten $_->{title}, 50 ]]</a></td> + <td colspan="3" class="tc1"><a href="/v[[= $_->{vid} ]]" title="[[: $_->{title} ]]">[[= shorten $_->{title}, 50 ]]</a></td> <td class="tc2[[= @{$_->{rels}} ? ' relhid" id="rh'.$_->{vid}.'"' : ' relnone"' ]]><b[[= @{$_->{rels}} ? ' id="rhd'.$_->{vid}.'"' : '' ]]>▸</b> [[= grep $_->{rstat}==2, @{$_->{rels}} ]]/[[= grep $_->{vstat}==2, @{$_->{rels}} ]]/[[= @{$_->{rels}} ]] </td> @@ -49,9 +49,11 @@ title="[[= $VNDB::RTYP->[$_->{type}] ]]- release" class="icons -[[= lc substr($VNDB::RTYP->[$_->{type}],0,3) ]]"> </acronym> </td> <td class="tc1_3"><a href="/r[[= $_->{rid} ]]" title="[[: $_->{original} ]]">[[= shorten $_->{title}, 60 ]]</a></td> - <td class="tc1_4">[[: $VNDB::RSTAT->[$_->{rstat}] ]]</td> - <td class="tc1_5">[[: $VNDB::VSTAT->[$_->{vstat}] ]]</td> - <td class="tc1_6">[[ if($d{user}{username} eq $p{AuthUsername}) { ]]<input type="checkbox" name="rsel" value="[[= $_->{rid} ]]" />[[ } else { ]] [[ } ]]</td> + <td class="tc1_4"> + <acronym title="[[: $VNDB::RSTAT->[$_->{rstat}] ]]" class="uicons r[[= $_->{rstat} ]]"> </acronym><acronym + title="[[: $VNDB::VSTAT->[$_->{vstat}] ]]" class="uicons v[[= $_->{vstat} ]]"> </acronym> + </td> + <td class="tc1_5">[[ if($d{user}{username} eq $p{AuthUsername}) { ]]<input type="checkbox" name="rsel" value="[[= $_->{rid} ]]" />[[ } else { ]] [[ } ]]</td> </tr> [[ } ]] [[ } ]]- diff --git a/data/tpl/vnpage_rel b/data/tpl/vnpage_rel index ff981b0e..4e5d29b2 100644 --- a/data/tpl/vnpage_rel +++ b/data/tpl/vnpage_rel @@ -36,7 +36,9 @@ <td class="tc4"><a href="/r[[= $_->{id} ]]" title="[[: $_->{original} || $_->{title} ]]">[[: shorten $_->{title},60 ]]</a></td> <td class="tc5">[[ if($p{AuthId}) { ]] [[= sprintf '<a href="/r%d" class="dropdown above" rel="rlistDD%1$d">%s</a>', $_->{id}, $_->{rlist} ? - (substr($$VNDB::RSTAT[$_->{rlist}{rstat}],0,1).'/'.substr($$VNDB::VSTAT[$_->{rlist}{vstat}],0,1)) : '---' ]] + ('<acronym title="'.$VNDB::RSTAT->[$_->{rlist}{rstat}].'" class="uicons r'.$_->{rlist}{rstat}.'"> </acronym>'. + '<acronym title="'.$VNDB::VSTAT->[$_->{rlist}{vstat}].'" class="uicons v'.$_->{rlist}{vstat}.'"> </acronym>') + : '<acronym title="Add to your visual novel list" class="uicons no"> </acronym>' ]] [[ } else { ]] [[ } ]]</td> <td class="tc6">[[ if($_->{website}) { ]]<a href="[[: $_->{website} ]]" class="icons ext" title="WWW"> </a>[[ } ]]</td> </tr> diff --git a/lib/ChangeLog b/lib/ChangeLog index 5d3ea76a..55a8ab80 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -5,7 +5,6 @@ TODO: + Remove all references to an item when it's hidden (preferably with the option to re-add them when unhiding) + Add a link for the hidden 'h' option at /hist - + Add icons for the rlist, vlist and wlist statusses 1.20 - ? - Admins can change someone's username diff --git a/lib/global.pl b/lib/global.pl index cb1dd446..e0c44016 100644 --- a/lib/global.pl +++ b/lib/global.pl @@ -176,7 +176,7 @@ our $WSTAT = [ 'High', 'Medium', 'Low', - 'AVOID!', + 'Blacklist', ]; diff --git a/static/files/def.js b/static/files/def.js index 96c7fcf2..d377bf09 100644 --- a/static/files/def.js +++ b/static/files/def.js @@ -79,14 +79,12 @@ var ddx;var ddy;var dds=null; function dropDown(e) { e = e || window.event; var tg = e.target || e.srcElement; - if(tg.nodeType == 3) + while(tg && (tg.nodeType == 3 || tg.nodeName.toLowerCase() != 'a')) tg = tg.parentNode; - if(!dds && (tg.nodeName.toLowerCase() != 'a' || !tg.rel || tg.className.indexOf('dropdown') < 0)) - return; - if(tg.rel) + if(tg && tg.rel) tg.rel = tg.rel.replace(/ *nofollow */,""); - if(!dds && !tg.rel) + if(!dds && (!tg || !tg.rel || tg.className.indexOf('dropdown') < 0)) return; if(!dds) { @@ -97,7 +95,7 @@ function dropDown(e) { ddy += obj.offsetTop; } while(obj = obj.offsetParent); if(tg.className.indexOf('above') >= 0) { - ddx += 25; + ddx += 30; ddy -= x(tg.rel).offsetHeight - 20; } else @@ -113,7 +111,7 @@ function dropDown(e) { var mouseY = e.pageY || (e.clientY + document.body.scrollTop + document.documentElement.scrollTop); var obj = x(dds.rel); if((mouseX < ddx-25 || mouseX > ddx+obj.offsetWidth+5 || mouseY < ddy-20 || mouseY > ddy + obj.offsetHeight) - || (tg.nodeName.toLowerCase() == 'a' && tg.className.indexOf('dropdown') >= 0 && tg != dds)) { + || (tg && tg.className.indexOf('dropdown') >= 0 && tg != dds)) { obj.style.left = '-500px'; dds = null; } diff --git a/static/files/style.css b/static/files/style.css index bda1e368..ded407bd 100644 --- a/static/files/style.css +++ b/static/files/style.css @@ -492,10 +492,11 @@ div.rlistdd ul, div.rlistdd ul li { float: left; } div.rlistdd a, div.rlistdd b { - padding: 1px 5px; + padding: 0px 5px; } div.dropdown ul.full a, div.dropdown ul.full b { width: 190px; + padding: 1px 5px; } div.dropdown ul.full, div.dropdown ul.full li { clear: left; @@ -656,7 +657,7 @@ a.rss { overflow: hidden; float: right; } -.icons { +.icons, .uicons { background: url(/files/icons.png) no-repeat; width: 16px; height: 14px; @@ -668,6 +669,11 @@ a.rss { border: 0; text-decoration: none; } +.uicons { + width: 14px; + margin: 0; + background: url(/files/uicons.png) no-repeat; +} .icons.lang { width: 13px; height: 11px; @@ -675,7 +681,7 @@ a.rss { /* see def.js for an ugly FF hack */ } .icons.par, .icons.tri, .icons.com { width: 11px; } -acronym.icons { cursor: default; } +acronym.icons, acronym.uicons { cursor: default; } .icons.oth { background: none; } .icons.drc { background-position: 0px 0px; } .icons.lin { background-position: 0px -14px; } @@ -720,6 +726,19 @@ acronym.icons { cursor: default; } .icons.zh { background-position: -61px -77px; } .icons.ko { background-position: -61px -88px; } +.uicons.no { background-position: 0px 0px; } +.uicons.r0 { background-position: 0px -14px; } +.uicons.v0 { background-position: 0px -14px; } +.uicons.r1 { background-position: 0px -28px; } +.uicons.r2 { background-position: 0px -42px; } +.uicons.r3 { background-position: 0px -56px; } + +.uicons.r4 { background-position: -14px 0px; } +.uicons.v1 { background-position: -14px -14px; } +.uicons.v2 { background-position: -14px -28px; } +.uicons.v3 { background-position: -14px -42px; } +.uicons.v4 { background-position: -14px -56px; } + /* tables */ @@ -766,16 +785,15 @@ b.diff_del { font-weight: normal; background-color: #fcc; } #rli tr.relhid { background-color: #fff!important; } #rli td.relhid, #relhidpar { cursor: pointer; } -#rli td.relnone { color: #aaa }; +#rli td.relnone { color: #aaa } #rli .tc1 { width: 560px; } #rli .tc2 { width: 80px; } #rli .tc3 { width: 50px; } #rli .tc1_1 { width: 70px; padding-left: 20px } #rli .tc1_2 { width: 40px; padding:0; text-align: right; } -#rli .tc1_3 { width: 370px; } -#rli .tc1_4 { width: 60px } +#rli .tc1_3 { width: 430px; } #rli .tc1_3 a { color: #203c36; } -#rli .tc1_6 { text-align: right } +#rli .tc1_5 { text-align: right } #tre tr { background-color: #fff!important; } #tre tr.lang { background-color: #f5f5f5!important; font-style: italic; } @@ -784,8 +802,8 @@ b.diff_del { font-weight: normal; background-color: #fcc; } #tre .tc2 { width: 50px; text-align: center; white-space: nowrap; } #tre .tc3, #tre .tc6 { width: 16px; margin: 0; padding: 0; white-space: nowrap; text-align: right } #tre .tc3 { width: 70px; } -#tre .tc5 { width: 25px; text-align: right; padding-right: 10px; } -#tre .tc5 a { display: block; width: 25px; text-align: right;text-decoration: none; } +#tre .tc5 { width: 30px; text-align: right; padding: 0 10px 0 0; } +#tre .tc5 a { display: block; width: 30px; text-align: right;text-decoration: none; } #tbv .tc2 acronym, #tbv .tc3 acronym { zoom: 1; diff --git a/static/files/uicons.png b/static/files/uicons.png Binary files differnew file mode 100644 index 00000000..09f8da17 --- /dev/null +++ b/static/files/uicons.png |