diff options
-rw-r--r-- | data/lang.txt | 34 | ||||
-rw-r--r-- | data/script.js | 30 | ||||
-rw-r--r-- | data/style.css | 21 | ||||
-rw-r--r-- | lib/VNDB/DB/ULists.pm | 4 | ||||
-rw-r--r-- | lib/VNDB/Handler/Releases.pm | 1 | ||||
-rw-r--r-- | lib/VNDBUtil.pm | 8 |
6 files changed, 50 insertions, 48 deletions
diff --git a/data/lang.txt b/data/lang.txt index 39f52153..1f8479b9 100644 --- a/data/lang.txt +++ b/data/lang.txt @@ -771,21 +771,21 @@ nl : Voortgebracht uit en : Complete ru : Полный cs : Kompletní -hu : Teljes +hu : Kész játék nl : Compleet :_rtype_partial en : Partial ru : Частичный cs : Částečné -hu : Részleges +hu : Félig kész játék nl : Partieel :_rtype_trial en : Trial ru : Триальный cs : Trial -hu : Próba +hu : Próba játék nl : @@ -930,21 +930,21 @@ nl : Niet ingesproken en : Only ero scenes voiced ru : Озвучены лишь эросцены cs : S hlasem pouze v ero scénách -hu : Csak ero jelenetek szinkronosak +hu : Csak az ero jeleneteknél van nl : Alleen erotische scenes ingesproken :_voiced_3 en : Partially voiced ru : Частичная озвучка cs : Částečně s hlasem -hu : Részlegesen szinkronos +hu : Pár helyen van nl : Deels ingesproken :_voiced_4 en : Fully voiced ru : Озвучено полностью cs : Plně s hlasem -hu : Szinkronizált +hu : Van nl : Volledig ingesproken @@ -968,7 +968,7 @@ nl : Geen animaties en : Simple animations ru : Простая анимация cs : Jednoduché animace -hu : Egyszerű animációk +hu : Egyszerűen animált nl : Simpele animaties :_animated_3 @@ -1430,7 +1430,7 @@ nl : uitklappen en : collapse ru : свернуть cs : složit -hu : összevonás +hu : összezár nl : inklappen :_js_loading @@ -1632,7 +1632,7 @@ nl : Mijn profiel en : My Visual Novel List ru : Мой список новелл cs : Můj list vizuálních novel -hu : A Visual Novel listám +hu : A visual novel listám nl : Mijn Visual Novel lijst :_menu_mywishlist @@ -2994,21 +2994,21 @@ nl : Resolutie en : Voiced ru : Озвучка cs : Hlas -hu : Szinkronos +hu : Hangszínjáték nl : Ingesproken :_revfield_r_ani_story en : Story animation ru : Сюжетная анимация cs : Animace příběhu -hu : Animált történet +hu : Történet animáció nl : Verhaalanimatie :_revfield_r_ani_ero en : Ero animation ru : Анимация эросцен cs : Ero animace -hu : Animált ero jelenetek +hu : Ero jelenet animáció nl : Erotische animatie :_revfield_r_producers @@ -3123,7 +3123,7 @@ nl : Resolutie en : Voiced ru : Озвучка cs : Hlas -hu : Szinkronos +hu : Hangszínjáték nl : Ingesproken :_relinfo_ani @@ -3404,21 +3404,21 @@ nl : Resolutie en : Voiced ru : Озвучка cs : Hlas -hu : Szinkronos +hu : Hangszínjáték nl : Ingesproken :_redit_form_ani_story en : Story animation ru : Сюжетная анимация cs : Animace příběhu -hu : Animált történet +hu : Történet animáció nl : Verhaalanimatie :_redit_form_ani_ero en : Ero animation ru : Анимация эросцен cs : Ero animace -hu : Animált ero jelenetek +hu : Ero jelenet animáció nl : Erotische animatie :_redit_form_ani_ero_none @@ -3432,7 +3432,7 @@ nl : Onbekend / geen erotische scenes en : Animation in erotic scenes, leave to unknown if there are no ero scenes. ru : Анимация в эротических сценах, не изменяйте поле если эросцены отсутствуют. cs : Animace v ero scénách, ponechte na Není známo, pokud novela nemá ero scény. -hu : Animált erotikus jelenetek, hagyd 'Ismeretlen'-en ha nem tartalmaz erotikus jelenetek. +hu : Az animált erotikus jeleneteket hagyd 'Ismeretlen'-en ha nem tartalmaz erotikus jelenetek. nl : Animatie in de erotische scenes, laat onbekend als er geen erotische scenes zijn. :_redit_form_platforms diff --git a/data/script.js b/data/script.js index e3a1b553..61f37d66 100644 --- a/data/script.js +++ b/data/script.js @@ -209,7 +209,7 @@ function ivInit() { l[i].onclick = ivView; } if(init && !byId('iv_view')) { - addBody(tag('div', {id: 'iv_view'}, + addBody(tag('div', {id: 'iv_view','class':'hidden'}, tag('b', {id:'ivimg'}, ''), tag('br', null), tag('a', {href:'#', id:'ivfull'}, ''), @@ -217,7 +217,7 @@ function ivInit() { tag('a', {href:'#', onclick: ivView, id:'ivprev'}, '« '+mt('_js_iv_prev')), tag('a', {href:'#', onclick: ivView, id:'ivnext'}, mt('_js_iv_next')+' »') )); - addBody(tag('b', {id:'ivimgload'}, mt('_js_loading'))); + addBody(tag('b', {id:'ivimgload','class':'hidden'}, mt('_js_loading'))); } } @@ -273,9 +273,9 @@ function ivView(what) { dw = dw < 200 ? 200 : dw; // update document - view.style.display = 'block'; + setClass(view, 'hidden', false); setContent(byId('ivimg'), tag('img', {src:u, onclick:ivClose, - onload: function() { byId('ivimgload').style.top='-400px'; }, + onload: function() { setClass(byId('ivimgload'), 'hidden', true); }, style: 'width: '+w+'px; height: '+h+'px' })); view.style.width = dw+'px'; @@ -284,13 +284,13 @@ function ivView(what) { view.style.top = ((wh - dh) / 2 + st - 20)+'px'; byId('ivimgload').style.left = ((ww - 100) / 2 - 10)+'px'; byId('ivimgload').style.top = ((wh - 20) / 2 + st)+'px'; + setClass(byId('ivimgload'), 'hidden', false); return false; } function ivClose() { - byId('iv_view').style.display = 'none'; - byId('iv_view').style.top = '-5000px'; - byId('ivimgload').style.top = '-400px'; + setClass(byId('iv_view'), 'hidden', true); + setClass(byId('ivimgload'), 'hidden', true); setText(byId('ivimg'), ''); return false; } @@ -308,13 +308,13 @@ function ddInit(obj, align, contents) { document.onmousemove = ddMouseMove; document.onscroll = ddHide; if(!byId('dd_box')) - addBody(tag('div', {id:'dd_box', dd_used: false})); + addBody(tag('div', {id:'dd_box', 'class':'hidden', dd_used: false})); } function ddHide() { var box = byId('dd_box'); setText(box, ''); - box.style.left = '-500px'; + setClass(box, 'hidden', true); box.dd_used = false; box.dd_lnk = null; } @@ -353,6 +353,7 @@ function ddRefresh() { if(content == null) return false; setContent(box, content); + setClass(box, 'hidden', false); var o = lnk; ddx = ddy = 0; @@ -626,7 +627,7 @@ function dateSerialize(div) { function dsInit(obj, url, trfunc, serfunc, retfunc, parfunc) { obj.setAttribute('autocomplete', 'off'); obj.onkeydown = dsKeyDown; - obj.onblur = function() { setTimeout(function () { byId('ds_box').style.top = '-500px'; }, 500) }; + obj.onblur = function() { setTimeout(function () { setClass(byId('ds_box'), 'hidden', true) }, 500) }; obj.ds_returnFunc = retfunc; obj.ds_trFunc = trfunc; obj.ds_serFunc = serfunc; @@ -635,7 +636,7 @@ function dsInit(obj, url, trfunc, serfunc, retfunc, parfunc) { obj.ds_selectedId = 0; obj.ds_dosearch = null; if(!byId('ds_box')) - addBody(tag('div', {id: 'ds_box'}, tag('b', mt('_js_loading')))); + addBody(tag('div', {id: 'ds_box', 'class':'hidden'}, tag('b', mt('_js_loading')))); } function dsKeyDown(ev) { @@ -661,7 +662,7 @@ function dsKeyDown(ev) { if(obj.ds_returnFunc) obj.ds_returnFunc(); - byId('ds_box').style.top = '-500px'; + setClass(byId('ds_box'), 'hidden', true); setContent(byId('ds_box'), tag('b', mt('_js_loading'))); obj.ds_selectedId = 0; if(obj.ds_dosearch) { @@ -721,7 +722,7 @@ function dsSearch(obj) { // hide the ds_box div if(val.length < 2) { - box.style.top = '-500px'; + setClass(box, 'hidden', true); setContent(box, tag('b', mt('_js_loading'))); obj.ds_selectedId = 0; return; @@ -740,6 +741,7 @@ function dsSearch(obj) { box.style.left = ddx+'px'; box.style.top = ddy+'px'; box.style.width = obj.offsetWidth+'px'; + setClass(box, 'hidden', false); // perform search ajax(obj.ds_searchURL + encodeURIComponent(val), function(hr) { @@ -772,7 +774,7 @@ function dsResults(hr, obj) { obj.value = obj.ds_serFunc(this.ds_itemData, obj); if(obj.ds_returnFunc) obj.ds_returnFunc(); - box.style.top = '-500px'; + setClass(box, 'hidden', true); obj.ds_selectedId = 0; }; diff --git a/data/style.css b/data/style.css index 6427e615..638782cc 100644 --- a/data/style.css +++ b/data/style.css @@ -102,7 +102,7 @@ b.todo { font-weight: normal; color: $statnok$ } height: 0; } .hidden { - display: none + display: none!important } b.spoiler, b.spoiler a { @@ -120,7 +120,7 @@ b.spoiler_shown { font-weight: normal } text-align: left; } .linethrough { text-decoration: line-through } - pre { +pre { padding:1px 5px; margin: 5px 15px; border: 1px dotted $border$; @@ -700,7 +700,7 @@ a.addnew { #screenshots p.nsfwtoggle { float: right; margin: 0; } -#dd_box { position: absolute; left: -500px; border: 1px solid $border$; background-color: $secbg$; } +#dd_box { position: absolute; left: 0px; border: 1px solid $border$; background-color: $secbg$; } #dd_box ul { list-style-type: none; margin: 0; padding: 0 } #dd_box li b { display: block; font-weight: normal; padding-left: 5px; } #dd_box li i { display: block; font-style: normal; padding-left: 10px; padding-right: 5px } @@ -749,7 +749,7 @@ b.datepart b { font-weight: normal } #ds_box { position: absolute; - top: -500px; + top: 0; border: 1px solid $border$; border-top: none; background-color: $secbg$; @@ -778,7 +778,7 @@ b.datepart b { font-weight: normal } #scr_table td { height: 108px; border-top: 1px solid #258; padding: 0; padding-right: 5px } #scr_table td.thumb { width: 136px; vertical-align: middle } #scr_table select { width: 400px; } -div.scr_uploader { visibility: hidden; overflow: hidden; width: 1px; height: 1px; position: absolute; left: -500px; top: -500px; } +div.scr_uploader { visibility: hidden; overflow: hidden; width: 1px; height: 1px; position: absolute; display: none; left: 0; top: 0; } @@ -1112,9 +1112,8 @@ div.revision .item { div#iv_view { position: absolute; - display: none; - top: -5000px; - left: -5000px; + top: 0px; + left: 0px; background: url($_boxbg$) repeat; border: 1px solid $border$; padding: 5px; @@ -1127,10 +1126,10 @@ div#iv_view { #ivprev { padding-right: 5px; } #ivfull { float: left; padding-right: 10px; } #ivimgload { - display: block; position: absolute; - left: -500px; - top: -50px; + display: block; + left: 0; + top: 0; width: 100px; padding: 3px; background-color: #f5f5f5; /* no real need to skin this */ diff --git a/lib/VNDB/DB/ULists.pm b/lib/VNDB/DB/ULists.pm index 19831593..e926bae4 100644 --- a/lib/VNDB/DB/ULists.pm +++ b/lib/VNDB/DB/ULists.pm @@ -47,13 +47,13 @@ sub dbVNListList { # construct the global WHERE clause my $where = $o{voted} != -1 ? 'vo.vote IS NOT NULL' : ''; - $where .= ($where?' OR ':'').q|v.id IN( + $where .= ($where?' OR ':'').q|v.id = ANY(ARRAY( SELECT irv.vid FROM rlists irl JOIN releases ir ON ir.id = irl.rid JOIN releases_vn irv ON irv.rid = ir.latest WHERE uid = ? - )| if $o{voted} != 1; + ))| if $o{voted} != 1; $where = '('.$where.') AND LOWER(SUBSTR(vr.title, 1, 1)) = \''.$o{char}.'\'' if $o{char}; $where = '('.$where.') AND (ASCII(vr.title) < 97 OR ASCII(vr.title) > 122) AND (ASCII(vr.title) < 65 OR ASCII(vr.title) > 90)' if defined $o{char} && !$o{char}; $where = '('.$where.') AND vo.vote IS NULL' if $o{voted} == -1; diff --git a/lib/VNDB/Handler/Releases.pm b/lib/VNDB/Handler/Releases.pm index 55bc9778..840b29f0 100644 --- a/lib/VNDB/Handler/Releases.pm +++ b/lib/VNDB/Handler/Releases.pm @@ -295,6 +295,7 @@ sub edit { sort { $a->{id} <=> $b->{id} } @{$r->{producers}} ), ); + gtintype($b4{gtin}) if $b4{gtin}; # normalize gtin code $b4{vn} = join('|||', map "$_->{vid},$_->{title}", @$vn); my $frm; diff --git a/lib/VNDBUtil.pm b/lib/VNDBUtil.pm index 48b5f01b..bda54383 100644 --- a/lib/VNDBUtil.pm +++ b/lib/VNDBUtil.pm @@ -134,10 +134,10 @@ sub bb2html { # Also 'normalizes' the first argument in place sub gtintype { $_[0] =~ s/[^\d]+//g; - $_[0] =~ s/^0+//; + $_[0] = ('0'x(12-length $_[0])) . $_[0] if length($_[0]) < 12; # pad with zeros to GTIN-12 my $c = shift; - return undef if $c !~ /^[0-9]{12,13}$/; # only gtin-12 and 13 - $c = ('0'x(13-length $c)) . $c; # pad with zeros + return undef if $c !~ /^[0-9]{12,13}$/; + $c = "0$c" if length($c) == 12; # pad with another zero for GTIN-13 # calculate check digit according to # http://www.gs1.org/productssolutions/barcodes/support/check_digit_calculator.html#how @@ -152,7 +152,7 @@ sub gtintype { local $_ = $c; return 'JAN' if /^4[59]/; # prefix code 450-459 & 490-499 return 'UPC' if /^(?:0[01]|0[6-9]|13|75[45])/; # prefix code 000-019 & 060-139 & 754-755 - return undef if /(?:0[2-5]|2|97[789]|9[6-9])/; # some codes we don't want: 020–059 & 200-299 & 977-999 + return undef if /^(?:0[2-5]|2|97[789]|9[6-9])/; # some codes we don't want: 020–059 & 200-299 & 977-999 return 'EAN'; # let's just call everything else EAN :) } |