This commit is contained in:
Nathan Coad
2016-06-03 11:17:32 +10:00
parent 8b31d1bebf
commit fd084499b4
2 changed files with 7 additions and 5 deletions

View File

@@ -2,13 +2,11 @@
* Special Effects AJAX framework command.
*/
Drupal.ajax.prototype.commands.bookingEmailIDs = function(ajax, response, status) {
jQuery(function($) {
var arr = $.parseJSON($('input#booking_email_default_ids').val())
$('#booking-manual-email-form').find(':checkbox[name^="table"]').each(function () {
//.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]);
});
});
}