0
0
mirror of https://github.com/Doodle3D/doodle3d-connect.git synced 2024-11-16 19:17:56 +01: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"); console.log(PAGE_ID+": pagebeforeshow");
_pageData = d3d.util.getPageParams(PAGE_ID); _pageData = d3d.util.getPageParams(PAGE_ID);
var form = data.prevPage.find("form"); var form = data.prevPage.find("form");
// check if there are url params and a form from a prev page // check if there are url params and
if(_pageData === undefined || form.length === 0) { // 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"); $.mobile.changePage("#boxes");
return; return;
} }

View File

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