Fix javascript code

This commit is contained in:
Ludovic Stephan 2019-01-07 22:52:18 +01:00
parent 55c1d7f02c
commit 1f3e65fa68
3 changed files with 18 additions and 3 deletions

View file

@ -109,9 +109,14 @@
$(function(){ $(function(){
$("table.stupidtable").stupidtable(); $("table.stupidtable").stupidtable();
}); });
$("tr").click(function() { $("tr").click(function() {
$(this).find("input[type=checkbox]").click() $(this).find("input[type=checkbox]").click()
}) });
$("input[type=checkbox]").click(function(e) {
e.stopPropagation();
});
</script> </script>
{% endblock %} {% endblock %}

View file

@ -53,8 +53,13 @@
$(function(){ $(function(){
$("table.stupidtable").stupidtable(); $("table.stupidtable").stupidtable();
}); });
$("tr").click(function() { $("tr").click(function() {
$(this).find("input[type=checkbox]").click() $(this).find("input[type=checkbox]").click()
}) });
$("input[type=checkbox]").click(function(e) {
e.stopPropagation();
});
</script> </script>
{% endblock %} {% endblock %}

View file

@ -86,9 +86,14 @@
$(function(){ $(function(){
$("table.stupidtable").stupidtable(); $("table.stupidtable").stupidtable();
}); });
$("tr").click(function() { $("tr").click(function() {
$(this).find("input[type=checkbox]").click() $(this).find("input[type=checkbox]").click()
}) });
$("input[type=checkbox]").click(function(e) {
e.stopPropagation();
});
</script> </script>