|
@@ -25,6 +25,8 @@ function initializeDataTable() {
|
|
|
var dataTableName = document.getElementById('datatable-config').dataset.datatableName;
|
|
var dataTableName = document.getElementById('datatable-config').dataset.datatableName;
|
|
|
var dataTableColumnsConfig = JSON.parse(document.getElementById('datatable-config').dataset.datatableColumnsConfig);
|
|
var dataTableColumnsConfig = JSON.parse(document.getElementById('datatable-config').dataset.datatableColumnsConfig);
|
|
|
var dataTableHeadersConfig = JSON.parse(document.getElementById('datatable-config').dataset.datatableHeadersConfig);
|
|
var dataTableHeadersConfig = JSON.parse(document.getElementById('datatable-config').dataset.datatableHeadersConfig);
|
|
|
|
|
+ var dataTablesButtonsConfig = JSON.parse(document.getElementById('datatable-config').dataset.datatableButtonsConfig);
|
|
|
|
|
+ var dataTablesColumnDefsConfig = JSON.parse(document.getElementById('datatable-config').dataset.datatableColumnDefsConfig);
|
|
|
|
|
|
|
|
|
|
|
|
|
//Set up any action columns
|
|
//Set up any action columns
|
|
@@ -130,21 +132,11 @@ function initializeDataTable() {
|
|
|
},
|
|
},
|
|
|
columns: dataTableColumnsConfig,
|
|
columns: dataTableColumnsConfig,
|
|
|
dom: 'lBfrtip',
|
|
dom: 'lBfrtip',
|
|
|
- buttons: [
|
|
|
|
|
- { extend: 'copyHtml5', className: 'dt-button' },
|
|
|
|
|
- { extend: 'csvHtml5', className: 'dt-button' },
|
|
|
|
|
- { extend: 'excelHtml5', className: 'dt-button' },
|
|
|
|
|
- { extend: 'pdfHtml5', className: 'dt-button' },
|
|
|
|
|
- { extend: 'print', className: 'dt-button' },
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+ buttons: dataTablesButtonsConfig,
|
|
|
layout: {
|
|
layout: {
|
|
|
topStart: 'buttons'
|
|
topStart: 'buttons'
|
|
|
},
|
|
},
|
|
|
- columnDefs: [
|
|
|
|
|
- { responsivePriority: 1, targets: 1 },
|
|
|
|
|
- { responsivePriority: 2, targets: -1 },
|
|
|
|
|
- {visible:false, targets:0}
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ columnDefs: dataTablesColumnDefsConfig
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
document.addEventListener('livewire:init', function () {
|
|
document.addEventListener('livewire:init', function () {
|