From 3e36752fc2a198cefeeb211056de73e8346948c1 Mon Sep 17 00:00:00 2001 From: squandor Date: Mon, 2 Jan 2017 22:23:34 +0100 Subject: [PATCH] changed default action for pushon button --- templates/switches.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/switches.html b/templates/switches.html index a4ebeae..bea5fcf 100644 --- a/templates/switches.html +++ b/templates/switches.html @@ -96,7 +96,8 @@ $(document).ready(function() { }); updateSwitches_block_{{count}}.push("{{v[0]}}"); {% elif (v[1] == "pushon") or (v[1] == "pushoff") %} - $('button[id="push_{{v[0]}}_block_{{count}}"]').click(function() { + $('button[id="push_{{v[0]}}_block_{{count}}"]').click(function(e) { + e.preventDefault(); changeSwitch(this, {{v[0]}}); }); {% elif (v[1] == "setpoint") %}