Skip to content

Commit

Permalink
Merge pull request #4 from olegabr/master
Browse files Browse the repository at this point in the history
fixes some errors related to js-side method call
  • Loading branch information
olegabr committed Aug 8, 2016
2 parents 20523eb + efd9041 commit 0f890c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/QSignaturePadGen.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @property string $Data The data:image/png;base64 image data
*/
namespace QCubed\Plugin;
use \QType, \QApplication, \QInvalidCastException, \QCallerException, \QBlockControl;
use \QType, \QApplication, \QInvalidCastException, \QCallerException, \QBlockControl, \JavaScriptHelper;

class QSignaturePadEndEvent extends \QEvent {
const EventName = 'qsigend';
Expand Down Expand Up @@ -48,12 +48,12 @@ protected function ExecuteFunction($strFunctionName /*, ... */) {
$strArgsArray = array();
if ($args) {
foreach ($args as $a) {
$strArgsArray[] = JavaScriptHelper::toJsObject();
$strArgsArray[] = JavaScriptHelper::toJsObject($a);
}
}
$strArgs = "";
if ($strArgsArray) {
$strArgs = ", " . implode(",", $strArgsArray);
$strArgs = implode(",", $strArgsArray);
}
$strCode = $strJsObjectCode . "." . $strFunctionName . "(" . $strArgs . ")";
QApplication::ExecuteJavaScript($strCode);
Expand Down

0 comments on commit 0f890c2

Please sign in to comment.