mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +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)
|
- 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)
|
$(document).on("Grocy.BarcodeScanned", function(e, barcode, target)
|
||||||
{
|
{
|
||||||
if (target !== "#scanned_barcod")
|
if (target !== "#scanned_barcode")
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -88,3 +88,13 @@ Grocy.FrontendHelpers.ValidateForm('barcode-form');
|
|||||||
$('#barcode').focus();
|
$('#barcode').focus();
|
||||||
RefreshLocaleNumberInput();
|
RefreshLocaleNumberInput();
|
||||||
Grocy.Components.UserfieldsForm.Load()
|
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"
|
id="barcode"
|
||||||
name="barcode"
|
name="barcode"
|
||||||
value="@if($mode == 'edit'){{ $barcode->barcode }}@endif"
|
value="@if($mode == 'edit'){{ $barcode->barcode }}@endif"
|
||||||
data-target="#scanned_barcode">
|
data-target="#barcode">
|
||||||
@include('components.barcodescanner')
|
@include('components.barcodescanner')
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user