Mini Shell
(function ($) {
'use strict';
$(function () {
$('#order-listing').DataTable({
"aLengthMenu": [
[5, 10, 15, -1],
[5, 10, 15, "All"]
],
"iDisplayLength": 5,
"bLengthChange": false,
"language": {
search: "Search :"
}
});
$('#order-listing').each(function () {
var datatable = $(this);
// SEARCH - Add the placeholder for Search and Turn this into in-line form control
var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
search_input.attr('placeholder', 'Search here');
// search_input.removeClass('form-control-sm');
var s = datatable.closest('.dataTables_wrapper').find(".dataTables_filter").append('<button type="button" class="btn btn-primary ml-2">New Record</button>');
});
});
$(function () {
var fixedColumnTable = $('#fixed-column').DataTable({
"aLengthMenu": [
[10, 50, 100, -1],
[10, 50, 100, "All"]
],
columnDefs: [{
orderable: false,
targets: [3]
}],
fixedHeader: {
header: false,
footer: true
},
bAutoWidth: false,
paging: false,
fixedColumns: true,
"paging": true,
"lengthChange": false,
"searching": true,
"ordering": true,
"info": true,
"autoWidth": false,
"iDisplayLength": 10,
"bLengthChange": false,
"language": {
search: "Search :"
},
dom: '<"col-md-12"<"row"<"col-md-6"B><"col-md-6"f> > ><"col-md-12"rt> <"col-md-12"<"row"<"col-md-5"i><"col-md-7"p>>>',
buttons: {
buttons: [
{ extend: 'copy', className: 'btn btn-primary' },
{ extend: 'csv', className: 'btn btn-primary' },
{ extend: 'excel', className: 'btn btn-primary' },
{ extend: 'print', className: 'btn btn-primary' }
]
},
});
$('#fixed-column').each(function () {
var datatable = $(this);
// SEARCH - Add the placeholder for Search and Turn this into in-line form control
var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
search_input.attr('placeholder', 'Search here');
// search_input.removeClass('form-control-sm');
// var s = datatable.closest('.dataTables_wrapper').find(".dataTables_filter").append('<button type="button" class="btn btn-primary ml-2">New Record</button>');
});
$('#fixed-column_wrapper').resize(function() {
fixedColumnTable.draw();
});
});
})(jQuery);
Zerion Mini Shell 1.0