summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2018-05-25 16:11:01 +0200
committerYorhel <git@yorhel.nl>2018-05-25 16:11:03 +0200
commitb0f7086211dd326ef612d30561ddc69e7abf98fb (patch)
tree6a076efdfbe348d95e8a9c2893a130814f549589 /data
parent0a39d801c10fd644bbfd4c9c4f3e357e3c522788 (diff)
Add uncensored flag to release entries
As discussed in https://vndb.org/t10665
Diffstat (limited to 'data')
-rw-r--r--data/js/filter.js1
-rw-r--r--data/js/misc.js11
2 files changed, 10 insertions, 2 deletions
diff --git a/data/js/filter.js b/data/js/filter.js
index 3e4b2371..0103cc2a 100644
--- a/data/js/filter.js
+++ b/data/js/filter.js
@@ -547,6 +547,7 @@ function filReleases() {
filFOptions('patch', 'Patch status', [ [1, 'Patch'], [0, 'Standalone'] ]),
filFOptions('freeware', 'Freeware', [ [1, 'Only freeware'], [0, 'Only non-free releases'] ]),
filFOptions('doujin', 'Doujin', [ [1, 'Only doujin releases'], [0, 'Only commercial releases'] ]),
+ filFOptions('uncensored','Censoring', [ [1, 'Only uncensored releases'], [0, 'Censored or non-erotic releases'] ]),
[ 'date_after', 'Released after', dateLoad(null, selectField), function (c) { return [c.date_val] }, function(o,v) { o.dateSet(v) } ],
[ 'date_before', 'Released before', dateLoad(null, selectField), function (c) { return [c.date_val] }, function(o,v) { o.dateSet(v) } ],
filFOptions('released', 'Release date', [ [1, 'Past (already released)'], [0, 'Future (to be released)'] ])
diff --git a/data/js/misc.js b/data/js/misc.js
index 85f25f10..81f2890f 100644
--- a/data/js/misc.js
+++ b/data/js/misc.js
@@ -179,7 +179,8 @@ if(location.hostname != 'vndb.org') {
})();
-// make some fields readonly when patch flag is set (/r+/edit)
+// make some fields readonly when patch flag is set and hide uncensored
+// checkbox when age rating isn't 18+ (/r+/edit)
(function(){
function sync() {
byId('doujin').disabled =
@@ -188,10 +189,16 @@ if(location.hostname != 'vndb.org') {
byId('ani_story').disabled =
byId('ani_ero').disabled =
byId('patch').checked;
+
+ setClass(
+ byId('uncensored').parentNode.parentNode,
+ 'hidden',
+ byId('minage').options[byId('minage').selectedIndex].value != 18
+ );
};
if(byId('jt_box_rel_geninfo')) {
sync();
- byId('patch').onclick = sync;
+ byId('patch').onclick = byId('minage').onclick = sync;
}
})();