From 076b69500ef55731c72a7b2e07ee2ce015b43780 Mon Sep 17 00:00:00 2001 From: Wouter R Date: Wed, 11 Dec 2013 17:57:29 +0100 Subject: [PATCH] =?UTF-8?q?Bind=20click=20buttons=20to=20=E2=80=98click?= =?UTF-8?q?=E2=80=99=20event=20to=20prevent=20double=20triggers.=20prev/ne?= =?UTF-8?q?xt=20buttons=20are=20now=20initially=20disabled.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js_src/main.js | 16 ++++++++-------- www/index.html | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/js_src/main.js b/js_src/main.js index 8c71265..a4672a9 100644 --- a/js_src/main.js +++ b/js_src/main.js @@ -30,9 +30,9 @@ $(function() { if (getURLParameter("c") != "null") communicateWithWifibox = (getURLParameter("c") == "1"); if (getURLParameter("r") != "null") wifiboxIsRemote = (getURLParameter("r") == "1"); if (getURLParameter("u") != "null") autoUpdate = (getURLParameter("u") == "1"); - + if (wifiboxIsRemote) { - // var hostname = "http://10.0.0.45"; + // var hostname = "http://10.0.0.45"; var hostname = "http://192.168.5.1"; wifiboxURL = hostname+"/d3dapi"; wifiboxCGIBinURL = hostname+"/cgi-bin/d3dapi"; @@ -67,7 +67,7 @@ $(function() { progressbar.init($("#progressbarCanvas"), $("#progressbarCanvasContainer")); message.init($("#message")); - + printer.init(); $(document).on(Printer.UPDATE,update); @@ -79,7 +79,7 @@ $(function() { $("body").css("overflow", "auto"); $("#debug_textArea").css("display", "block"); //$("#preview_tmp").css("display", "block"); - + $("#debug_display").css("display", "block"); // show and hide the progressguage and thermometer @@ -116,14 +116,14 @@ $(function() { function enableButton(elem, handler) { //var elem = $('#'+domId); elem.removeClass("disabled"); - elem.unbind('touchstart mousedown'); - elem.bind('touchstart mousedown', handler); + elem.unbind('click'); + elem.bind('click', handler); } function disableButton(elem) { //var elem = $('#'+domId); elem.addClass("disabled"); - elem.unbind('touchstart mousedown'); + elem.unbind('click'); } function showOrHideThermo() { @@ -152,4 +152,4 @@ function settingsLoaded() { function setDebugText(text) { $("#debug_display").text(text); -} \ No newline at end of file +} diff --git a/www/index.html b/www/index.html index 24b52e2..10b7cf5 100644 --- a/www/index.html +++ b/www/index.html @@ -33,8 +33,8 @@

- - + +

@@ -63,7 +63,7 @@ - +