mirror of
https://github.com/Doodle3D/doodle3d-connect.git
synced 2024-11-05 23:23:22 +01:00
Form available check
This commit is contained in:
parent
ad2c2fcb4e
commit
be252ff87e
@ -38,15 +38,14 @@
|
||||
$.mobile.document.on( "pagebeforeshow", PAGE_ID, function( event, data ) {
|
||||
console.log("Connecting to network page pagebeforeshow");
|
||||
_pageData = d3d.util.getPageParams(PAGE_ID);
|
||||
if(_pageData === undefined) {
|
||||
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) {
|
||||
$.mobile.changePage("#boxes");
|
||||
return;
|
||||
}
|
||||
var boxURL = "http://"+_pageData.localip;
|
||||
|
||||
var form = data.prevPage.find("form");
|
||||
_formData = d3d.util.getFormData(form);
|
||||
|
||||
_infoAPI.init(boxURL);
|
||||
_networkAPI.init(boxURL);
|
||||
retrieveWiFiBoxID(function() {
|
||||
|
Loading…
Reference in New Issue
Block a user