Browse Source

selecionar todos acessorio e tramitacao em lote (#1170)

pull/1137/merge
Rogério Frá 8 years ago
committed by Edward
parent
commit
47e09bfcf4
  1. 17
      sapl/templates/materia/em_lote/acessorio.html
  2. 18
      sapl/templates/materia/em_lote/tramitacao.html

17
sapl/templates/materia/em_lote/acessorio.html

@ -63,6 +63,13 @@
<fieldset> <fieldset>
<legend>Matérias para inclusão do Documento Acessório</legend> <legend>Matérias para inclusão do Documento Acessório</legend>
<table class="table table-striped table-hover"> <table class="table table-striped table-hover">
<div class="controls">
<div class="checkbox">
<label for="id_check_all">
<input type="checkbox" id="id_check_all" onchange="checkAll(event)" /> Marcar/Desmarcar Todos
</label>
</div>
</div>
<thead> <thead>
<tr><th>Matéria</th></tr> <tr><th>Matéria</th></tr>
</thead> </thead>
@ -85,3 +92,13 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endblock detail_content %} {% endblock detail_content %}
{% block extra_js %}
<script language="JavaScript">
function checkAll(event) {
$('[name=materia_id]').each(function() {
$(this).prop('checked', event.target.checked ? 'checked': null);
$(this).trigger('click');
});
}
</script>
{% endblock %}

18
sapl/templates/materia/em_lote/tramitacao.html

@ -93,11 +93,19 @@
<fieldset> <fieldset>
<legend>2. Selecione as matérias para primeira tramitação:</legend> <legend>2. Selecione as matérias para primeira tramitação:</legend>
<table class="table table-striped table-hover"> <table class="table table-striped table-hover">
<div class="controls">
<div class="checkbox">
<label for="id_check_all">
<input type="checkbox" id="id_check_all" onchange="checkAll(event)" /> Marcar/Desmarcar Todos
</label>
</div>
</div>
<thead> <thead>
<tr><th>Matéria</th></tr> <tr><th>Matéria</th></tr>
</thead> </thead>
<tbody> <tbody>
{% for materia in object_list %} {% for materia in object_list %}
<tr> <tr>
<td> <td>
<input type="checkbox" name="materia_id" value="{{materia.id}}" {% if check %} checked {% endif %}/> <input type="checkbox" name="materia_id" value="{{materia.id}}" {% if check %} checked {% endif %}/>
@ -115,3 +123,13 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endblock detail_content %} {% endblock detail_content %}
{% block extra_js %}
<script language="JavaScript">
function checkAll(event) {
$('[name=materia_id]').each(function() {
$(this).prop('checked', event.target.checked ? 'checked': null);
$(this).trigger('click');
});
}
</script>
{% endblock %}

Loading…
Cancel
Save