diff --git a/README.md b/README.md index afcca9e..4e6a33b 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ > This is a fork of the original [ESPUI library by @s00500](https://github.com/s00500/ESPUI). > -> Current upstream basis is v1.5.3, adding the following features: +> Currently, this fork is equal to the original release 1.5.4, as the following commits have been merged upstream: > > - Fixed touchmove bug on some mobile browsers ([1a45b31](https://github.com/orithena/ESPUI/commit/1a45b311e023a084a90bd3cc3d79c47073235916), merged upstream) > - Dev Tool: Python script ([tools/prepare_static_ui_resources.py](https://github.com/orithena/ESPUI/blob/master/tools/prepare_static_ui_sources.py)) to regenerate minified and gzipped HTML/CSS/JS files ([557bdd8](https://github.com/orithena/ESPUI/commit/557bdd862c0b0128adbe036b1bd6bb6dbbc738b8), merged upstream) -> - The 'no connection' label can now be clicked to reinitialize and reconnect the UI ([615665d](https://github.com/orithena/ESPUI/commit/615665d9c57ea8ac746169d1a7f1be39ef16df16), pull request pending) -> - Enlarged slider controls on touchscreen devices ([aaf6240](https://github.com/orithena/ESPUI/commit/aaf6240220f4763be6e1753a5f11b2ee5b8d0d37), pull request pending) +> - The 'no connection' label can now be clicked to reinitialize and reconnect the UI ([615665d](https://github.com/orithena/ESPUI/commit/615665d9c57ea8ac746169d1a7f1be39ef16df16), merged upstream) +> - Enlarged slider controls on touchscreen devices ([aaf6240](https://github.com/orithena/ESPUI/commit/aaf6240220f4763be6e1753a5f11b2ee5b8d0d37), merged upstream) # ESPUI ![ESPUI](https://github.com/s00500/ESPUI/blob/master/docs/ui_complete.png) diff --git a/examples/gui/data/js/controls.js b/examples/gui/data/js/controls.js index 099587a..748caa2 100644 --- a/examples/gui/data/js/controls.js +++ b/examples/gui/data/js/controls.js @@ -92,13 +92,13 @@ function restart() { } function conStatusError() { - $("#conStatus").removeClass("color-green"); - $("#conStatus").addClass("color-red"); - $("#conStatus").text("Error / No Connection"); - $("#conStatus").off(); - $("#conStatus").on({ - 'click': restart - }); + $("#conStatus").removeClass("color-green"); + $("#conStatus").addClass("color-red"); + $("#conStatus").text("Error / No Connection (click me to retry)"); + $("#conStatus").off(); + $("#conStatus").on({ + 'click': restart + }); } function start() { diff --git a/examples/gui/data/js/controls.min.js b/examples/gui/data/js/controls.min.js index 9025d1a..d965e12 100644 --- a/examples/gui/data/js/controls.min.js +++ b/examples/gui/data/js/controls.min.js @@ -3,7 +3,7 @@ break;case C_ALIZARIN:return"alizarin" break;case C_NONE:return"" break;default:return"";}} var websock;function restart(){$(document).add('*').off();$("#row").html("");websock.close();start();} -function conStatusError(){$("#conStatus").removeClass("color-green");$("#conStatus").addClass("color-red");$("#conStatus").text("Error / No Connection");$("#conStatus").off();$("#conStatus").on({'click':restart});} +function conStatusError(){$("#conStatus").removeClass("color-green");$("#conStatus").addClass("color-red");$("#conStatus").text("Error / No Connection (click me to retry)");$("#conStatus").off();$("#conStatus").on({'click':restart});} function start(){websock=new WebSocket('ws://'+window.location.hostname+'/ws');websock.onopen=function(evt){console.log('websock open');$("#conStatus").addClass("color-green");$("#conStatus").text("Connected");};websock.onclose=function(evt){console.log('websock close');conStatusError();};websock.onerror=function(evt){console.log(evt);conStatusError();};websock.onmessage=function(evt){console.log(evt);var data=JSON.parse(evt.data);var e=document.body;var center="";switch(data.type){case UI_TITEL:document.title=data.label;$('#mainHeader').html(data.label);break;case UI_LABEL:$('#row').append("
"+data.label+"

"+data.value+"
");break;case UI_BUTTON:$('#row').append("
"+data.label+"

");$('#'+data.id).on({'touchstart':function(e){e.preventDefault();buttonclick(data.id,true)}});$('#'+data.id).on({'touchend':function(e){e.preventDefault();buttonclick(data.id,false)}});break;case UI_SWITCHER:var label="