1
0
forked from qwerty/milfs

mejortas datatables

This commit is contained in:
humano 2020-05-20 18:49:26 -05:00
parent b31ac5df77
commit d6f9bcc0cb

View File

@ -2357,7 +2357,13 @@ if($tipo ==""){
</div>"; </div>";
$titulos="<th></th>$titulo"; $titulos="<th></th>$titulo";
}else {$cabecera=''; $titulos=""; } }
elseif($tipo =="exportable"){
$cabecera='';
$titulos="<th></th>$titulo";
$pie="";
}
else {$cabecera=''; $titulos=""; }
$fila=1; $fila=1;
while( $row = mysqli_fetch_array( $sql ) ) { while( $row = mysqli_fetch_array( $sql ) ) {
@ -2371,14 +2377,33 @@ $linea = formulario_imprimir_linea("$id","$row[control]","linea_planilla");
} }
$tabla= "$cabecera <table class='table table-bordered table-striped exportable'><thead>$titulos</thead><tbody>$despliegue</tbody></table>$pie"; $tabla= "$cabecera <table class='table table-bordered table-striped exportable'><thead>$titulos</thead><tbody>$despliegue</tbody>
<tfoot>$titulos</tfoot>
</table>$pie";
return "<div class='container-fluid'>$tabla</div> return "<div class='container-fluid'>$tabla</div>
<script type='text/javascript'> <script type='text/javascript'>
$('.exportable').DataTable( { $('.exportable').DataTable( {
fixedHeader: {
header: true,
footer: true
},
responsive: {
breakpoints: [
{name: 'bigdesktop', width: Infinity},
{name: 'meddesktop', width: 1480},
{name: 'smalldesktop', width: 1280},
{name: 'medium', width: 1188},
{name: 'tabletl', width: 1024},
{name: 'btwtabllandp', width: 848},
{name: 'tabletp', width: 768},
{name: 'mobilel', width: 480},
{name: 'mobilep', width: 320}
]
},
dom: 'Bfrtip', dom: 'Bfrtip',
pageLength:$registros, pageLength:$registros,
buttons: [ buttons: [
'copy', 'excel', 'csv','print' 'copy', 'excel', 'csv','print','pdf'
] ]
} ); } );
</script>"; </script>";
@ -4782,7 +4807,7 @@ $equipo_listado .="$equipos";
$resultado =" $resultado ="
<div class='input-group'> <div class='input-group'>
<input name='campo_busqueda' id='campo_busqueda' onkeyup= \"xajax_listado_items(xajax.getFormValues('formulario_items'),(this.value),'div_equipo_listado'); \"class='form-control' type='text' placeholder='Buscar'> <input autocomplete='new-password' name='campo_busqueda' id='campo_busqueda' onkeyup= \"xajax_listado_items(xajax.getFormValues('formulario_items'),(this.value),'div_equipo_listado'); \"class='form-control' type='text' placeholder='Buscar'>
<span class='input-group-btn' id='boton_limpiar'></span> <span class='input-group-btn' id='boton_limpiar'></span>
</div> </div>
<br> <br>