mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 18:21:04 +08:00
35 lines
691 B
JavaScript
35 lines
691 B
JavaScript
|
// Initialize teams DataTable
|
||
|
function initTeamsTable() {
|
||
|
teamsDatatable = $('#teams-table').DataTable({
|
||
|
order: [[0, 'asc']],
|
||
|
dom: 'RBltpi',
|
||
|
stateSave: true,
|
||
|
buttons: [],
|
||
|
processing: true,
|
||
|
serverSide: true,
|
||
|
ajax: {
|
||
|
url: $('#teams-table').data('source'),
|
||
|
type: 'POST'
|
||
|
},
|
||
|
colReorder: {
|
||
|
fixedColumnsLeft: 1000000 // Disable reordering
|
||
|
},
|
||
|
columnDefs: [{
|
||
|
targets: [0, 1],
|
||
|
orderable: true,
|
||
|
searchable: false
|
||
|
}, {
|
||
|
targets: [2],
|
||
|
searchable: false,
|
||
|
orderable: true
|
||
|
}, {
|
||
|
targets: [3],
|
||
|
searchable: false,
|
||
|
orderable: false,
|
||
|
sWidth: '1%'
|
||
|
}]
|
||
|
});
|
||
|
}
|
||
|
|
||
|
initTeamsTable();
|