Maybe allow printing when wifi has no internet
This commit is contained in:
parent
2dc370faed
commit
13579451cf
12
package-lock.json
generated
12
package-lock.json
generated
@ -144,6 +144,12 @@
|
||||
"resolved": "https://registry.npmjs.org/cordova-plugin-splashscreen/-/cordova-plugin-splashscreen-5.0.4.tgz",
|
||||
"integrity": "sha512-zmyhBrObNuwDH4KB4zuZrJ9IKC113EM6KJpqC0/2f3o9GRznPk1S4j9O9rosJT4EASg4X3hdssv9XkAH3D5ZYg=="
|
||||
},
|
||||
"cordova-plugin-wifiwizard2": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/cordova-plugin-wifiwizard2/-/cordova-plugin-wifiwizard2-3.1.1.tgz",
|
||||
"integrity": "sha512-Vd4aYUAxCTR6+zhhSOToWi67wT4Vycq4lYB4HnnxFWxrL3ewuKshq9eLxrrwIHwPvPI4u4g06+5jO9PnwEiKOw==",
|
||||
"dev": true
|
||||
},
|
||||
"cross-spawn": {
|
||||
"version": "6.0.5",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
||||
@ -194,6 +200,12 @@
|
||||
"objectorarray": "^1.0.4"
|
||||
}
|
||||
},
|
||||
"es6-promise-plugin": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/es6-promise-plugin/-/es6-promise-plugin-4.1.0.tgz",
|
||||
"integrity": "sha1-8GEHOZhEUJ6quo7QcHfSiKXKaX4=",
|
||||
"dev": true
|
||||
},
|
||||
"fast-json-parse": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/fast-json-parse/-/fast-json-parse-1.0.3.tgz",
|
||||
|
@ -34,8 +34,12 @@
|
||||
"phonegap-plugin-barcodescanner": {
|
||||
"ANDROID_SUPPORT_V4_VERSION": "27.+"
|
||||
},
|
||||
"cordova-plugin-splashscreen": {}
|
||||
"cordova-plugin-splashscreen": {},
|
||||
"wifiwizard2": {}
|
||||
}
|
||||
},
|
||||
"devDependencies": {}
|
||||
"devDependencies": {
|
||||
"cordova-plugin-wifiwizard2": "^3.1.1",
|
||||
"es6-promise-plugin": "^4.1.0"
|
||||
}
|
||||
}
|
@ -9,6 +9,7 @@ var pdfobject = null;
|
||||
|
||||
function labelListAsync(routeTo, routeFrom, resolve, reject) {
|
||||
app.dialog.preloader("Loading...");
|
||||
|
||||
apirequest(
|
||||
"listlabels",
|
||||
{},
|
||||
@ -78,6 +79,11 @@ function getPDFLabelAndDisplay(machineid, labeltype) {
|
||||
}
|
||||
|
||||
function sendPDFToPrintServer() {
|
||||
try {
|
||||
WifiWizard2.setBindAll();
|
||||
} catch (ex) {
|
||||
|
||||
}
|
||||
var bytesArray = new Uint8Array(pdfobject);
|
||||
|
||||
var printurl = getStorage("printserverurl");
|
||||
@ -104,7 +110,14 @@ function sendPDFToPrintServer() {
|
||||
type: 'POST',
|
||||
contentType: 'application/octet-stream',
|
||||
data: bytesArray,
|
||||
processData: false
|
||||
processData: false,
|
||||
success: function () {
|
||||
try {
|
||||
WifiWizard2.resetBindAll();
|
||||
} catch (ex) {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}).open();
|
||||
|
Loading…
x
Reference in New Issue
Block a user