Better JS for tables

This commit is contained in:
Ludovic Stephan 2019-01-07 16:28:52 +01:00
parent f66a54bb73
commit ae0abb5cb3
3 changed files with 11 additions and 0 deletions

View file

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

View file

@ -42,6 +42,7 @@
value="S'inscrire pour les places sélectionnées"> value="S'inscrire pour les places sélectionnées">
</form> </form>
<script type="text/javascript" src="{% static "js/joequery-Stupid-Table-Plugin/stupidtable.js" %}"></script>
<script language="JavaScript"> <script language="JavaScript">
function select(check) { function select(check) {
checkboxes = document.getElementsByName("spectacles"); checkboxes = document.getElementsByName("spectacles");
@ -52,5 +53,8 @@
$(function(){ $(function(){
$("table.stupidtable").stupidtable(); $("table.stupidtable").stupidtable();
}); });
$("tr").click(function() {
$(this).find("input[type=checkbox]").click()
})
</script> </script>
{% endblock %} {% endblock %}

View file

@ -81,10 +81,14 @@
</div> </div>
{% endif %} {% endif %}
<script type="text/javascript" src="{% static "js/joequery-Stupid-Table-Plugin/stupidtable.js" %}"></script>
<script language="JavaScript"> <script language="JavaScript">
$(function(){ $(function(){
$("table.stupidtable").stupidtable(); $("table.stupidtable").stupidtable();
}); });
$("tr").click(function() {
$(this).find("input[type=checkbox]").click()
})
</script> </script>