1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
$(document).ready(function() {
var myDT = $('#tableGroup').DataTable({
"lengthChange": false,
"pageLength": 8,
"pagingType": "input",
"data": <?php echo json_encode($this->listeApplis); ?>,
"columns": [
{"data": "AppliName"},
{"data": null}
],
"columnDefs": [
{
"targets": -1,
"orderable": false,
"searchable": false,
"render": function (data, type, row) {
var rId = randomId();
return '<label for="' + rId + '">Sélection</label>' +
'<input id="' + rId + '" class="stdRadio rSlct" name="AppliDN" type="radio"' +
' value="' + row.AppliDN + '">' +
'<input name="AppliName" type="hidden" value="' + row.AppliName + '" >';
}
}
],
"drawCallback": function (settings) {
/* Pour déselctionner les boutons radio si je passe à une autre page */
$("#" + rID + "").prop('checked', false);
},
language: {
processing: "Traitement en cours...",
search: "Filtrer :",
lengthMenu: "Afficher _MENU_ éléments",
info: "Affichage de l'élement _START_ à _END_ sur _TOTAL_ éléments",
infoEmpty: "Affichage de l'élement 0 à 0 sur 0 éléments",
infoFiltered: "(filtré de _MAX_ éléments au total)",
infoPostFix: "",
loadingRecords: "Chargement en cours...",
zeroRecords: "Aucun élément à afficher",
emptyTable: "Aucune donnée disponible dans le tableau",
paginate: {
first: "<<",
previous: "<",
next: ">",
last: ">>"
},
aria: {
sortAscending: ": activer pour trier la colonne par ordre croissant",
sortDescending: ": activer pour trier la colonne par ordre décroissant"
}
}
});
$('.stdRadio').checkboxradio();
$(".paginate_button").click(function () {
$('.rSlct').checkboxradio();
});
}); |
Partager