summaryrefslogtreecommitdiffstats
path: root/public/javascripts
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-12-14 08:22:43 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-12-14 08:22:43 +0000
commit2e2e2cfe425c2664517fb59836fbd3eff5e35861 (patch)
treee3daa66ee8b36d2f1a1468ec9501fba5bc37d71c /public/javascripts
parentc74f6d9f9bcf02ccc480a2028802b83ec5d91aca (diff)
downloadredmine-2e2e2cfe425c2664517fb59836fbd3eff5e35861.tar.gz
redmine-2e2e2cfe425c2664517fb59836fbd3eff5e35861.zip
Merged custom fields format refactoring.
git-svn-id: http://svn.redmine.org/redmine/trunk@12400 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public/javascripts')
-rw-r--r--public/javascripts/application.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index 255886731..a6d15f2f0 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -588,6 +588,20 @@ function blockEventPropagation(event) {
event.preventDefault();
}
+function toggleDisabledOnChange() {
+ var checked = $(this).is(':checked');
+ $($(this).data('disables')).attr('disabled', checked);
+ $($(this).data('enables')).attr('disabled', !checked);
+}
+function toggleDisabledInit() {
+ $('input[data-disables], input[data-enables]').each(toggleDisabledOnChange);
+}
+$(document).ready(function(){
+ $('#content').on('change', 'input[data-disables], input[data-enables]', toggleDisabledOnChange);
+ toggleDisabledInit();
+});
+
$(document).ready(setupAjaxIndicator);
$(document).ready(hideOnLoad);
$(document).ready(addFormObserversForDoubleSubmit);
+