Improve UI flow for linking Munzee, allow back button to cancel
This commit is contained in:
parent
e659b0fe83
commit
d23eeea7cf
@ -26,6 +26,8 @@ userteamid = 0;
|
|||||||
MUNZEE_CLIENT_ID = '616cecc70e17f4a3cb64146dce2d33f5';
|
MUNZEE_CLIENT_ID = '616cecc70e17f4a3cb64146dce2d33f5';
|
||||||
MUNZEE_REDIRECT = 'http://gs.terranquest.net/munzee.php';
|
MUNZEE_REDIRECT = 'http://gs.terranquest.net/munzee.php';
|
||||||
|
|
||||||
|
|
||||||
|
currentscreen = "";
|
||||||
/*
|
/*
|
||||||
* Runs when the app opens
|
* Runs when the app opens
|
||||||
*/
|
*/
|
||||||
@ -78,6 +80,7 @@ function openscreen(screenname, effect) {
|
|||||||
} else {
|
} else {
|
||||||
$('#content-zone').load("screens/" + screenname + ".html");
|
$('#content-zone').load("screens/" + screenname + ".html");
|
||||||
}
|
}
|
||||||
|
currentscreen = screenname;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -210,6 +213,9 @@ function getTeamColorFromId(id) {
|
|||||||
|
|
||||||
// Handle back button to close things
|
// Handle back button to close things
|
||||||
document.addEventListener("backbutton", function (event) {
|
document.addEventListener("backbutton", function (event) {
|
||||||
|
if (currentscreen == "munzeelink") {
|
||||||
|
openscreen("home");
|
||||||
|
}
|
||||||
if ($('#overlay-main').css('display') !== 'none') {
|
if ($('#overlay-main').css('display') !== 'none') {
|
||||||
closeMain();
|
closeMain();
|
||||||
} else if ($('#chatmsgs').css('display') !== 'none') {
|
} else if ($('#chatmsgs').css('display') !== 'none') {
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
+ '&scope=read capture_light');
|
+ '&scope=read capture_light');
|
||||||
|
|
||||||
$("#munzeeoauth").load(function () {
|
$("#munzeeoauth").load(function () {
|
||||||
alert(this.contentWindow.location);
|
//alert(this.contentWindow.location);
|
||||||
if (this.contentWindow.location == "about:closeme") {
|
if (this.contentWindow.location == "about:closeme") {
|
||||||
openscreen("home");
|
openscreen("home");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user