ok
Direktori : /home2/selectio/www/mm-tailor-billing/themes/default/views/material_usage/ |
Current File : /home2/selectio/www/mm-tailor-billing/themes/default/views/material_usage/units.php |
<?php (defined('BASEPATH')) OR exit('No direct script access allowed'); ?> <script type="text/javascript"> $(document).ready(function() { var table = $('#catData').DataTable({ 'ajax' : { url: '<?=site_url('material_usage/get_units');?>', type: 'POST', "data": function ( d ) { d.<?=$this->security->get_csrf_token_name();?> = "<?=$this->security->get_csrf_hash()?>"; }}, "buttons": [ { extend: 'copyHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3 ] } }, { extend: 'excelHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3 ] } }, { extend: 'csvHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3 ] } }, { extend: 'pdfHtml5', orientation: 'landscape', pageSize: 'A4', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3 ] } }, { extend: 'colvis', text: 'Columns'}, ], "pageLength": 25, "columns": [ { "data": "id", "visible": false }, { "data": "name", "className": "text-center" }, { "data": "description"}, { "data": "Actions", "className": "text-center" }, ] }); $('#search_table').on( 'keyup change', function (e) { var code = (e.keyCode ? e.keyCode : e.which); if (((code == 13 && table.search() !== this.value) || (table.search() !== '' && this.value === ''))) { table.search( this.value ).draw(); } }); }); </script> <section class="content"> <div class="row"> <div class="col-xs-12"> <div class="box box-primary"> <div class="box-header"> <a href="unit_add" class="btn btn-success btn-sm pull-right">Add New Unit</a> <h3 class="box-title"><?= lang('list_results'); ?></h3> </div> <div class="box-body"> <div class="table-responsive"> <table id="catData" class="table table-striped table-bordered table-condensed table-hover" style="margin-bottom:5px;"> <thead> <tr> <td colspan="3" class="p0"><input type="text" class="form-control b0" name="search_table" id="search_table" placeholder="<?= lang('type_hit_enter'); ?>" style="width:100%;"></td> </tr> <tr class="active"> <th style="max-width:30px;"><?= lang("id"); ?></th> <th style="max-width:200px;">Name</th> <th style="width:250px;">Description</th> <th style="width:100px;">Actions</th> </tr> </thead> <tbody> <tr> <td colspan="3" class="dataTables_empty"><?= lang('loading_data_from_server'); ?></td> </tr> </tbody> <tfoot> </tfoot> </table> </div> <div class="clearfix"></div> </div> </div> </div> </div> </section>