From ef141ea8594e2ef2db041c7ac13b72d560f03314 Mon Sep 17 00:00:00 2001 From: peteruithoven Date: Wed, 17 Jun 2015 10:31:19 +0200 Subject: [PATCH 1/2] Prevent an update/status call to a undefined url --- js/BoxPage.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); From df9901ce5ea932dca90c65495d805c8506e38fbd Mon Sep 17 00:00:00 2001 From: peteruithoven Date: Wed, 17 Jun 2015 14:47:49 +0200 Subject: [PATCH 2/2] Install update fix --- js/UpdatingPage.js | 4 ++++ 1 file changed, 4 insertions(+) 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) {