diff --git a/js/BoxPage.js b/js/BoxPage.js index a2b2644..26bcd6f 100644 --- a/js/BoxPage.js +++ b/js/BoxPage.js @@ -53,14 +53,15 @@ //console.log(" _boxData: ",_boxData); _title.text(_boxData.wifiboxid); - setNetworkStatus(NetworkAPI.STATUS.CONNECTED); var drawLink = (_boxData.link)? _boxData.link : boxURL; _page.find("#drawItem a").attr("href",drawLink); _networkAPI.init(boxURL); - retrieveNetworkStatus(); _updateAPI.init(boxURL); + + setNetworkStatus(NetworkAPI.STATUS.CONNECTED); + retrieveNetworkStatus(); }); $.mobile.document.on( "pagebeforehide", PAGE_ID, function( event, data ) { clearTimeout(_retryRetrieveStatusDelay); diff --git a/js/UpdatingPage.js b/js/UpdatingPage.js index ffe227c..18a9870 100644 --- a/js/UpdatingPage.js +++ b/js/UpdatingPage.js @@ -87,6 +87,7 @@ } break; case UpdateAPI.STATUS.INSTALLED: + _installing = false; _updateAPI.stopAutoRefresh(); clearTimeout(_updatedRedirectDelay); _updatedRedirectDelay = setTimeout(function () { @@ -102,6 +103,9 @@ } },UPDATED_REDIRECT_DELAY); break; + case UpdateAPI.STATUS.INSTALL_FAILED: + _installing = false; + break; } } function updatePage(data) {