mirror of
https://github.com/grocy/grocy.git
synced 2025-10-14 17:24:07 +00:00
recipes can create products (#501)
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
$('#save-recipe-button').on('click', function(e)
|
||||
$(document).ready(function() {
|
||||
Grocy.Components.ProductPicker.GetPicker().trigger('change');
|
||||
} );
|
||||
|
||||
$('#save-recipe-button').on('click', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
|
||||
@@ -349,3 +353,13 @@ $(window).on("message", function(e)
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
|
||||
{
|
||||
var productId = $(e.target).val();
|
||||
|
||||
if (productId)
|
||||
{
|
||||
Grocy.Components.ProductCard.Refresh(productId);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user