Your IP : 216.73.216.220


Current Path : /var/www/surf/TYPO3/public/_assets/b256debde17d79d0d5c559893d9b62fb/Js/
Upload File :
Current File : /var/www/surf/TYPO3/public/_assets/b256debde17d79d0d5c559893d9b62fb/Js/custom.js

goPage = true;
function onScanSuccess(decodedText, decodedResult) {
    if (goPage) {
        goPage = false;
        window.location.href = decodedText;
    }
    html5QrcodeScanner.clear();
}

function onScanSuccessCustomer(decodedText, decodedResult){
    jQuery('#readerCustomer').hide();
    jQuery('#buttonAssign').show();
    html5QrcodeScanner.clear();
}

function onScanSuccessExtract(decodedText, decodedResult){
    jQuery('#readerExtract').hide();
    jQuery('#buttonExtract').show();
    html5QrcodeScanner.clear();
}

function activeScanner() {
    var html5QrcodeScanner = new Html5QrcodeScanner("reader", { fps: 10, qrbox: 250 });
    html5QrcodeScanner.render(onScanSuccess);
}
jQuery( "#modalQrCode" ).on('shown.bs.modal', function (e) {
    activeScanner();
});

jQuery( document ).ready(function() {
    if (typeof scanOn !== 'undefined' && scanOn) {
        activeScanner();
    }
});

if (document.getElementById("readerCustomer")) {
    var html5QrcodeScannerCustomer = new Html5QrcodeScanner("readerCustomer", { fps: 10, qrbox: 250 });
    html5QrcodeScannerCustomer.render(onScanSuccessCustomer);
}
if (document.getElementById("readerExtract")) {
    var html5QrcodeScannerExtract = new Html5QrcodeScanner("readerExtract", { fps: 10, qrbox: 250 });
    html5QrcodeScannerExtract.render(onScanSuccessExtract);
}