Atualizando arquivos
This commit is contained in:
parent
4358a85453
commit
77a048d2bb
2 changed files with 7 additions and 7 deletions
10
js/main.js
10
js/main.js
|
|
@ -2026,10 +2026,10 @@ function viewNotify(width, height, title, message, funct=null, close=null, check
|
|||
}
|
||||
|
||||
//Marca e desmarca todos os checkboxes de uma tabela
|
||||
function alternarCheckboxes() {
|
||||
const checkboxes = document.querySelectorAll('input.child');
|
||||
const todosMarcados = Array.from(checkboxes).every(cb => cb.checked);
|
||||
function alternarCheckboxPrincipal() {
|
||||
// Seleciona o checkbox pelo ID
|
||||
const checkbox = document.getElementById('group');
|
||||
|
||||
// Se todos estiverem marcados, desmarca todos; senão, marca todos
|
||||
checkboxes.forEach(cb => cb.checked = !todosMarcados);
|
||||
// Inverte o estado atual (checked → false ou true)
|
||||
checkbox.checked = !checkbox.checked;
|
||||
}
|
||||
|
|
@ -71,7 +71,7 @@ try{
|
|||
?>
|
||||
|
||||
<tr onclick="prepareBudget('#id-<?php echo $i;?>', 'products', '<?php echo $Result->product_ids;?>', 0)" id="id-<?php echo $i;?>">
|
||||
<td class="text-center"><input type="checkbox" id="group" name="group" value="S" checked=true></td>
|
||||
<td class="text-center"><input type="checkbox" class="group" id="group" name="group" value="S" checked=true></td>
|
||||
<td><?php echo $Result->products;?></td>
|
||||
<td class="text-center" width="165"><?php echo $Result->references;?></td>
|
||||
<td>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue