scinote-web/app/assets/javascripts/users/settings/teams/datatable.js

31 lines
616 B
JavaScript
Raw Normal View History

// 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, 2],
orderable: true,
searchable: false
}, {
2017-02-07 00:08:20 +08:00
targets: 3,
searchable: false,
orderable: false,
sWidth: '1%'
}]
});
}
initTeamsTable();