$(function () {
var pgurl = window.location.href.substr(
window.location.href.lastIndexOf('/') + 1
)
$('#navbar-collapse ul li a').each(function () {
if ($(this).attr('href') == pgurl || $(this).attr('href') == '')
$(this).parent().addClass('active')
})
})
function dataTableExportButtons(table) {
$(
'
'
).prependTo('#' + table.table().container().id)
new $.fn.dataTable.Buttons(table, {
name: 'exports',
buttons: [
{
extend: 'copyHtml5',
text: '',
titleAttr: 'Copy',
},
{
extend: 'excelHtml5',
text: '',
titleAttr: 'Excel',
},
{
extend: 'csvHtml5',
text: '',
titleAttr: 'CSV',
},
{
extend: 'pdfHtml5',
text: '',
orientation: 'landscape',
titleAttr: 'PDF',
},
],
})
table
.buttons()
.container()
.appendTo('#' + table.table().container().id + ' #button_group_one')
table
.buttons('exports', null)
.container()
.appendTo('#' + table.table().container().id + ' #button_group_two')
}