diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-03-15 13:34:49 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-03-15 13:49:29 +0300 |
commit | b5c8f5727b5261d86ce52b976a355e7f223a563a (patch) | |
tree | feebc4cc00d2380fa615e946c0e3914f76ad53ec /app/assets/javascripts/project_new.js.coffee | |
parent | 9403142083bf0ace81fc3059f2d6c5a494e48cbf (diff) |
Hide builds from Project's settings when the feature is disabled
Diffstat (limited to 'app/assets/javascripts/project_new.js.coffee')
-rw-r--r-- | app/assets/javascripts/project_new.js.coffee | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/assets/javascripts/project_new.js.coffee b/app/assets/javascripts/project_new.js.coffee index fecdb9fc2e7..63dee4ed5d7 100644 --- a/app/assets/javascripts/project_new.js.coffee +++ b/app/assets/javascripts/project_new.js.coffee @@ -3,3 +3,16 @@ class @ProjectNew $('.project-edit-container').on 'ajax:before', => $('.project-edit-container').hide() $('.save-project-loader').show() + @toggleSettings() + @toggleSettingsOnclick() + + + toggleSettings: -> + checked = $("#project_builds_enabled").prop("checked") + if checked + $('.builds-feature').show() + else + $('.builds-feature').hide() + + toggleSettingsOnclick: -> + $("#project_builds_enabled").on 'click', @toggleSettings |