From 1a519c1ee73b184d5657987e679ba579a84097cc Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Fri, 3 Jun 2016 11:09:23 +1000 Subject: [PATCH] js --- booking.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booking.js b/booking.js index e436e66..bcb1552 100644 --- a/booking.js +++ b/booking.js @@ -5,6 +5,9 @@ Drupal.ajax.prototype.commands.bookingEmailIDs = function(ajax, response, statu jQuery(function($) { var arr = $.parseJSON($('input#booking_email_default_ids').val()) - alert(arr.first()); // this will be executed after the ajax call + $('#booking-manual-email-form').find(':checkbox[name^="table"]').each(function () { + $(this).prop("checked", ($.inArray($(this).val(), arr) != -1)); + }); + alert(arr[0]); }); } \ No newline at end of file