mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Fixed camera scanning targets (fixes #1210)
This commit is contained in:
parent
159ab253dd
commit
937bd6b702
@ -1,2 +1,2 @@
|
||||
### General & other improvements/fixes
|
||||
- Improved the prerequisites checker (added missing required PHP extension `ctype`) (thanks @Forceu)
|
||||
- Fixed that browser camera barcode scanning did not work on the product edit page
|
||||
|
@ -87,7 +87,7 @@ function OnBarcodeScanned(barcode)
|
||||
|
||||
$(document).on("Grocy.BarcodeScanned", function(e, barcode, target)
|
||||
{
|
||||
if (target !== "#scanned_barcod")
|
||||
if (target !== "#scanned_barcode")
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -88,3 +88,13 @@ Grocy.FrontendHelpers.ValidateForm('barcode-form');
|
||||
$('#barcode').focus();
|
||||
RefreshLocaleNumberInput();
|
||||
Grocy.Components.UserfieldsForm.Load()
|
||||
|
||||
$(document).on("Grocy.BarcodeScanned", function(e, barcode, target)
|
||||
{
|
||||
if (target !== "#barcode")
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$("#barcode").val(barcode);
|
||||
});
|
||||
|
@ -58,7 +58,7 @@
|
||||
id="barcode"
|
||||
name="barcode"
|
||||
value="@if($mode == 'edit'){{ $barcode->barcode }}@endif"
|
||||
data-target="#scanned_barcode">
|
||||
data-target="#barcode">
|
||||
@include('components.barcodescanner')
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user