Browse Source

Resolvendo problema de marcar todos os checkbox

pull/3294/head
ulyssesBML 4 years ago
parent
commit
f0003ddf89
  1. 17
      sapl/templates/sessao/votacao/votacao_bloco.html

17
sapl/templates/sessao/votacao/votacao_bloco.html

@ -119,16 +119,13 @@
<script language="JavaScript"> <script language="JavaScript">
function checkAll(elem) { function checkAll(elem) {
let checkboxes = document.getElementsByName('marcadas_1'); let checkbox_types = ['marcadas_1', 'marcadas_2', 'marcadas_4']
for (let i = 0; i < checkboxes.length; i++) { for (t in checkbox_types){
if (checkboxes[i].type == 'checkbox') let checkboxes = document.getElementsByName(checkbox_types[t]);
checkboxes[i].checked = elem.checked; for (let i = 0; i < checkboxes.length; i++) {
} if (checkboxes[i].type == 'checkbox')
checkboxes[i].checked = elem.checked;
checkboxes = document.getElementsByName('marcadas_2'); }
for (let i = 0; i < checkboxes.length; i++) {
if (checkboxes[i].type == 'checkbox')
checkboxes[i].checked = elem.checked;
} }
} }

Loading…
Cancel
Save