Improved the checkboxes behaviour in generic list template
This commit is contained in:
@@ -41,13 +41,10 @@
|
||||
$(".dismiss").click(function(){
|
||||
$(this).parent().parent().fadeOut("slow"); return false;
|
||||
});
|
||||
$('.table :checkbox.toggle').each(function(i, toggle) {
|
||||
$(toggle).change(function(e) {
|
||||
$(toggle).parents('table:first').find(':checkbox:not(.toggle)').each(function(j, checkbox) {
|
||||
checkbox.checked = !checkbox.checked;
|
||||
})
|
||||
});
|
||||
});
|
||||
$('th input:checkbox').click(function(e) {
|
||||
var table = $(e.target).closest('table');
|
||||
$('td input:checkbox', table).attr('checked', e.target.checked);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user