Merge pull request #15788 from andreubisquerra/master

FIX Open Drawer with new TakePOS connector
This commit is contained in:
Laurent Destailleur 2020-12-21 18:34:59 +01:00 committed by GitHub
commit cfbf59ff43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -686,7 +686,10 @@ function OpenDrawer(){
console.log("OpenDrawer call ajax url http://<?php print $conf->global->TAKEPOS_PRINT_SERVER; ?>:8111/print"); console.log("OpenDrawer call ajax url http://<?php print $conf->global->TAKEPOS_PRINT_SERVER; ?>:8111/print");
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: 'http://<?php print $conf->global->TAKEPOS_PRINT_SERVER; ?>:8111/print', <?php
if (filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) echo "url: '".$conf->global->TAKEPOS_PRINT_SERVER."/printer/drawer.php',";
else echo "url: 'http://".$conf->global->TAKEPOS_PRINT_SERVER.":8111/print',";
?>
data: "opendrawer" data: "opendrawer"
}); });
} }