|
|
|
@ -69,23 +69,11 @@ function initCordova() {
|
|
|
|
|
|
|
|
|
|
// Handle back button to close things
|
|
|
|
|
document.addEventListener("backbutton", function (event) {
|
|
|
|
|
router.back();
|
|
|
|
|
router.back({force: true, ignoreCache: true});
|
|
|
|
|
}, false);
|
|
|
|
|
|
|
|
|
|
document.addEventListener("deviceready", function () {
|
|
|
|
|
app.statusbar.overlaysWebView(true);
|
|
|
|
|
StatusBar.backgroundColorByHexString("#000000ff");
|
|
|
|
|
if (cordova.platformId == 'android') {
|
|
|
|
|
//StatusBar.backgroundColorByHexString("#324150");
|
|
|
|
|
//StatusBar.styleLightContent();
|
|
|
|
|
}
|
|
|
|
|
router.on("routeChange", function (newRoute, previousRoute, router) {
|
|
|
|
|
if (newRoute.name == "home") {
|
|
|
|
|
StatusBar.styleDefault();
|
|
|
|
|
} else {
|
|
|
|
|
StatusBar.styleLightContent();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}, false);
|
|
|
|
|
|
|
|
|
|
openBrowser = function (url) {
|
|
|
|
@ -110,21 +98,12 @@ function initCordova() {
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
showTorchButton: true,
|
|
|
|
|
prompt: "Find a code",
|
|
|
|
|
prompt: "Scan barcode",
|
|
|
|
|
resultDisplayDuration: 0,
|
|
|
|
|
disableSuccessBeep: true
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// When running on Android 8.0 (not 7.1.1, not 8.1, just 8.0), the statusbar
|
|
|
|
|
// height is incorrectly set to 0px, causing the clock and icons to overlap
|
|
|
|
|
// on the TerranQuest UI.
|
|
|
|
|
document.addEventListener("deviceready", function () {
|
|
|
|
|
if (device.platform == "Android" && device.version.startsWith("8.0") && getComputedStyle(document.documentElement).getPropertyValue('--f7-statusbar-height').startsWith("0")) {
|
|
|
|
|
document.documentElement.style.setProperty('--f7-statusbar-height', '24px');
|
|
|
|
|
}
|
|
|
|
|
}, false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function initNW() {
|
|
|
|
|