diff --git a/js/ControlPage.js b/js/ControlPage.js index deb634e..d35f7e5 100644 --- a/js/ControlPage.js +++ b/js/ControlPage.js @@ -15,7 +15,7 @@ var _includeBetasCheckbox; var _submitButton; var _settings; - + var _updateAPI = new UpdateAPI(); var _configAPI = new ConfigAPI(); var _printerAPI = new PrinterAPI(); @@ -46,7 +46,8 @@ $("#btnStop").hide(); $("#btnNewPrint").hide(); - + $("#infoDisconnected").hide(); + $("#infoConnecting").hide(); //$("#btnSend").on("click", function(data) { // // console.log("test",$("#gcode").val()); @@ -141,6 +142,7 @@ d3d.util.showLoader(); _infoAPI.getStatus(function(successData) { + $("#grpStatusAndControl").show(); var state = successData.state; @@ -152,7 +154,19 @@ $("#infoState").show(); $("#infoState").text("Printer " + state + "..."); $("#grpStatusAndControl").hide(); + + if (state==="connecting") { + $("#infoConnecting").show(); + $("#infoDisconnected").hide(); + } else if (state==="disconnected") { + $("#infoConnecting").hide(); + $("#infoDisconnected").show(); + } + } else { + $("#infoDisconnected").hide(); + $("#infoConnecting").hide(); + $("#infoState").hide(); $("#grpStatusAndControl").show(); $("#infoNozzleTemperature").html(successData.hotend + " / " + successData.hotend_target + " °C"); @@ -247,7 +261,7 @@ _infoAPI.getInfo(function(successData) { $("span#infoWiFiBox").text(successData.wifiboxid); },function(failData) { - + }); // refreshSettings(); diff --git a/js/PrintPage.js b/js/PrintPage.js index ae9862a..14a369a 100644 --- a/js/PrintPage.js +++ b/js/PrintPage.js @@ -69,6 +69,8 @@ }, function(failData) { console.log("_connectAPI.list failData",failData); + $("#infoWiFiBox").html("failed to retrieve list with local WiFi-Box'es"); + }); $("#lstBoxes").on("change", function(data) { @@ -211,7 +213,6 @@ _printerAPI.fetch(data,function(successData) { console.log("fetchPrint success",successData); - setTimeout(function() { var url = d3d.util.replaceURLParameters("#control",_pageData); $.mobile.changePage(url); diff --git a/www/index.html b/www/index.html index 54d20c0..4fbb166 100644 --- a/www/index.html +++ b/www/index.html @@ -108,8 +108,7 @@

Material

...

- - + Please select your Doodle3D WiFi-Box: