diff --git a/grocy.openapi.json b/grocy.openapi.json
index fa83b6f7..28f0da1d 100644
--- a/grocy.openapi.json
+++ b/grocy.openapi.json
@@ -1299,6 +1299,38 @@
}
}
}
+ },
+ "delete": {
+ "summary": "Deletes the given setting of the currently logged in user",
+ "tags": [
+ "Current user"
+ ],
+ "parameters": [
+ {
+ "in": "path",
+ "name": "settingKey",
+ "required": true,
+ "description": "The key of the user setting",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "The operation was successful"
+ },
+ "400": {
+ "description": "The operation was not successful",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error400"
+ }
+ }
+ }
+ }
+ }
}
},
"/stock": {
diff --git a/localization/strings.pot b/localization/strings.pot
index c313bac4..0511cc95 100644
--- a/localization/strings.pot
+++ b/localization/strings.pot
@@ -1822,7 +1822,7 @@ msgstr ""
msgid "Price per stock unit"
msgstr ""
-msgid "Hide/view columns"
+msgid "Table options"
msgstr ""
msgid "This product is currently on a shopping list"
@@ -2021,5 +2021,11 @@ msgstr ""
msgid "Reset"
msgstr ""
-msgid "Are you sure, you want reset the table?"
+msgid "Are you sure to reset the table options?"
+msgstr ""
+
+msgid "Table layout configuration"
+msgstr ""
+
+msgid "Hide/view columns"
msgstr ""
diff --git a/public/js/grocy.js b/public/js/grocy.js
index 072c87be..4766d8d6 100644
--- a/public/js/grocy.js
+++ b/public/js/grocy.js
@@ -765,17 +765,16 @@ $.extend(true, $.fn.dataTable.defaults, {
},
'preDrawCallback': function(settings)
{
- //currently it is not possible to save the state of rowGroup via saveState events
+ // Currently it is not possible to save the state of rowGroup via saveState events
var api = new $.fn.dataTable.Api(settings);
if (typeof api.rowGroup === "function")
{
var settingKey = 'datatables_rowGroup_' + settings.sTableId;
-
if (Grocy.UserSettings[settingKey] !== undefined)
{
var rowGroup = JSON.parse(Grocy.UserSettings[settingKey]);
- //check if there way changed. the draw event is called often therefore we have to check if it's really necessary
+ // Check if there way changed. the draw event is called often therefore we have to check if it's really necessary
if (rowGroup.enable !== api.rowGroup().enabled()
|| ("dataSrc" in rowGroup && rowGroup.dataSrc !== api.rowGroup().dataSrc()))
{
@@ -786,7 +785,7 @@ $.extend(true, $.fn.dataTable.defaults, {
{
api.rowGroup().dataSrc(rowGroup.dataSrc);
- //apply fixed order for group column
+ // Apply fixed order for group column
var fixedOrder = {
pre: [rowGroup.dataSrc, 'asc']
};
@@ -977,11 +976,10 @@ $(".change-table-columns-visibility-button").on("click", function(e)
}
});
- var message = '
' + __t('Hide/view columns') + '
' + columnCheckBoxesHtml + '
';
-
+ var message = '' + __t('Table options') + '
' + __t('Hide/view columns') + '
' + columnCheckBoxesHtml + '
';
if (rowGroupDefined)
{
- message += '
' + __t('Group by') + '
' + rowGroupRadioBoxesHtml + '
';
+ message += '' + __t('Group by') + '
' + rowGroupRadioBoxesHtml + '
';
}
bootbox.dialog({
@@ -993,12 +991,12 @@ $(".change-table-columns-visibility-button").on("click", function(e)
buttons: {
reset: {
label: __t('Reset'),
- className: 'btn-danger responsive-button',
+ className: 'btn-outline-danger float-left responsive-button',
callback: function()
{
bootbox.confirm({
swapButtonOrder: true,
- message: __t("Are you sure, you want reset the table?"),
+ message: __t("Are you sure to reset the table options?"),
buttons: {
confirm: {
label: 'Yes',
@@ -1016,10 +1014,10 @@ $(".change-table-columns-visibility-button").on("click", function(e)
var dataTable = $(dataTableSelector).DataTable();
var tableId = dataTable.settings()[0].sTableId;
- //Delete rowgroup settings
+ // Delete rowgroup settings
Grocy.FrontendHelpers.DeleteUserSetting('datatables_rowGroup_' + tableId);
- //Delete state settings
+ // Delete state settings
dataTable.state.clear();
}
bootbox.hideAll();
diff --git a/views/batteries.blade.php b/views/batteries.blade.php
index 33f8166d..8f949562 100644
--- a/views/batteries.blade.php
+++ b/views/batteries.blade.php
@@ -72,7 +72,7 @@
|
|
diff --git a/views/batteriesjournal.blade.php b/views/batteriesjournal.blade.php
index 4531e259..0e96eacb 100644
--- a/views/batteriesjournal.blade.php
+++ b/views/batteriesjournal.blade.php
@@ -68,7 +68,7 @@
|
diff --git a/views/batteriesoverview.blade.php b/views/batteriesoverview.blade.php
index 2a05ae9f..03f339f8 100644
--- a/views/batteriesoverview.blade.php
+++ b/views/batteriesoverview.blade.php
@@ -90,7 +90,7 @@
|
diff --git a/views/chores.blade.php b/views/chores.blade.php
index 553103da..09343c06 100644
--- a/views/chores.blade.php
+++ b/views/chores.blade.php
@@ -73,7 +73,7 @@
|
diff --git a/views/choresjournal.blade.php b/views/choresjournal.blade.php
index 0c8f0a96..717783fc 100644
--- a/views/choresjournal.blade.php
+++ b/views/choresjournal.blade.php
@@ -68,7 +68,7 @@
|
diff --git a/views/choresoverview.blade.php b/views/choresoverview.blade.php
index 3c6a79e0..d20605c0 100644
--- a/views/choresoverview.blade.php
+++ b/views/choresoverview.blade.php
@@ -112,7 +112,7 @@
|
diff --git a/views/equipment.blade.php b/views/equipment.blade.php
index 5ad96c06..ae0067bf 100644
--- a/views/equipment.blade.php
+++ b/views/equipment.blade.php
@@ -63,7 +63,7 @@
|
diff --git a/views/locations.blade.php b/views/locations.blade.php
index 82f1d26f..c71b7c3d 100644
--- a/views/locations.blade.php
+++ b/views/locations.blade.php
@@ -73,7 +73,7 @@
|
diff --git a/views/manageapikeys.blade.php b/views/manageapikeys.blade.php
index 728f1256..783d4996 100644
--- a/views/manageapikeys.blade.php
+++ b/views/manageapikeys.blade.php
@@ -78,7 +78,7 @@
|
diff --git a/views/productform.blade.php b/views/productform.blade.php
index 8da88cc2..0c734526 100644
--- a/views/productform.blade.php
+++ b/views/productform.blade.php
@@ -468,7 +468,7 @@
|
@@ -569,14 +569,14 @@
|
|
{{ $__t('Quantity unit from') }} |
{{ $__t('Quantity unit to') }} |
{{ $__t('Factor') }} |
- {{ $__('Group')}} |
+ {{ $__t('Group')}} |
|
@@ -671,4 +671,4 @@
-@stop
\ No newline at end of file
+@stop
diff --git a/views/productgroups.blade.php b/views/productgroups.blade.php
index 229ca7fc..53c9de16 100644
--- a/views/productgroups.blade.php
+++ b/views/productgroups.blade.php
@@ -73,7 +73,7 @@
|
diff --git a/views/products.blade.php b/views/products.blade.php
index 7b8f1d65..b60cd1e7 100644
--- a/views/products.blade.php
+++ b/views/products.blade.php
@@ -102,7 +102,7 @@
|
diff --git a/views/quantityunitform.blade.php b/views/quantityunitform.blade.php
index fdd11da5..0aae953e 100644
--- a/views/quantityunitform.blade.php
+++ b/views/quantityunitform.blade.php
@@ -128,7 +128,7 @@
|
diff --git a/views/quantityunits.blade.php b/views/quantityunits.blade.php
index 7784ca43..8386c97d 100644
--- a/views/quantityunits.blade.php
+++ b/views/quantityunits.blade.php
@@ -73,7 +73,7 @@
|
diff --git a/views/recipeform.blade.php b/views/recipeform.blade.php
index d7986412..9433d306 100644
--- a/views/recipeform.blade.php
+++ b/views/recipeform.blade.php
@@ -139,7 +139,7 @@
|
@@ -242,7 +242,7 @@
|
@@ -370,4 +370,4 @@
-@stop
\ No newline at end of file
+@stop
diff --git a/views/recipes.blade.php b/views/recipes.blade.php
index f1963603..f2cfabe9 100644
--- a/views/recipes.blade.php
+++ b/views/recipes.blade.php
@@ -102,7 +102,7 @@
|
diff --git a/views/shoppinglist.blade.php b/views/shoppinglist.blade.php
index 439c0e3d..7f40cff9 100644
--- a/views/shoppinglist.blade.php
+++ b/views/shoppinglist.blade.php
@@ -16,6 +16,7 @@
tr.dtrg-group {
cursor: pointer;
}
+
@endpush
@@ -173,7 +174,7 @@
|
@@ -391,4 +392,4 @@
-@stop
\ No newline at end of file
+@stop
diff --git a/views/shoppinglocations.blade.php b/views/shoppinglocations.blade.php
index b1ca455b..072a317f 100644
--- a/views/shoppinglocations.blade.php
+++ b/views/shoppinglocations.blade.php
@@ -73,7 +73,7 @@
|
diff --git a/views/stockentries.blade.php b/views/stockentries.blade.php
index 25162f2f..66d2e66c 100644
--- a/views/stockentries.blade.php
+++ b/views/stockentries.blade.php
@@ -58,7 +58,7 @@
|
diff --git a/views/stockjournal.blade.php b/views/stockjournal.blade.php
index 2e737d5d..284d09d6 100644
--- a/views/stockjournal.blade.php
+++ b/views/stockjournal.blade.php
@@ -121,7 +121,7 @@
|
diff --git a/views/stockjournalsummary.blade.php b/views/stockjournalsummary.blade.php
index b5a34878..f1b0726b 100644
--- a/views/stockjournalsummary.blade.php
+++ b/views/stockjournalsummary.blade.php
@@ -96,7 +96,7 @@
|
diff --git a/views/stockoverview.blade.php b/views/stockoverview.blade.php
index a636ad2b..2e8e7d6c 100755
--- a/views/stockoverview.blade.php
+++ b/views/stockoverview.blade.php
@@ -152,7 +152,7 @@
|
diff --git a/views/taskcategories.blade.php b/views/taskcategories.blade.php
index 18ca8f90..96dcab79 100644
--- a/views/taskcategories.blade.php
+++ b/views/taskcategories.blade.php
@@ -73,7 +73,7 @@
|
diff --git a/views/tasks.blade.php b/views/tasks.blade.php
index f014c666..d62b1009 100644
--- a/views/tasks.blade.php
+++ b/views/tasks.blade.php
@@ -101,7 +101,7 @@
|
@@ -198,4 +198,4 @@
-@stop
\ No newline at end of file
+@stop
diff --git a/views/userentities.blade.php b/views/userentities.blade.php
index 7511fa81..7eddb65b 100644
--- a/views/userentities.blade.php
+++ b/views/userentities.blade.php
@@ -69,7 +69,7 @@
|
diff --git a/views/userfields.blade.php b/views/userfields.blade.php
index 8e3af95a..98b706f8 100644
--- a/views/userfields.blade.php
+++ b/views/userfields.blade.php
@@ -84,7 +84,7 @@
|
diff --git a/views/users.blade.php b/views/users.blade.php
index a92f8b2b..261b7d1b 100644
--- a/views/users.blade.php
+++ b/views/users.blade.php
@@ -69,7 +69,7 @@
|