0
0
mirror of https://github.com/Doodle3D/doodle3d-connect.git synced 2024-09-28 17:58:37 +02:00

Fixed check on connecting to network page

It should now only redirect to home when the network is encrypted and
there is no form data (or there are no url params).
This commit is contained in:
peteruithoven 2014-05-22 11:26:52 +02:00
parent 2de7bc1fc3
commit 83a9a37a3d
2 changed files with 8 additions and 3 deletions

View File

@ -39,8 +39,13 @@
console.log(PAGE_ID+": pagebeforeshow");
_pageData = d3d.util.getPageParams(PAGE_ID);
var form = data.prevPage.find("form");
// check if there are url params and a form from a prev page
if(_pageData === undefined || form.length === 0) {
// check if there are url params and
// when encrypted if there was a form from a prev page
if(_pageData.encryption === "") {
_pageData.encryption = "none";
}
if(_pageData === undefined ||
(_pageData.encryption !== "none" && form.length === 0)) {
$.mobile.changePage("#boxes");
return;
}

View File

@ -73,8 +73,8 @@
var secured = (network.encryption !== "none" && network.encryption !== "");
var link;
var icon = "";
if(secured) {
linkParams.encryption = network.encryption;
if(secured) {
link = d3d.util.replaceURLParameters(baseSecuredLink,linkParams);
icon = "lock";
} else {