Fix button events not firing
This commit is contained in:
parent
08a30d6c52
commit
1e8f1a25ae
@ -131,7 +131,7 @@ function displayAccountInfo() {
|
|||||||
}, "GET");
|
}, "GET");
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#app").on("click", "#setupAccountBtn", function () {
|
$("body").on("click", "#setupAccountBtn", function () {
|
||||||
if ($("#accountsetupform input#phonenumber").val() == "") {
|
if ($("#accountsetupform input#phonenumber").val() == "") {
|
||||||
app.dialog.alert("Add your phone number.", "Error");
|
app.dialog.alert("Add your phone number.", "Error");
|
||||||
return;
|
return;
|
||||||
@ -175,7 +175,7 @@ $("#app").on("click", "#setupAccountBtn", function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#app").on("click", "#updateAccountBtn", function () {
|
$("body").on("click", "#updateAccountBtn", function () {
|
||||||
if ($("#accountupdateform input#name").val() == "") {
|
if ($("#accountupdateform input#name").val() == "") {
|
||||||
app.dialog.alert("Add your name.", "Error");
|
app.dialog.alert("Add your name.", "Error");
|
||||||
return;
|
return;
|
||||||
@ -218,7 +218,7 @@ $("#app").on("click", "#updateAccountBtn", function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#app").on("click", "#connectExistingAccountBtn", function () {
|
$("body").on("click", "#connectExistingAccountBtn", function () {
|
||||||
app.dialog.prompt("Enter your phone number or account number:", "Connect Your Account", function (val) {
|
app.dialog.prompt("Enter your phone number or account number:", "Connect Your Account", function (val) {
|
||||||
var phone = val.replace(/\D/g, '');
|
var phone = val.replace(/\D/g, '');
|
||||||
if (phone.length < 10) {
|
if (phone.length < 10) {
|
||||||
|
@ -242,7 +242,7 @@ function initCordova() {
|
|||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
// Handle geo: urls
|
// Handle geo: urls
|
||||||
$("#app").on("click", "a[href^='geo:']", function (evt) {
|
$("body").on("click", "a[href^='geo:']", function (evt) {
|
||||||
if (cordova.platformId == "ios") {
|
if (cordova.platformId == "ios") {
|
||||||
window.open($(this).attr("href").replace("geo:", "http://maps.apple.com/?q="), "_system");
|
window.open($(this).attr("href").replace("geo:", "http://maps.apple.com/?q="), "_system");
|
||||||
} else if (cordova.platformId == "android") {
|
} else if (cordova.platformId == "android") {
|
||||||
@ -293,7 +293,7 @@ function initNW() {
|
|||||||
setupHTML5BarcodeScanner();
|
setupHTML5BarcodeScanner();
|
||||||
|
|
||||||
// Handle geo: urls
|
// Handle geo: urls
|
||||||
$("#app").on("click", "a[href^='geo:']", function (evt) {
|
$("body").on("click", "a[href^='geo:']", function (evt) {
|
||||||
require('nw.gui').Shell.openExternal($(this).attr("href"));
|
require('nw.gui').Shell.openExternal($(this).attr("href"));
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
});
|
});
|
||||||
@ -320,7 +320,7 @@ function initBrowser() {
|
|||||||
|
|
||||||
setupHTML5BarcodeScanner();
|
setupHTML5BarcodeScanner();
|
||||||
|
|
||||||
$("#app").on("click", ".geolink", function (evt) {
|
$("body").on("click", ".geolink", function (evt) {
|
||||||
window.open($(this).attr("href"), "_blank");
|
window.open($(this).attr("href"), "_blank");
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user