Added a camera-barcode-scanner-button to the barcodes field on the product edit page (closes #723)

This commit is contained in:
Bernd Bestel
2020-04-13 15:55:27 +02:00
parent c6e06ab07c
commit 10f890ef89
8 changed files with 33 additions and 8 deletions

View File

@@ -227,8 +227,13 @@ $('#product_id_text_input').on('blur', function(e)
}
});
$(document).on("Grocy.BarcodeScanned", function(e, barcode)
$(document).on("Grocy.BarcodeScanned", function(e, barcode, target)
{
if (!(target == "@productpicker" || target == "undefined" || target == undefined)) // Default target
{
return;
}
// Don't know why the blur event does not fire immediately ... this works...
Grocy.Components.ProductPicker.GetInputElement().focusout();