Checkbox to select all entries of a datatable
This commit is contained in:
parent
0e2908cb83
commit
05d488490a
|
@ -139,4 +139,15 @@ jQuery(document).ready(function()
|
|||
form.trigger("reset");
|
||||
});
|
||||
});
|
||||
|
||||
jQuery('body').on('change', '.datatable #check-all', function (e) {
|
||||
if (jQuery(e.target).is(':checked'))
|
||||
{
|
||||
jQuery(e.target).parents('.datatable').find('input[type="checkbox"]').prop('checked', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery(e.target).parents('.datatable').find('input[type="checkbox"]').prop('checked', false);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<th>Début de l'appel</th>
|
||||
<th>Fin de l'appel</th>
|
||||
<th>Direction</th>
|
||||
<th class="checkcolumn">✓</th>
|
||||
<th class="checkcolumn"><input type="checkbox" id="check-all"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<th>Nom</th>
|
||||
<th>Script</th>
|
||||
<th>Admin obligatoire</th>
|
||||
<th class="checkcolumn">✓</th>
|
||||
<th class="checkcolumn"><input type="checkbox" id="check-all"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<th>Condition</th>
|
||||
<th>Date de création</th>
|
||||
<th>Dernière modification</th>
|
||||
<th class="checkcolumn">✓</th>
|
||||
<th class="checkcolumn"><input type="checkbox" id="check-all"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
<th>Numéro</th>
|
||||
<th>Date de création</th>
|
||||
<th>Dernière modification</th>
|
||||
<th class="checkcolumn">✓</th>
|
||||
<th class="checkcolumn"><input type="checkbox" id="check-all"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<th>Date</th>
|
||||
<th>Texte</th>
|
||||
<?php if ($_SESSION['user']['admin']) { ?>
|
||||
<th class="checkcolumn">✓</th>
|
||||
<th class="checkcolumn"><input type="checkbox" id="check-all"/></th>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<th>Nombre de contacts</th>
|
||||
<th>Date de création</th>
|
||||
<th>Dernière modification</th>
|
||||
<th class="checkcolumn">✓</th>
|
||||
<th class="checkcolumn"><input type="checkbox" id="check-all"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<th>Nom</th>
|
||||
<th>Type de téléphone</th>
|
||||
<th>Callbacks</th>
|
||||
<th class="checkcolumn">✓</th>
|
||||
<th class="checkcolumn"><input type="checkbox" id="check-all"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
<th>Date</th>
|
||||
<th>Status</th>
|
||||
<th>Commande</th>
|
||||
<th class="checkcolumn">✓</th>
|
||||
<th class="checkcolumn"><input type="checkbox" id="check-all"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Contenu</th>
|
||||
<th class="checkcolumn">✓</th>
|
||||
<th class="checkcolumn"><input type="checkbox" id="check-all"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<th>Message</th>
|
||||
<th>Date</th>
|
||||
<th>Statut</th>
|
||||
<th class="checkcolumn">✓</th>
|
||||
<th class="checkcolumn"><input type="checkbox" id="check-all"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<tr>
|
||||
<th>Numéro</th>
|
||||
<?php if ($_SESSION['user']['admin']) { ?>
|
||||
<th class="checkcolumn">✓</th>
|
||||
<th class="checkcolumn"><input type="checkbox" id="check-all"/></th>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<th>Admin</th>
|
||||
<th>Statut</th>
|
||||
<th>Crédit utilisé</th>
|
||||
<th class="checkcolumn">✓</th>
|
||||
<th class="checkcolumn"><input type="checkbox" id="check-all"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<tr>
|
||||
<th>Url</th>
|
||||
<th>Type de webhook</th>
|
||||
<th class="checkcolumn">✓</th>
|
||||
<th class="checkcolumn"><input type="checkbox" id="check-all"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
Loading…
Reference in New Issue