Skip to content

Commit

Permalink
Merge pull request #11 from ExFace/1.x-dev
Browse files Browse the repository at this point in the history
1.21.02
  • Loading branch information
kabachello authored Oct 28, 2024
2 parents 0f706a9 + a55ad25 commit 8c80f8d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Actions/Scanners/ZXingScanner.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace exface\BarcodeScanner\Actions\Scanners;

use exface\Core\Interfaces\Facades\FacadeInterface;

use exface\Core\Interfaces\Facades\FacadeInterface;
use exface\BarcodeScanner\Actions\AbstractScanAction;
use exface\Core\CommonLogic\UxonObject;

Expand All @@ -18,7 +18,7 @@ public function exportUxonObject()
return new UxonObject([
'type' => 'camera'
]);
}
}

/**
*
Expand All @@ -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();
Expand All @@ -44,9 +44,9 @@ public function getIncludes(FacadeInterface $facade): array
$includes[] = $this->buildUrlIncludePath($config->getOption('LIBS.ZXING.JS'), $facade);
$includes[] = "<link rel='stylesheet' type='text/css' href='{$facade->buildUrlToVendorFile($path . '/style.css')}'></link>";
return $includes;
}
}

public function buildJsScannerInit(FacadeInterface $facade): string
public function buildJsScannerInit(FacadeInterface $facade): string
{
$input_element = $this->getScanAction()->getInputElement($facade);
$checkMark = $this->getCameraId() . '_image';
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8c80f8d

Please sign in to comment.