mirror of
https://github.com/grocy/grocy.git
synced 2025-08-19 20:11:16 +00:00
Fix/Workaround for DataTables ColReorder bug with data-order attributes (fixes #2019)
This commit is contained in:
@@ -9,7 +9,7 @@ var shoppingListTable = $('#shoppinglist-table').DataTable({
|
||||
{ 'visible': false, 'targets': 6 },
|
||||
{ 'visible': false, 'targets': 7 },
|
||||
{ 'visible': false, 'targets': 8 },
|
||||
{ "type": "num", "targets": 2 },
|
||||
{ "type": "custom-sort", "targets": 2 },
|
||||
{ "type": "html-num-fmt", "targets": 5 },
|
||||
{ "type": "html-num-fmt", "targets": 6 }
|
||||
].concat($.fn.dataTable.defaults.columnDefs),
|
||||
|
@@ -5,9 +5,9 @@
|
||||
{ 'searchable': false, "targets": 0 },
|
||||
{ 'visible': false, 'targets': 10 },
|
||||
{ "type": "num", "targets": 1 },
|
||||
{ "type": "num", "targets": 3 },
|
||||
{ "type": "custom-sort", "targets": 3 },
|
||||
{ "type": "html", "targets": 4 },
|
||||
{ "type": "html-num-fmt", "targets": 7 },
|
||||
{ "type": "custom-sort", "targets": 7 },
|
||||
{ "type": "html", "targets": 8 },
|
||||
{ "type": "html", "targets": 9 }
|
||||
].concat($.fn.dataTable.defaults.columnDefs)
|
||||
|
@@ -1,4 +1,6 @@
|
||||
var stockOverviewTable = $('#stock-overview-table').DataTable({
|
||||
|
||||
|
||||
var stockOverviewTable = $('#stock-overview-table').DataTable({
|
||||
'order': [[5, 'asc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
@@ -19,15 +21,15 @@
|
||||
{ 'visible': false, 'targets': 16 },
|
||||
{ 'visible': false, 'targets': 17 },
|
||||
{ 'visible': false, 'targets': 18 },
|
||||
{ "type": "num", "targets": 3 },
|
||||
{ "type": "custom-sort", "targets": 3 },
|
||||
{ "type": "html-num-fmt", "targets": 9 },
|
||||
{ "type": "html-num-fmt", "targets": 10 },
|
||||
{ "type": "html", "targets": 5 },
|
||||
{ "type": "html", "targets": 11 },
|
||||
{ "type": "html-num-fmt", "targets": 12 },
|
||||
{ "type": "custom-sort", "targets": 12 },
|
||||
{ "type": "num", "targets": 13 },
|
||||
{ "type": "html-num-fmt", "targets": 4 },
|
||||
{ "type": "html-num-fmt", "targets": 18 }
|
||||
{ "type": "custom-sort", "targets": 18 }
|
||||
].concat($.fn.dataTable.defaults.columnDefs)
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user