You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
774 B
1 line
774 B
2 years ago
|
define(["jquery"],function(a){var b=function(b){var c=a(b.target),d=JSON.parse(c.attr("data-defaultvalue")),e=JSON.parse(c.attr("data-customvalue")),f=c.attr("data-type"),g=c.closest("form"),h=c.attr("name").replace(/\[customize\]$/,"[value]"),i=c.prop("checked")?e:d;"text"===f?g.find('[name="'+h+'"]').val(i):"date_selector"===f?(g.find('[name="'+h+'[day]"]').val(i.day),g.find('[name="'+h+'[month]"]').val(i.month),g.find('[name="'+h+'[year]"]').val(i.year)):"date_time_selector"===f&&(g.find('[name="'+h+'[day]"]').val(i.day),g.find('[name="'+h+'[month]"]').val(i.month),g.find('[name="'+h+'[year]"]').val(i.year),g.find('[name="'+h+'[hour]"]').val(i.hour),g.find('[name="'+h+'[minute]"]').val(i.minute))},c="input[data-defaultcustom=true]";a("body").on("change",c,b)});
|