Skip to content

Commit

Permalink
Merge pull request #560 from phpList/checkAllBoxes-in-a-category
Browse files Browse the repository at this point in the history
Replacement of id attribute with name in checkAllBoxes function-campaigns sending
  • Loading branch information
samtuke committed Jul 5, 2019
2 parents 57c0a4d + 40d8b4b commit 56104d5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions public_html/lists/admin/js/phplistapp.js
Expand Up @@ -61,10 +61,10 @@ function autoSave() {
function checkAllBoxes(checked, checkboxes) { function checkAllBoxes(checked, checkboxes) {
checkboxes.each(function () { checkboxes.each(function () {
if (checked) { if (checked) {
$(this).find('input[id^=targetlist]').prop('checked', true); $(this).find('input[name^=targetlist]').prop('checked', true);
} }
else { else {
$(this).find('input[id^=targetlist]').prop('checked', false); $(this).find('input[name^=targetlist]').prop('checked', false);
} }
}); });
} }
Expand Down Expand Up @@ -443,14 +443,13 @@ $(document).ready(function () {


// tick all the boxes in a category. // tick all the boxes in a category.
$('li.selectallcategory').on('click', function () { $('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 ul = $(this).parent();
var lists = ul.parent().find('li'); 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 // @TODO, only set when needed
setInterval(getServerTime, 30000); setInterval(getServerTime, 30000);


Expand Down

0 comments on commit 56104d5

Please sign in to comment.