Commit a0cea691 authored by sun's avatar sun Committed by greggles

Issue #1224444 by sun | neclimdul, moonray: reduce js errors when the subscribe options are limited

parent d389b5a0
(function ($) {
Drupal.behaviors.commentNotify = {
attach: function (context) {
$('#edit-notify-type', context).hide();
$('#edit-notify', context).bind('change', function() {
if ($(this).attr('checked')) {
$('#edit-notify-type', context).show();
if ($('#edit-notify-type input:checked', context).length == 0) {
$('#edit-notify-type input', context)[0].checked = 'checked';
}
}
else {
$('#edit-notify-type', context).hide();
}
});
$('#edit-notify', context).trigger('change');
}
Drupal.behaviors.commentNotify = {
attach: function (context) {
$('#edit-notify', context)
.bind('change', function() {
$('#edit-notify-type', context)
[this.checked ? 'show' : 'hide']()
.find('input[type=checkbox]:checked').attr('checked', 'checked');
})
.trigger('change');
}
}
})(jQuery);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment