mirror of
https://github.com/Doodle3D/doodle3d-connect.git
synced 2024-12-25 01:53:48 +01:00
Congratulate user, delay redirect
This commit is contained in:
parent
d2ba115f63
commit
79e201c3ff
@ -19,6 +19,8 @@
|
||||
var _wifiboxid;
|
||||
var _connectedChecking = false;
|
||||
|
||||
var CONNECTED_REDIRECT_DELAY = 5000;
|
||||
|
||||
var PAGE_ID = "#connecting_to_network";
|
||||
|
||||
var _self = this;
|
||||
@ -124,7 +126,14 @@
|
||||
connectedBoxNetworkAPI.updated = function(data) {
|
||||
data.status = parseInt(data.status,10);
|
||||
console.log(PAGE_ID+":connectedBoxNetworkAPI:onStatusUpdated: ",data.status);
|
||||
// if box finished connecting
|
||||
if(data.status === NetworkAPI.STATUS.CONNECTED) {
|
||||
console.log(" found connected box");
|
||||
_statusField.html("Connected to "+_pageData.ssid);
|
||||
_actionField.html("Congratulations the box is connected to <b>"+_pageData.ssid+"</b>. You will be redirected in a moment...");
|
||||
_actionField.attr("class","info");
|
||||
|
||||
setTimeout(function () {
|
||||
// redirect to it's box page
|
||||
console.log(" redirect to box");
|
||||
var linkParams = {localip: boxData.localip,wifiboxid: boxData.wifiboxid};
|
||||
@ -136,6 +145,7 @@
|
||||
// disable warnings that are enabled on boxes page
|
||||
d3d.util.disableRefreshPrevention();
|
||||
d3d.util.disableLeaveWarning();
|
||||
},CONNECTED_REDIRECT_DELAY);
|
||||
}
|
||||
};
|
||||
connectedBoxNetworkAPI.startAutoRefresh();
|
||||
|
Loading…
Reference in New Issue
Block a user