Finally fix tel: URLs for real
This commit is contained in:
parent
358585680a
commit
ca8333632b
@ -102,8 +102,8 @@ function setupCordovaBarcodeScanner() {
|
||||
showFlipCameraButton: true,
|
||||
prompt: "Scan barcode",
|
||||
resultDisplayDuration: 0,
|
||||
disableSuccessBeep: true,
|
||||
formats: "QR_CODE,DATA_MATRIX,CODE_39,CODE_93,CODE_128,CODABAR,PDF_417,AZTEC,MAXICODE"
|
||||
disableSuccessBeep: false,
|
||||
formats: "QR_CODE,DATA_MATRIX,CODE_39,CODE_93,CODE_128"
|
||||
}
|
||||
);
|
||||
};
|
||||
@ -191,8 +191,16 @@ function initCordova() {
|
||||
}
|
||||
}, 3000);
|
||||
|
||||
// Handle geo: urls
|
||||
$("#app").on("click", ".geolink", function (evt) {
|
||||
|
||||
$("#app").on("click", "a[href^='geo:']", function (evt) {
|
||||
window.open($(this).attr("href"), "_system");
|
||||
evt.preventDefault();
|
||||
});
|
||||
$("#app").on("click", "a[href^='tel:']", function (evt) {
|
||||
window.open($(this).attr("href"), "_system");
|
||||
evt.preventDefault();
|
||||
});
|
||||
$("#app").on("click", "a[href^='mailto:']", function (evt) {
|
||||
window.open($(this).attr("href"), "_system");
|
||||
evt.preventDefault();
|
||||
});
|
||||
@ -254,8 +262,15 @@ function initNW() {
|
||||
|
||||
setupHTML5BarcodeScanner();
|
||||
|
||||
// Handle geo: urls
|
||||
$("#app").on("click", ".geolink", function (evt) {
|
||||
$("#app").on("click", "a[href^='geo:']", function (evt) {
|
||||
require('nw.gui').Shell.openExternal($(this).attr("href"));
|
||||
evt.preventDefault();
|
||||
});
|
||||
$("#app").on("click", "a[href^='tel:']", function (evt) {
|
||||
require('nw.gui').Shell.openExternal($(this).attr("href"));
|
||||
evt.preventDefault();
|
||||
});
|
||||
$("#app").on("click", "a[href^='mailto:']", function (evt) {
|
||||
require('nw.gui').Shell.openExternal($(this).attr("href"));
|
||||
evt.preventDefault();
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user