Changelog & small changes for #554

This commit is contained in:
Bernd Bestel 2020-02-09 21:01:29 +01:00
parent 2c0f7f0883
commit 540ae2627a
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 3 additions and 8 deletions

View File

@ -19,6 +19,7 @@
### Meal plan improvements
- Improved that all add-dialogs can be submitted by using `ENTER` and that the next input is automatically selected after selecting a recipe/product
- Added an edit button to all types of meal plan entries
- When adding a recipe, the serving amount is now prefilled with the one of the selected recipe (thanks @kriddles)
- Fixed that the meal plan not used the full height on mobile devices
### Calendar fixes

View File

@ -283,7 +283,6 @@ $(document).on("click", ".add-recipe-button", function(e)
$("#add-recipe-modal-title").text(__t("Add recipe to %s", day.toString()));
$("#day").val(day.toString());
$("#recipe_servings").val(1);
Grocy.Components.RecipePicker.Clear();
$("#add-recipe-modal").modal("show");
Grocy.FrontendHelpers.ValidateForm("add-recipe-form");
@ -777,17 +776,12 @@ Grocy.Components.RecipePicker.GetPicker().on('change', function(e)
if (recipeId)
{
// Does not work (clears the RecipePicker) when done immediately, don't know why...
setTimeout(function()
{
$("#recipe_servings").focus();
$("#recipe_servings").select();
}, 200);
Grocy.Api.Get('objects/recipes/' + recipeId,
function(recipe)
{
$("#recipe_servings").val(recipe.base_servings);
$("#recipe_servings").focus();
$("#recipe_servings").select();
},
function(xhr)
{