diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | lib/VNDB/Handler/Releases.pm | 4 | ||||
-rw-r--r-- | static/f/script.js | 9 |
3 files changed, 13 insertions, 1 deletions
@@ -13,6 +13,7 @@ git - ? - Box titles on homepage are click-able - Russian translation of the interface - Random VN link in menu + - Ignore some release fields when the patch status is checked 2.6 - 2009-08-09 - New screen resolutions: 1024x600 and 1600x1200 diff --git a/lib/VNDB/Handler/Releases.pm b/lib/VNDB/Handler/Releases.pm index 58c423ff..447bfef6 100644 --- a/lib/VNDB/Handler/Releases.pm +++ b/lib/VNDB/Handler/Releases.pm @@ -329,7 +329,9 @@ sub edit { $new_vn = [ map { /^([0-9]+)/ ? $1 : () } split /\|\|\|/, $frm->{vn} ]; $frm->{platforms} = [ grep $_, @{$frm->{platforms}} ]; $frm->{$_} = $frm->{$_} ? 1 : 0 for (qw|patch freeware doujin|); - $frm->{doujin} = 0 if $frm->{patch}; + + # reset some fields when the patch flag is set + $frm->{doujin} = $frm->{resolution} = $frm->{voiced} = $frm->{ani_story} = $frm->{ani_ero} = 0 if $frm->{patch}; my $same = $rid && (join(',', sort @{$b4{platforms}}) eq join(',', sort @{$frm->{platforms}})) && diff --git a/static/f/script.js b/static/f/script.js index 41a823b5..987963dc 100644 --- a/static/f/script.js +++ b/static/f/script.js @@ -618,6 +618,15 @@ DOMLoad(function() { if(x('taglinks')) tglLoad(); + // make some fields readonly when patch flag is set + if(x('jt_box_rel_geninfo')) { + var func = function() { + x('doujin').disabled = x('resolution').disabled = x('voiced').disabled = x('ani_story').disabled = x('ani_ero').disabled = x('patch').checked; + }; + func(); + x('patch').onclick = func; + } + // spam protection on all forms if(document.forms.length >= 1) for(i=0; i<document.forms.length; i++) |