diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-10-26 23:50:53 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-10-26 23:50:53 +0200 | 
| commit | bbefc246606527626d60c8e7b0b51ff328d782db (patch) | |
| tree | c5e6f08ceded13091e1450c1cb1999d8c4a1d7be | |
| parent | 42c142e549a2890fcf18aba3049ca713b848d02e (diff) | |
| download | Ishtar-bbefc246606527626d60c8e7b0b51ff328d782db.tar.bz2 Ishtar-bbefc246606527626d60c8e7b0b51ff328d782db.zip | |
Allow the deletion of all parcel with a click (refs #1428)
| -rw-r--r-- | ishtar_common/static/js/ishtar.js | 7 | ||||
| -rw-r--r-- | 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 @@  <tr class='error'><th colspan='2'>{{wizard.form.non_form_errors}}</th></tr>  </table>{%endif%}  {{wizard.form.selection_form}} -<table class='inline-table'> -  <tr>{% for field in wizard.form.forms.0 %}<th>{{ field.label_tag }}</th>{% endfor %}</tr> +<table class='inline-table' id='parcel-table'> +  <tr>{% for field in wizard.form.forms.0 %}<th{% if not forloop.last %} rowspan='2'{% endif %}>{{ field.label_tag }}</th>{% endfor %}</tr> +  <tr><td>({% trans "all"%} <input type='checkbox' name='check-all' class='check-all'/>)</td></tr>    {% inline_formset 'Parcels' wizard.form.forms False %}  </table>  <p><button name="formset_modify" value="{{wizard.steps.current}}">{% trans "Add/Modify" %}</button></p> @@ -26,4 +27,7 @@  {% if next_steps %}<input type="submit" id="submit_end_form" name='validate_and_end' value="{% trans "Validate and end" %}"/>{% endif %}  </div>  </form> +<script type='text/javascript'> +     +</script>  {% endblock %} | 
