telegram_bots/static/js/examples/examples.datatables.tabletools.js

31 lines
789 B
JavaScript
Raw Permalink Normal View History

2019-01-11 19:16:01 +00:00
/*
Name: Tables / Advanced - Examples
Written by: Okler Themes - (http://www.okler.net)
Theme Version: 2.1.1
*/
(function($) {
'use strict';
var datatableInit = function() {
var $table = $('#datatable-tabletools');
var table = $table.dataTable({
sDom: '<"text-right mb-md"T><"row"<"col-lg-6"l><"col-lg-6"f>><"table-responsive"t>p',
buttons: [ 'print', 'excel', 'pdf' ]
});
$('<div />').addClass('dt-buttons mb-2 pb-1 text-right').prependTo('#datatable-tabletools_wrapper');
$table.DataTable().buttons().container().prependTo( '#datatable-tabletools_wrapper .dt-buttons' );
$('#datatable-tabletools_wrapper').find('.btn-secondary').removeClass('btn-secondary').addClass('btn-default');
};
$(function() {
datatableInit();
});
}).apply(this, [jQuery]);