mirror of
https://github.com/grocy/grocy.git
synced 2025-10-22 20:46:33 +00:00
Squashed commit
Fixed number input min/max amount handling Only (auto) save valid user inputs More filters on the stock journal pages Save the last price per used barcode and preselect that as a total price on purchase if not empty (closes #1131) Don't apply conversions for only_check_single_unit_in_stock ingredients (fixes #1120) Render shopping list userfields (closes #1052) Fixed Focus when adding included recipes (closes #1019) Order all base objects with NOCASE (closes #1086)
This commit is contained in:
@@ -13,6 +13,11 @@
|
||||
Grocy.Api.Post('objects/product_barcodes', jsonData,
|
||||
function(result)
|
||||
{
|
||||
Grocy.EditObjectId = result.created_object_id;
|
||||
Grocy.Components.UserfieldsForm.Save()
|
||||
|
||||
window.parent.postMessage(WindowMessageBag("ProductBarcodesChanged"), U("/product/" + GetUriParam("product")));
|
||||
window.parent.postMessage(WindowMessageBag("CloseAllModals"), U("/product/" + GetUriParam("product")));
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
@@ -23,9 +28,12 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
Grocy.Components.UserfieldsForm.Save();
|
||||
Grocy.Api.Put('objects/product_barcodes/' + Grocy.EditObjectId, jsonData,
|
||||
function(result)
|
||||
{
|
||||
window.parent.postMessage(WindowMessageBag("ProductBarcodesChanged"), U("/product/" + GetUriParam("product")));
|
||||
window.parent.postMessage(WindowMessageBag("CloseAllModals"), U("/product/" + GetUriParam("product")));
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
@@ -34,9 +42,6 @@
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
window.parent.postMessage(WindowMessageBag("ProductBarcodesChanged"), U("/product/" + GetUriParam("product")));
|
||||
window.parent.postMessage(WindowMessageBag("CloseAllModals"), U("/product/" + GetUriParam("product")));
|
||||
});
|
||||
|
||||
$('#barcode').on('keyup', function(e)
|
||||
@@ -82,3 +87,4 @@ if (Grocy.EditMode == "edit")
|
||||
Grocy.FrontendHelpers.ValidateForm('barcode-form');
|
||||
$('#barcode').focus();
|
||||
RefreshLocaleNumberInput();
|
||||
Grocy.Components.UserfieldsForm.Load()
|
||||
|
Reference in New Issue
Block a user