aboutsummaryrefslogtreecommitdiff
path: root/app/public/static/package_edit.js
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-05-27 22:48:53 +0100
committerrubenwardy <rw@rubenwardy.com>2018-05-27 22:48:53 +0100
commit44c9f7e58f912c8b262ac37afcca90379f1cefe9 (patch)
tree3f877cb4cfa244bb8e3a710d73b3bbc3aba8b80a /app/public/static/package_edit.js
parent92daa87db064c91c05e7c24535a8c09070930831 (diff)
downloadcheatdb-44c9f7e58f912c8b262ac37afcca90379f1cefe9.tar.xz
Hide unneeded fields depending on package type
Diffstat (limited to 'app/public/static/package_edit.js')
-rw-r--r--app/public/static/package_edit.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/public/static/package_edit.js b/app/public/static/package_edit.js
new file mode 100644
index 0000000..40fbe44
--- /dev/null
+++ b/app/public/static/package_edit.js
@@ -0,0 +1,11 @@
+// @author rubenwardy
+// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later
+
+$(function() {
+ $("#type").change(function() {
+ $(".not_mod, .not_game, .not_txp").show()
+ $(".not_" + this.value.toLowerCase()).hide()
+ })
+ $(".not_mod, .not_game, .not_txp").show()
+ $(".not_" + $("#type").val().toLowerCase()).hide()
+})