diff options
author | Yorhel <git@yorhel.nl> | 2019-07-14 14:17:28 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2019-07-15 12:41:46 +0200 |
commit | b80513eaf985c7ea12445d4d4470c302199dcf10 (patch) | |
tree | 85ac4fbadf7f225fde4662813e034b5973a8afa4 /data | |
parent | bd2890abeb7f4ebe0cdab66dd7ad07c5cac53941 (diff) |
Add engine field to releases
Fixes #4.
Diffstat (limited to 'data')
-rw-r--r-- | data/global.pl | 17 | ||||
-rw-r--r-- | data/js/filter.js | 11 | ||||
-rw-r--r-- | data/js/misc.js | 15 |
3 files changed, 42 insertions, 1 deletions
diff --git a/data/global.pl b/data/global.pl index 050e4fbd..878bdba4 100644 --- a/data/global.pl +++ b/data/global.pl @@ -255,6 +255,23 @@ our %S; staff => 'Staff', ), poll_options => 20, # max number of options in discussion board polls + engines => [ grep $_, split /\s*\n\s*/, q{ + BGI/Ethornell + CatSystem2 + codeX RScript + EntisGLS + Ikura GDL + KiriKiri + Majiro + NScripter + QLIE + RPG Maker + RealLive + Ren'Py + Shiina Rio + Unity + YU-RIS + }], ); diff --git a/data/js/filter.js b/data/js/filter.js index 7269d3b3..1258afc6 100644 --- a/data/js/filter.js +++ b/data/js/filter.js @@ -389,6 +389,14 @@ function filFSelect(c, n, lines, opts) { ]; } +function filFInput(c, n) { + return [ c, n, + tag('input', {type: 'text', 'class': 'text', onfocus: selectField, onchange: serialize}), + function (c) { return [c.value] }, + function (c, f) { c.value = f } + ] +} + function filFOptions(c, n, opts) { var p = tag('p', {'class':'opts', fil_val:opts[0][0]}); var sel = function (e) { @@ -619,7 +627,8 @@ function filReleases() { filFSelect('med', 'Medium', 10, med), filFSelect('voiced', 'Voiced', 5, VARS.voiced), filFSelect('ani_story', 'Story animation', 5, VARS.animated), - filFSelect('ani_ero', 'Ero animation', 5, VARS.animated) + filFSelect('ani_ero', 'Ero animation', 5, VARS.animated), + filFInput('engine', 'Engine') ] ]; } diff --git a/data/js/misc.js b/data/js/misc.js index 1d667313..c0c67ef8 100644 --- a/data/js/misc.js +++ b/data/js/misc.js @@ -150,6 +150,8 @@ if(location.hostname != 'vndb.org') { byId('voiced').disabled = byId('ani_story').disabled = byId('ani_ero').disabled = + byId('engine').disabled = + byId('engine_oth').disabled = byId('patch').checked; setClass( @@ -165,6 +167,19 @@ if(location.hostname != 'vndb.org') { })(); +// Release edit engine selection (/r+/edit) +(function(){ + var en = byId('engine'); + var en_other = byId('engine_oth'); + if(en && en_other) { + en.onchange = function() { + setClass(en_other, 'hidden', en.options[en.selectedIndex].value != '_other_'); + return true; + }; + } +})(); + + // Batch edit dropdown box (/u+/wish) if(byId('batchedit')) byId('batchedit').onchange = function() { |