From e258629c7bde268f0fe4ca52577daf1323b53b46 Mon Sep 17 00:00:00 2001 From: TJ Woon Date: Mon, 16 Feb 2015 19:01:57 +0800 Subject: [PATCH] Fix incorrect upperlower-casing of zbar.js file (pt2 of 2) --- www/zbar.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 www/zbar.js diff --git a/www/zbar.js b/www/zbar.js new file mode 100644 index 0000000..edadc91 --- /dev/null +++ b/www/zbar.js @@ -0,0 +1,23 @@ +var argscheck = require('cordova/argscheck'), + exec = require('cordova/exec'); + +function ZBar () {}; + +ZBar.prototype = { + + scan: function (params, success, failure) + { + argscheck.checkArgs('*fF', 'CsZBar.scan', arguments); + + params = params || {}; + if(params.text_title === undefined) params.text_title = "Scan QR Code"; + if(params.text_instructions === undefined) params.text_instructions = "Please point your camera at the QR code."; + if(params.camera != "front") params.camera = "back"; + if(params.flash != "on" && params.flash != "off") params.flash = "auto"; + + exec(success, failure, 'CsZBar', 'scan', [params]); + }, + +}; + +module.exports = new ZBar;