summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/javascripts/application.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index 743b14ff6..347611bb2 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -719,9 +719,10 @@ function toggleDisabledOnChange() {
var checked = $(this).is(':checked');
$($(this).data('disables')).attr('disabled', checked);
$($(this).data('enables')).attr('disabled', !checked);
+ $($(this).data('shows')).toggle(checked);
}
function toggleDisabledInit() {
- $('input[data-disables], input[data-enables]').each(toggleDisabledOnChange);
+ $('input[data-disables], input[data-enables], input[data-shows]').each(toggleDisabledOnChange);
}
(function ( $ ) {
@@ -751,7 +752,7 @@ function toggleDisabledInit() {
}( jQuery ));
$(document).ready(function(){
- $('#content').on('change', 'input[data-disables], input[data-enables]', toggleDisabledOnChange);
+ $('#content').on('change', 'input[data-disables], input[data-enables], input[data-shows]', toggleDisabledOnChange);
toggleDisabledInit();
});