-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconsultatipoalimento.php
94 lines (79 loc) · 2.7 KB
/
consultatipoalimento.php
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Listado Tipo Articulo</title>
<script type="text/javascript" charset="utf-8">
$j(document).ready(function() {
var oTable = $j('#consutipoarticulo').dataTable( {
"aoColumnDefs": [
{ "bSearchable": false, "aTargets": [ 0 ] }
],
"sDom": 'T<"clear">lfrtip',
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "administracion/tipoarticulo/server_tipoarticulo.php"
} );
/*
// CARGAR DIV PARA EDITAR LOS REGISTROS SEGUN EL QUE SEA SELECCIONADO EN LA TABLA ADMINISTRAR
$j("#consutipoarticulo tbody").click(function(event) {
var aData = oTable.fnGetData( event.target.parentNode );
var iId = aData[0];
cargarDiv('left','modulos/renglon/editartipoarticulo.php?id='+iId);
// CAMBIAR COLOR A LA FILA SELECCIONADA
$j(oTable.fnSettings().aoData).each(function (){
$j(this.nTr).removeClass('row_selected');
});
$j(event.target.parentNode).addClass('row_selected');
} );
*/
// BUSQUEDA POR COLUMNAS
$j("tfoot input").keyup( function () {
/* Filter on the column (the index) of this element */
//SUMO 1 A $j("tfoot input").index(this) PORQUE COMO HAY UN CAMPO OCULTO NO CORRESPONDE AL NRO DE LA COLUMNA
oTable.fnFilter( this.value, $j("tfoot input").index(this) );
} );
/*
* Support functions to provide a little bit of 'user friendlyness' to the textboxes in
* the footer
*/
var arreglo = new Array();
$j("tfoot input").each( function (i) {
arreglo[i] = this.value;
} );
$j("tfoot input").focus( function () {
if ( this.className == "search_init" )
{
this.className = "";
this.value = "";
}
} );
$j("tfoot input").blur( function (i) {
if ( this.value == "" )
{
this.className = "search_init";
this.value = arreglo[$j("tfoot input").index(this)];
}
} );
} );
</script>
</head>
<h1>Tipo Articulo</h1>
<table cellpadding="0" cellspacing="0" border="0" class="display" id="consutipoarticulo">
<thead>
<tr>
<th width="5%">Id</th>
<th width="20%">Nombre</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="3" class="dataTables_empty">Cargando datos del servidor</td>
</tr>
</tbody>
<tfoot>
<tr>
<th><input type="text" name="search_engine" value="Buscar Id" class="search_init" /></th>
<th><input type="text" name="search_engine" value="Buscar Nombre" class="search_init" /></th>
</tr>
</tfoot>
</table>