Skip to content
Permalink
Browse files

Merge pull request #560 from phpList/checkAllBoxes-in-a-category

Replacement of id attribute with name in checkAllBoxes function-campaigns sending
  • Loading branch information...
samtuke committed Jul 5, 2019
2 parents 57c0a4d + 40d8b4b commit 56104d50f8a47e663089ec920e49b4f07c04925d
Showing with 4 additions and 5 deletions.
  1. +4 −5 public_html/lists/admin/js/phplistapp.js
@@ -61,10 +61,10 @@ function autoSave() {
function checkAllBoxes(checked, checkboxes) {
checkboxes.each(function () {
if (checked) {
$(this).find('input[id^=targetlist]').prop('checked', true);
$(this).find('input[name^=targetlist]').prop('checked', true);
}
else {
$(this).find('input[id^=targetlist]').prop('checked', false);
$(this).find('input[name^=targetlist]').prop('checked', false);
}
});
}
@@ -443,14 +443,13 @@ $(document).ready(function () {

// tick all the boxes in a category.
$('li.selectallcategory').on('click', function () {
if ($(this).find('input[type=checkbox]').attr('id').match('all-lists')) {
if ($(this).find('input[type=checkbox]').attr('name').match('all-lists')) {
var ul = $(this).parent();
var lists = ul.parent().find('li');

checkAllBoxes(lists.find('input[id^=all-lists]').prop('checked'), lists);
checkAllBoxes(lists.find('input[name^=all-lists]').prop('checked'), lists);
}
});

// @TODO, only set when needed
setInterval(getServerTime, 30000);

0 comments on commit 56104d5

Please sign in to comment.
You can’t perform that action at this time.