mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Changelog and small fixes for #545
This commit is contained in:
parent
7638254f14
commit
49edd011b4
@ -16,6 +16,7 @@
|
||||
- Fixed that when reloading the "new recipe"-page (or when it gets auto-reloaded due to "Auto reload on external changes" is enabled), for each reload a new recipe was created
|
||||
- Fixed that the recipe "fullscreen card" was not correctly displayed
|
||||
- Fixed that nested recipes showed all ingredients of the nested recipes twice
|
||||
- Fixed that when displaying or consuming a recipe from the meal plan the serving amount was maybe wrong (was the one from the recipe instead the one from the meal plan entry) (thanks @kriddles)
|
||||
|
||||
### 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
|
||||
|
@ -582,21 +582,10 @@ $(document).on('click', '.recipe-order-missing-button', function(e)
|
||||
{
|
||||
Grocy.FrontendHelpers.BeginUiBusy();
|
||||
|
||||
//set the recipes desired_servings so that the views resolve correctly
|
||||
//based on the meal plan servings
|
||||
var data = { };
|
||||
data.desired_servings = servings;
|
||||
|
||||
Grocy.Api.Put('objects/recipes/' + objectId, data,
|
||||
// Set the recipes desired_servings so that the "recipes resolved"-views resolve correctly based on the meal plan entry servings
|
||||
Grocy.Api.Put('objects/recipes/' + objectId, { "desired_servings" : servings},
|
||||
function(result)
|
||||
{
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
console.error(xhr);
|
||||
}
|
||||
);
|
||||
|
||||
Grocy.Api.Post('recipes/' + objectId + '/add-not-fulfilled-products-to-shoppinglist', { },
|
||||
function(result)
|
||||
{
|
||||
@ -616,6 +605,12 @@ $(document).on('click', '.recipe-order-missing-button', function(e)
|
||||
console.error(xhr);
|
||||
}
|
||||
);
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
console.error(xhr);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -690,21 +685,10 @@ $(document).on('click', '.recipe-consume-button', function(e)
|
||||
{
|
||||
Grocy.FrontendHelpers.BeginUiBusy();
|
||||
|
||||
//set the recipes desired_servings so that the views resolve correctly
|
||||
//based on the meal plan servings
|
||||
var data = { };
|
||||
data.desired_servings = servings;
|
||||
|
||||
Grocy.Api.Put('objects/recipes/' + objectId, data,
|
||||
// Set the recipes desired_servings so that the "recipes resolved"-views resolve correctly based on the meal plan entry servings
|
||||
Grocy.Api.Put('objects/recipes/' + objectId, { "desired_servings": servings },
|
||||
function(result)
|
||||
{
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
console.error(xhr);
|
||||
}
|
||||
);
|
||||
|
||||
Grocy.Api.Post('recipes/' + objectId + '/consume', {},
|
||||
function(result)
|
||||
{
|
||||
@ -718,6 +702,12 @@ $(document).on('click', '.recipe-consume-button', function(e)
|
||||
console.error(xhr);
|
||||
}
|
||||
);
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
console.error(xhr);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -732,21 +722,10 @@ $(document).on("click", ".recipe-popup-button", function(e)
|
||||
var objectId = $(e.currentTarget).attr('data-recipe-id');
|
||||
var servings = $(e.currentTarget).attr('data-mealplan-servings');
|
||||
|
||||
//set the recipes desired_servings so that the views resolve correctly
|
||||
//based on the meal plan servings
|
||||
var data = { };
|
||||
data.desired_servings = servings;
|
||||
|
||||
Grocy.Api.Put('objects/recipes/' + objectId, data,
|
||||
// Set the recipes desired_servings so that the "recipes resolved"-views resolve correctly based on the meal plan entry servings
|
||||
Grocy.Api.Put('objects/recipes/' + objectId, { "desired_servings": servings },
|
||||
function(result)
|
||||
{
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
console.error(xhr);
|
||||
}
|
||||
);
|
||||
|
||||
bootbox.dialog({
|
||||
message: '<iframe height="650px" class="embed-responsive" src="' + U("/recipes?embedded&recipe=") + objectId + '#fullscreen"></iframe>',
|
||||
size: 'extra-large',
|
||||
@ -763,6 +742,12 @@ $(document).on("click", ".recipe-popup-button", function(e)
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
console.error(xhr);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$(window).on("resize", function()
|
||||
|
Loading…
x
Reference in New Issue
Block a user