mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
Checkbox to select all entries of a datatable
This commit is contained in:
parent
0e2908cb83
commit
05d488490a
14 changed files with 24 additions and 13 deletions
|
@ -139,4 +139,15 @@ jQuery(document).ready(function()
|
|||
form.trigger("reset");
|
||||
});
|
||||
});
|
||||
|
||||
jQuery('body').on('change', '.datatable #check-all', function (e) {
|
||||
if (jQuery(e.target).is(':checked'))
|
||||
{
|
||||
jQuery(e.target).parents('.datatable').find('input[type="checkbox"]').prop('checked', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery(e.target).parents('.datatable').find('input[type="checkbox"]').prop('checked', false);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue