mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +00:00
Fixed DataTables earch / don't search the first column with buttons/menus (fixes #440)
This commit is contained in:
parent
6345e69922
commit
e515f21d3b
@ -28,6 +28,7 @@
|
||||
- New endpoints for the stock transfer & stock entry edit capabilities mentioned above
|
||||
|
||||
### General & other improvements/fixes
|
||||
- Fixed that also the first column (where in most tables only buttons/menus are displayed) in tables was searched when using the general search field
|
||||
- Fixed that the meal plan menu entry (sidebar) was not visible when the calendar was disabled (`FEATURE_FLAG_CALENDAR`) (thanks @lwis)
|
||||
- Slightly optimized table loading & search performance (thanks @lwis)
|
||||
- For integration: If a `GET` parameter `closeAfterCreation` is passed to the product edit page, the window will be closed on save (due to Browser restrictions, this only works when the window was opened from JavaScript) (thanks @Forceu)
|
||||
|
@ -1,7 +1,8 @@
|
||||
var batteriesTable = $('#batteries-table').DataTable({
|
||||
'order': [[1, 'asc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 }
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 }
|
||||
],
|
||||
});
|
||||
$('#batteries-table tbody').removeClass("d-none");
|
||||
|
@ -2,7 +2,8 @@
|
||||
'paginate': true,
|
||||
'order': [[1, 'desc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 }
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 }
|
||||
]
|
||||
});
|
||||
$('#batteries-journal-table tbody').removeClass("d-none");
|
||||
|
@ -1,7 +1,8 @@
|
||||
var batteriesOverviewTable = $('#batteries-overview-table').DataTable({
|
||||
'order': [[2, 'desc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 }
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 }
|
||||
]
|
||||
});
|
||||
$('#batteries-overview-table tbody').removeClass("d-none");
|
||||
|
@ -1,7 +1,8 @@
|
||||
var choresTable = $('#chores-table').DataTable({
|
||||
'order': [[1, 'asc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 }
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 }
|
||||
]
|
||||
});
|
||||
$('#chores-table tbody').removeClass("d-none");
|
||||
|
@ -2,7 +2,8 @@
|
||||
'paginate': true,
|
||||
'order': [[1, 'desc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 }
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 }
|
||||
]
|
||||
});
|
||||
$('#chores-journal-table tbody').removeClass("d-none");
|
||||
|
@ -1,7 +1,8 @@
|
||||
var choresOverviewTable = $('#chores-overview-table').DataTable({
|
||||
'order': [[2, 'desc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 }
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 }
|
||||
]
|
||||
});
|
||||
$('#chores-overview-table tbody').removeClass("d-none");
|
||||
|
@ -1,7 +1,8 @@
|
||||
var locationsTable = $('#locations-table').DataTable({
|
||||
'order': [[1, 'asc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 }
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 }
|
||||
]
|
||||
});
|
||||
$('#locations-table tbody').removeClass("d-none");
|
||||
|
@ -1,7 +1,8 @@
|
||||
var apiKeysTable = $('#apikeys-table').DataTable({
|
||||
'order': [[4, 'desc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 }
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 }
|
||||
]
|
||||
});
|
||||
$('#apikeys-table tbody').removeClass("d-none");
|
||||
|
@ -354,6 +354,7 @@ var quConversionsTable = $('#qu-conversions-table').DataTable({
|
||||
"orderFixed": [[3, 'asc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 },
|
||||
{ 'visible': false, 'targets': 3 }
|
||||
],
|
||||
'rowGroup': {
|
||||
|
@ -1,7 +1,8 @@
|
||||
var groupsTable = $('#productgroups-table').DataTable({
|
||||
'order': [[1, 'asc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 }
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 }
|
||||
]
|
||||
});
|
||||
$('#productgroups-table tbody').removeClass("d-none");
|
||||
|
@ -1,7 +1,8 @@
|
||||
var productsTable = $('#products-table').DataTable({
|
||||
'order': [[1, 'asc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 }
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 }
|
||||
]
|
||||
});
|
||||
$('#products-table tbody').removeClass("d-none");
|
||||
|
@ -116,7 +116,8 @@ $('#quantityunit-form input').keydown(function(event)
|
||||
var quConversionsTable = $('#qu-conversions-table').DataTable({
|
||||
'order': [[1, 'asc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 }
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 }
|
||||
]
|
||||
});
|
||||
$('#qu-conversions-table tbody').removeClass("d-none");
|
||||
|
@ -1,7 +1,8 @@
|
||||
var quantityUnitsTable = $('#quantityunits-table').DataTable({
|
||||
'order': [[1, 'asc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 }
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 }
|
||||
]
|
||||
});
|
||||
$('#quantityunits-table tbody').removeClass("d-none");
|
||||
|
@ -66,6 +66,7 @@ var recipesPosTables = $('#recipes-pos-table').DataTable({
|
||||
"orderFixed": [[4, 'asc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 },
|
||||
{ 'visible': false, 'targets': 4 }
|
||||
],
|
||||
'rowGroup': {
|
||||
@ -78,7 +79,8 @@ recipesPosTables.columns.adjust().draw();
|
||||
var recipesIncludesTables = $('#recipes-includes-table').DataTable({
|
||||
'order': [[1, 'asc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 }
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 }
|
||||
]
|
||||
});
|
||||
$('#recipes-includes-table tbody').removeClass("d-none");
|
||||
|
@ -3,6 +3,7 @@
|
||||
"orderFixed": [[3, 'asc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 },
|
||||
{ 'visible': false, 'targets': 3 }
|
||||
],
|
||||
'rowGroup': {
|
||||
|
@ -2,6 +2,7 @@
|
||||
'order': [[2, 'asc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 }
|
||||
],
|
||||
});
|
||||
$('#stock-detail-table tbody').removeClass("d-none");
|
||||
|
@ -2,7 +2,8 @@
|
||||
'paginate': true,
|
||||
'order': [[3, 'desc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 }
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 }
|
||||
]
|
||||
});
|
||||
$('#stock-journal-table tbody').removeClass("d-none");
|
||||
|
@ -2,6 +2,7 @@
|
||||
'order': [[3, 'asc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 },
|
||||
{ 'visible': false, 'targets': 4 },
|
||||
{ 'visible': false, 'targets': 5 },
|
||||
{ 'visible': false, 'targets': 6 }
|
||||
|
@ -1,7 +1,8 @@
|
||||
var categoriesTable = $('#taskcategories-table').DataTable({
|
||||
'order': [[1, 'asc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 }
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 }
|
||||
]
|
||||
});
|
||||
$('#taskcategories-table tbody').removeClass("d-none");
|
||||
|
@ -2,6 +2,7 @@
|
||||
'order': [[2, 'desc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 },
|
||||
{ 'visible': false, 'targets': 3 }
|
||||
],
|
||||
'rowGroup': {
|
||||
|
@ -1,7 +1,8 @@
|
||||
var userentitiesTable = $('#userentities-table').DataTable({
|
||||
'order': [[1, 'asc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 }
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 }
|
||||
]
|
||||
});
|
||||
$('#userentities-table tbody').removeClass("d-none");
|
||||
|
@ -1,7 +1,8 @@
|
||||
var userfieldsTable = $('#userfields-table').DataTable({
|
||||
'order': [[1, 'asc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 }
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 }
|
||||
]
|
||||
});
|
||||
$('#userfields-table tbody').removeClass("d-none");
|
||||
|
@ -1,7 +1,8 @@
|
||||
var userobjectsTable = $('#userobjects-table').DataTable({
|
||||
'order': [[1, 'asc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 }
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 }
|
||||
]
|
||||
});
|
||||
$('#userobjects-table tbody').removeClass("d-none");
|
||||
|
@ -1,7 +1,8 @@
|
||||
var usersTable = $('#users-table').DataTable({
|
||||
'order': [[1, 'asc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 }
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 }
|
||||
]
|
||||
});
|
||||
$('#users-table tbody').removeClass("d-none");
|
||||
|
Loading…
x
Reference in New Issue
Block a user