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