mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Added grocycode for recipes (closes #1562)
This commit is contained in:
@@ -414,3 +414,18 @@ if (window.location.hash === "#fullscreen")
|
||||
}
|
||||
|
||||
LoadImagesLazy();
|
||||
|
||||
$(document).on('click', '.recipe-grocycode-label-print', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
document.activeElement.blur();
|
||||
|
||||
var recipeId = $(e.currentTarget).attr('data-recipe-id');
|
||||
Grocy.Api.Get('recipes/' + recipeId + '/printlabel', function(labelData)
|
||||
{
|
||||
if (Grocy.Webhooks.labelprinter !== undefined)
|
||||
{
|
||||
Grocy.FrontendHelpers.RunWebhook(Grocy.Webhooks.labelprinter, labelData);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user