mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 20:46:47 +00:00
One more try to pass JS checks...
This commit is contained in:
parent
51152eee53
commit
84bfb0a827
@ -72,7 +72,9 @@ function onCameraAvailable(hasCamera, options) {
|
|||||||
if ( hasCamera == true ) {
|
if ( hasCamera == true ) {
|
||||||
// Camera is only acccessible if page is served over secure connection
|
// Camera is only acccessible if page is served over secure connection
|
||||||
if ( window.isSecureContext == true ) {
|
if ( window.isSecureContext == true ) {
|
||||||
qrScanner = new QrScanner(document.getElementById('barcode_scan_video'), result => {onBarcodeScanCompleted(result, options)}, {
|
qrScanner = new QrScanner(document.getElementById('barcode_scan_video'), (result) => {
|
||||||
|
onBarcodeScanCompleted(result, options);
|
||||||
|
}, {
|
||||||
highlightScanRegion: true,
|
highlightScanRegion: true,
|
||||||
highlightCodeOutline: true,
|
highlightCodeOutline: true,
|
||||||
});
|
});
|
||||||
@ -227,7 +229,9 @@ function barcodeDialog(title, options={}) {
|
|||||||
$(modal + ' .modal-form-content').scrollTop(0);
|
$(modal + ' .modal-form-content').scrollTop(0);
|
||||||
|
|
||||||
// Check for qr-scanner camera
|
// Check for qr-scanner camera
|
||||||
QrScanner.hasCamera().then( hasCamera => {onCameraAvailable(hasCamera, options)});
|
QrScanner.hasCamera().then( (hasCamera) => {
|
||||||
|
onCameraAvailable(hasCamera, options);
|
||||||
|
});
|
||||||
|
|
||||||
var barcode = $(modal + ' #barcode');
|
var barcode = $(modal + ' #barcode');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user