From 1f3e65fa688e2d489a1fe84f910cdd29c0441b81 Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Mon, 7 Jan 2019 22:52:18 +0100 Subject: [PATCH] Fix javascript code --- bda/templates/bda/revente/manage.html | 7 ++++++- bda/templates/bda/revente/subscribe.html | 7 ++++++- bda/templates/bda/revente/tirages.html | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/bda/templates/bda/revente/manage.html b/bda/templates/bda/revente/manage.html index 4e69aef7..afd3a40f 100644 --- a/bda/templates/bda/revente/manage.html +++ b/bda/templates/bda/revente/manage.html @@ -109,9 +109,14 @@ $(function(){ $("table.stupidtable").stupidtable(); }); + $("tr").click(function() { $(this).find("input[type=checkbox]").click() - }) + }); + + $("input[type=checkbox]").click(function(e) { + e.stopPropagation(); + }); {% endblock %} diff --git a/bda/templates/bda/revente/subscribe.html b/bda/templates/bda/revente/subscribe.html index 5db11d78..fbea28b5 100644 --- a/bda/templates/bda/revente/subscribe.html +++ b/bda/templates/bda/revente/subscribe.html @@ -53,8 +53,13 @@ $(function(){ $("table.stupidtable").stupidtable(); }); + $("tr").click(function() { $(this).find("input[type=checkbox]").click() - }) + }); + + $("input[type=checkbox]").click(function(e) { + e.stopPropagation(); + }); {% endblock %} diff --git a/bda/templates/bda/revente/tirages.html b/bda/templates/bda/revente/tirages.html index 1d72e9b5..4e5c2cfd 100644 --- a/bda/templates/bda/revente/tirages.html +++ b/bda/templates/bda/revente/tirages.html @@ -86,9 +86,14 @@ $(function(){ $("table.stupidtable").stupidtable(); }); + $("tr").click(function() { $(this).find("input[type=checkbox]").click() - }) + }); + + $("input[type=checkbox]").click(function(e) { + e.stopPropagation(); + });