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

@@ -85,7 +85,12 @@ function OnBarcodeScanned(barcode)
}, 200);
}
$(document).on("Grocy.BarcodeScanned", function(e, barcode)
$(document).on("Grocy.BarcodeScanned", function(e, barcode, target)
{
if (target !== "#scanned_barcod")
{
return;
}
OnBarcodeScanned(barcode);
});