X-Git-Url: http://wagnertech.de/git?p=kivitendo-erp.git;a=blobdiff_plain;f=js%2Fkivi.CustomDataExportDesigner.js;fp=js%2Fkivi.CustomDataExportDesigner.js;h=53e895347be5d811f1b091f4495aec48ea91ee33;hp=0000000000000000000000000000000000000000;hb=53593baa211863fbf66540cf1bcc36c8fb37257f;hpb=deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44 diff --git a/js/kivi.CustomDataExportDesigner.js b/js/kivi.CustomDataExportDesigner.js new file mode 100644 index 000000000..53e895347 --- /dev/null +++ b/js/kivi.CustomDataExportDesigner.js @@ -0,0 +1,13 @@ +namespace('kivi.CustomDataExportDesigner', function(ns){ + 'use strict'; + + ns.enable_default_value = function() { + var count = $(this).prop('id').replace("default_value_type_", ""); + var type = $(this).val(); + $('#default_value_' + count).prop('disabled', (type === 'none') || (type === 'current_user_login')); + }; +}); + +$(function() { + $('[id^="default_value_type_"]').change(kivi.CustomDataExportDesigner.enable_default_value); +});