<%@include file="/jsp/common/defaultTopLogin.jsp"%>
<script src="${contextPath}/js/common/perfil/perfilService.js?v=${versionJS}"></script>
<script src="${contextPath}/js/common/perfil/perfilController.js?v=${versionJS}"></script>
<script>

	$(document).ready(
		function() {
			var perfilController = new PerfilController();
			perfilController.ejecutarPerfil('43');
			realizaConsulta();
			$("table thead tr").addClass("encabezado");
			
			   $('#filtro').on( 'keyup click', function () {
			        filterGlobal();
			    } );
		}
	);

	function realizaConsulta(){
	    var oTable = null;
	    oTable = $('#cataMaterial').DataTable({
	        autoWidth: false,
	        language: {	
	            processing: "Procesando...",
	            lengthMenu: "Mostrar _MENU_ registros",
	            zeroRecords: "Sin eventos encontrados",
	            emptyTable: "Sin eventos encontrados",
	            info: "Mostrando _START_ al _END_ de _TOTAL_",
	            infoEmpty: "0 registros",
	            infoFiltered: "(filtrado de un total de _MAX_ registros)",
	            search: "Buscar:",
	            thousands: ",",
	            loadingRecords: "Cargando...",
	            paginate: {
	                first: "Primero",
	                last: "&Uacute;ltimo",
	                next: "Siguiente",
	                previous: "Anterior"
	            }
	        },
	        pageLength: 10,
	        info: true,
	        filter: true,
	        ordering: false,
	        paging: true,
	        pagingType: "full_numbers",
	        order: [],
	        ajax: {
	            url: "indexlistadoMateriales",
	            dataSrc: ""
	        },
	        columns: [
	            { title: "C&oacute;digo SAP", data: "codigoSap", searchable: true, width: "90px" },
	            { title: "Descripción Material", data: "descripcionMaterial", searchable: true, width: "60px" },
	            { title: "Unidad de Medida", data: "unidadMedida", searchable: true, width: "40px" },
	            { title: "Código Iso Medida", data: "codigoIsoMedida", searchable: true, width: "40px" },
	            { title: "Material Antiguo", data: "materialAntiguo", searchable: true, width: "40px" }
	        ]
	    });
	}

	
	

</script>
	
	<table id="cataMaterial" class="table table-striped">
				
	</table>
	
<%@include file="/jsp/common/defaultBottomLogin.jsp"%>
