mirror of
https://github.com/grocy/grocy.git
synced 2025-08-29 09:16:31 +00:00
Show a little optional checkbox to mark recipe ingredients as done (closes #1606)
This commit is contained in:
@@ -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");
|
||||
});
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user