Commit e6d7b04a by Billy Larru

agregando language al datatable proyeccion asistencias policias

parent 76e42fb4
......@@ -27,6 +27,28 @@ function mostrarVistaPrevia() {
console.log(data);
$("#tblAsistenciaPolicias").DataTable().destroy();
$("#tblAsistenciaPolicias").DataTable({
"language": {
"lengthMenu": "Mostrar: _MENU_",
"zeroRecords": "    No se encontraron resultados",
"info": "    Mostrando del _START_ al _END_ de un total de _TOTAL_ registros",
"infoEmpty": "    Mostrando 0 de 0 registros",
"search": "Filtrar:",
"loadingRecords": "Cargando...",
"processing": '<span style="width:100%;"><img src="http://www.snacklocal.com/images/ajaxload.gif"></span>',
"paginate": {
"first": "First",
"last": "Last",
"next": "Siguiente",
"previous": "Anterior"
}
},
"bSort": false,
"bFilter": false,
"aaSorting": [],
"ordering": false,
"bLengthChange": false,
"bInfo": true,
"paging": true,
iDisplayLength: 50,
bStateSave: false,
autoWidth: false,
......@@ -48,15 +70,15 @@ function mostrarVistaPrevia() {
{
"data": "tipo_horario",
"className": "text-center",
render: (data)=>{
render: (data) => {
let label = '';
switch(data){
switch (data) {
case "REGULAR":
label= `label bg-slate border-slate-700`;
break;
label = `label bg-slate border-slate-700`;
break;
}
return `<span class="${label}">${data}</span>`;
}
},
......@@ -112,7 +134,7 @@ $(function () {
});
$("#dpFechaFin").datepicker('setDate', 'now');
defaultConfigDataTable();
// defaultConfigDataTable();
initializeData();
$("#btnVistaPrevia").click(mostrarVistaPrevia);
});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment