14 lines
563 B
JavaScript
14 lines
563 B
JavaScript
/**
|
|
* 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]);
|
|
});
|
|
} |