Fix undefined function errors, improve spacing of buttons
This commit is contained in:
parent
4be006fe8e
commit
8a85055264
@ -19,32 +19,40 @@ var getLocation = function (success, error) {
|
|||||||
navigator.geolocation.getCurrentPosition(function (position) {
|
navigator.geolocation.getCurrentPosition(function (position) {
|
||||||
success(position);
|
success(position);
|
||||||
}, function (err) {
|
}, function (err) {
|
||||||
|
if (typeof error == "function") {
|
||||||
error(err.message);
|
error(err.message);
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
enableHighAccuracy: true,
|
enableHighAccuracy: true,
|
||||||
timeout: 5000,
|
timeout: 5000,
|
||||||
maximumAge: 0
|
maximumAge: 0
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
if (typeof error == "function") {
|
||||||
error("Location is unavailable.");
|
error("Location is unavailable.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var watchLocation = function (success, error) {
|
var watchLocation = function (success, error) {
|
||||||
if ("geolocation" in navigator) {
|
if ("geolocation" in navigator) {
|
||||||
navigator.geolocation.watchPosition(function (position) {
|
navigator.geolocation.watchPosition(function (position) {
|
||||||
success(position);
|
success(position);
|
||||||
}, function (err) {
|
}, function (err) {
|
||||||
|
if (typeof error == "function") {
|
||||||
error(err.message);
|
error(err.message);
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
enableHighAccuracy: true,
|
enableHighAccuracy: true,
|
||||||
timeout: 5000,
|
timeout: 5000,
|
||||||
maximumAge: 0
|
maximumAge: 0
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
if (typeof error == "function") {
|
||||||
error("Location is unavailable.");
|
error("Location is unavailable.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function initCordova() {
|
function initCordova() {
|
||||||
platform_type = "cordova";
|
platform_type = "cordova";
|
||||||
|
@ -24,13 +24,13 @@
|
|||||||
<div id="step1" class="display-none">
|
<div id="step1" class="display-none">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
{{#if @global.qrenabled}}
|
{{#if @global.qrenabled}}
|
||||||
<div class="col-100 tablet-50 desktop-25">
|
<div class="col-100 tablet-50 desktop-25 margin-bottom margin-horizontal">
|
||||||
<div class="button button-large button-fill button-round" id="scanqrcodebtn">
|
<div class="button button-large button-fill button-round" id="scanqrcodebtn">
|
||||||
<i class="fas fa-qrcode"></i> Scan Code
|
<i class="fas fa-qrcode"></i> Scan Code
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="col-100 tablet-50 desktop-25">
|
<div class="col-100 tablet-50 desktop-25 margin-horizontal">
|
||||||
<div class="button button-large button-outline button-round" id="typecodebtn">
|
<div class="button button-large button-outline button-round" id="typecodebtn">
|
||||||
<i class="fas fa-keyboard"></i> Enter Code
|
<i class="fas fa-keyboard"></i> Enter Code
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user