diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-06-05 17:45:41 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-06-05 17:45:41 +0000 |
commit | bfd5b919baca5c63bb3837836af55b473c78be6f (patch) | |
tree | 43c2ebc97a27b72809758c1707f00a160c48d544 /public | |
parent | 2691613c55c14c907948f96c6bbe762294afd560 (diff) | |
download | redmine-bfd5b919baca5c63bb3837836af55b473c78be6f.tar.gz redmine-bfd5b919baca5c63bb3837836af55b473c78be6f.zip |
Hide options when permission is not given.
git-svn-id: http://svn.redmine.org/redmine/trunk@15468 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public')
-rw-r--r-- | public/javascripts/application.js | 5 |
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(); }); |