<?php $__env->startSection('content'); ?>
<style type="text/css">
.filterable {
margin-top: 15px;
}
.filterable .panel-heading .pull-right {
margin-top: -20px;
}
.filterable .filters input[disabled] {
background-color: transparent;
border: none;
cursor: auto;
box-shadow: none;
padding: 0;
height: auto;
}
.filterable .filters input[disabled]::-webkit-input-placeholder {
color: #333;
}
.filterable .filters input[disabled]::-moz-placeholder {
color: #333;
}
.filterable .filters input[disabled]:-ms-input-placeholder {
color: #333;
}
</style>
<div id="page-content">
<div class="content-header">
<div class="header-section">
<h1>
<i class="fa fa-recycle"></i>Configurador de Pesos por Cliente<br><small>Recolectora Metropolitana</small>
</h1>
</div>
</div>
<div class="block">
<div class="block-title">
<h2><strong>Peso de Clientes</strong> </h2>
<div class="block-options pull-right">
<a href="javascript:void(0)" class="btn btn-alt btn-sm btn-default toggle-bordered enable-tooltip" data-toggle="button" title="" data-original-title="">Editar</a>
<a href="javascript:void(0)" class="btn btn-alt btn-sm btn-default toggle-bordered enable-tooltip" data-toggle="button" title="" data-original-title="">Filtrar</a>
</div>
</div>
<div class="panel filterable block full table-responsive">
<div class="pull-right">
<button onclick="Peso.tableFilter(this)" id="filter" class="btn btn-default btn-xs btn-filter"><span class="glyphicon glyphicon-filter"></span> Filter</button>
</div>
<table class="table table-hover">
<thead>
<tr class="filters">
<th class="text-center"><input type="text" class="form-control text-center" placeholder="Cliente" disabled></th>
<th class="text-center"><input type="text" class="form-control text-center" placeholder="Mes" disabled></th>
<th class="text-center"><input type="text" class="form-control text-center" placeholder="Couta" disabled></th>
<th class="text-center"><input type="text" class="form-control text-center" placeholder="Unidad" disabled></th>
<th class="text-center"><input type="text" class="form-control text-center" placeholder="Peso" disabled></th>
</tr>
</thead>
<tbody>
<?php foreach( $peso_all as $peso ): ?>
<tr >
<td class="text-center"><?php echo $peso->nombre_comercial; ?></td>
<td class="text-center"><?php echo $peso->mes; ?></td>
<td class="text-center"><?php echo $peso->cuota; ?></td>
<td class="text-center"><?php echo $peso->unidad; ?></td>
<td class="text-center"><?php echo $peso->peso; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
<script src="<?php echo e(URL::To('/js/catalogo_js/peso.js')); ?>"></script>
<script type="text/javascript">
$('.filterable .filters input').keyup(function(e){
/* Ignore tab key */
var code = e.keyCode || e.which;
if (code == '9') return;
/* Useful DOM data and selectors */
var $input = $(this),
inputContent = $input.val().toLowerCase(),
$panel = $input.parents('.filterable'),
column = $panel.find('.filters th').index($input.parents('th')),
$table = $panel.find('.table'),
$rows = $table.find('tbody tr');
/* Dirtiest filter function ever ;) */
var $filteredRows = $rows.filter(function(){
var value = $(this).find('td').eq(column).text().toLowerCase();
return value.indexOf(inputContent) === -1;
});
/* Clean previous no-result if exist */
$table.find('tbody .no-result').remove();
/* Show all rows, hide filtered ones (never do that outside of a demo ! xD) */
$rows.show();
$filteredRows.hide();
/* Prepend no-result row if all rows are filtered */
if ($filteredRows.length === $rows.length) {
$table.find('tbody').prepend($('<tr class="no-result text-center"><td colspan="'+ $table.find('.filters th').length +'">No result found</td></tr>'));
}
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>