Merged 15430, 15464 to 15469, 15475, 15476 (#285, #7839).

git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@15478 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2016-06-06 09:41:50 +00:00
parent 7a974437e6
commit 6e68d008c4
23 changed files with 525 additions and 83 deletions

View File

@@ -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();
});