summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatricio Cano <suprnova32@gmail.com>2016-07-15 18:29:23 -0500
committerPatricio Cano <suprnova32@gmail.com>2016-07-18 17:52:29 -0500
commita3f0f2cc4d9a4c689ae0eeae73e6d4ef19c39cce (patch)
treee93c2626e1f4fb3451b733a45ee9e8182d33babc
parent7943767267873423acb1eddbf00b6c5684f7849f (diff)
downloadgitlab-ce-a3f0f2cc4d9a4c689ae0eeae73e6d4ef19c39cce.tar.gz
Move inline JS to admin.js.coffee specific file.
-rw-r--r--app/assets/javascripts/admin.js.coffee12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/assets/javascripts/admin.js.coffee b/app/assets/javascripts/admin.js.coffee
index b2b8e1b7ffb..4dd30973d11 100644
--- a/app/assets/javascripts/admin.js.coffee
+++ b/app/assets/javascripts/admin.js.coffee
@@ -38,3 +38,15 @@ class @Admin
$('li.group_member').bind 'ajax:success', ->
Turbolinks.visit(location.href)
+
+ showBlacklistType = ->
+ if $('input[name=\'blacklist_type\']:checked').val() == 'file'
+ $('.blacklist-file').show()
+ $('.blacklist-raw').hide()
+ else
+ $('.blacklist-file').hide()
+ $('.blacklist-raw').show()
+ return
+
+ $('input[name=\'blacklist_type\']').click showBlacklistType
+ showBlacklistType()