# HG changeset patch # User verrierj # Date 1314805967 -7200 # Node ID e6cd648f4f16004fe416f4a93cdf0362660e9f54 # Parent ed5e74f89be0266446fd58819f2f8c2d92c58ca9 Add checkbox to select/deselect project diff -r ed5e74f89be0 -r e6cd648f4f16 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_ldt.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_ldt.html Wed Aug 31 16:33:03 2011 +0200 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_ldt.html Wed Aug 31 17:52:47 2011 +0200 @@ -26,14 +26,14 @@ parent.$.nmTop().close(); }); - $("#check_all").click(function () { - $(".cellcheckbox input").attr('checked', true) + $("#check_projects").change(function () { + if ($("#check_projects").is(":checked")) { + $(".cellcheckbox input").attr('checked', 'true'); + } else { + $(".cellcheckbox input").removeAttr('checked'); + } }); - - $("#uncheck_all").click(function () { - $(".cellcheckbox input").attr('checked', false) - }); - + }); {% endblock %} @@ -46,8 +46,7 @@ {{form.title}} - - {% trans "Check all" %} / {% trans "Uncheck all" %} +