Centralize default DataTables init settings (references #424)

This commit is contained in:
Bernd Bestel
2019-10-15 19:38:51 +02:00
parent 1b0308f39d
commit 9e1804252e
27 changed files with 38 additions and 381 deletions

View File

@@ -1,23 +1,9 @@
var tasksTable = $('#tasks-table').DataTable({
'paginate': false,
'order': [[2, 'desc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'visible': false, 'targets': 3 }
],
'language': IsJsonString(__t('datatables_localization')) ? JSON.parse(__t('datatables_localization')) : { },
'scrollY': false,
'colReorder': true,
'stateSave': true,
'stateSaveParams': function(settings, data)
{
data.search.search = "";
data.columns.forEach(column =>
{
column.search.search = "";
});
},
'rowGroup': {
dataSrc: 3
}