From bbefc246606527626d60c8e7b0b51ff328d782db Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sat, 26 Oct 2013 23:50:53 +0200 Subject: Allow the deletion of all parcel with a click (refs #1428) --- ishtar_common/static/js/ishtar.js | 7 ++++++- ishtar_common/templates/ishtar/wizard/parcels_wizard.html | 8 ++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index 8da9d38dc..13f3896a6 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -61,10 +61,15 @@ $('#to_top_arrow').live('click', function(){ $("html, body").animate({ scrollTop: 0}, 1000); }); +$('.check-all').live('click', function(){ + $(this).closest('table' + ).find('input:checkbox' + ).attr('checked', $(this).is(':checked')); +}); $("#main_menu ul li").live('click', function(){ var current_id = $(this).attr('id'); - console.log(current_id); + console.log(current_id); $("#main_menu ul ul").not($(this).parents('ul')).not($(this).find('ul') ).hide('slow'); $(this).find('ul').show('slow'); diff --git a/ishtar_common/templates/ishtar/wizard/parcels_wizard.html b/ishtar_common/templates/ishtar/wizard/parcels_wizard.html index 5aea689dd..fdce51cdb 100644 --- a/ishtar_common/templates/ishtar/wizard/parcels_wizard.html +++ b/ishtar_common/templates/ishtar/wizard/parcels_wizard.html @@ -15,8 +15,9 @@ {{wizard.form.non_form_errors}} {%endif%} {{wizard.form.selection_form}} - - {% for field in wizard.form.forms.0 %}{% endfor %} +
{{ field.label_tag }}
+ {% for field in wizard.form.forms.0 %}{{ field.label_tag }}{% endfor %} + {% inline_formset 'Parcels' wizard.form.forms False %}
({% trans "all"%} )

@@ -26,4 +27,7 @@ {% if next_steps %}{% endif %} + {% endblock %} -- cgit v1.2.3