From a55ad25b6c63c89dd8024baef938791dabba1b68 Mon Sep 17 00:00:00 2001 From: Andrej Kabachnik Date: Mon, 28 Oct 2024 21:35:39 +0100 Subject: [PATCH] FIX PHP error in ZXingScanner --- Actions/Scanners/ZXingScanner.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Actions/Scanners/ZXingScanner.php b/Actions/Scanners/ZXingScanner.php index 72faac9..fd4dc72 100644 --- a/Actions/Scanners/ZXingScanner.php +++ b/Actions/Scanners/ZXingScanner.php @@ -1,7 +1,7 @@ 'camera' ]); - } + } /** * @@ -28,14 +28,14 @@ public function exportUxonObject() public function getType() : string { return AbstractScanAction::SCANNER_TYPE_CAMERA; - } + } /** * * {@inheritDoc} * @see \exface\BarcodeScanner\Interfaces\JsScannerWrapperInterface::getIncludes() */ - public function getIncludes(FacadeInterface $facade): array + public function getIncludes(FacadeInterface $facade): array { $path = "exface/Core/Facades/AbstractAjaxFacade/js/camera"; $config = $this->getScanAction()->getWorkbench()->getApp('exface.BarcodeScanner')->getConfig(); @@ -44,9 +44,9 @@ public function getIncludes(FacadeInterface $facade): array $includes[] = $this->buildUrlIncludePath($config->getOption('LIBS.ZXING.JS'), $facade); $includes[] = ""; return $includes; - } + } - public function buildJsScannerInit(FacadeInterface $facade): string + public function buildJsScannerInit(FacadeInterface $facade): string { $input_element = $this->getScanAction()->getInputElement($facade); $checkMark = $this->getCameraId() . '_image'; @@ -109,6 +109,7 @@ public function buildJsScannerInit(FacadeInterface $facade): string case ($facade->is('exface.UI5Facade.UI5Facade')): $controller = $input_element->getController(); $controller->addOnShowViewScript($initJS); + $js = ''; break; // Regular jQuery facades