This commit is contained in:
Nathan Coad
2016-06-03 11:14:11 +10:00
parent 1a519c1ee7
commit 8b31d1bebf

View File

@@ -6,7 +6,8 @@ Drupal.ajax.prototype.commands.bookingEmailIDs = function(ajax, response, statu
jQuery(function($) { jQuery(function($) {
var arr = $.parseJSON($('input#booking_email_default_ids').val()) var arr = $.parseJSON($('input#booking_email_default_ids').val())
$('#booking-manual-email-form').find(':checkbox[name^="table"]').each(function () { $('#booking-manual-email-form').find(':checkbox[name^="table"]').each(function () {
$(this).prop("checked", ($.inArray($(this).val(), arr) != -1)); //.prop() doesn't exist in Drupal's old version of jQuery so use .attr() instead
$(this).attr("checked", ($.inArray($(this).val(), arr) != -1));
}); });
alert(arr[0]); alert(arr[0]);
}); });