Improved the checkboxes behaviour in generic list template

This commit is contained in:
Roberto Rosario
2011-04-19 19:07:47 -04:00
parent 8a28f87fe1
commit 7f4be1bb0b

View File

@@ -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>