Show a little optional checkbox to mark recipe ingredients as done (closes #1606)

This commit is contained in:
Bernd Bestel
2022-04-01 22:43:49 +02:00
parent ba289d6e6a
commit 8c1deefebf
7 changed files with 51 additions and 0 deletions

View File

@@ -431,3 +431,14 @@ $(document).on('click', '.recipe-grocycode-label-print', function(e)
}
});
});
$(document).on('click', '.ingredient-done-button', function(e)
{
e.preventDefault();
// Remove the focus from the current button
// to prevent that the tooltip stays until clicked anywhere else
document.activeElement.blur();
$(e.currentTarget).parent().toggleClass("text-strike-through");
});

View File

@@ -7,3 +7,8 @@ if (BoolVal(Grocy.UserSettings.recipes_show_list_side_by_side))
{
$("#recipes_show_list_side_by_side").prop("checked", true);
}
if (BoolVal(Grocy.UserSettings.recipes_show_ingredient_checkbox))
{
$("#recipes_show_ingredient_checkbox").prop("checked", true);
}