From 823c57c747c77bda86c670c446d6f857bd2d1585 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Wed, 12 Dec 2018 10:22:06 +0100 Subject: Fix rc values button function --- python/gui/static/js/odr-rcvalues.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'python') diff --git a/python/gui/static/js/odr-rcvalues.js b/python/gui/static/js/odr-rcvalues.js index a3a5e07..486a8a7 100644 --- a/python/gui/static/js/odr-rcvalues.js +++ b/python/gui/static/js/odr-rcvalues.js @@ -49,17 +49,21 @@ function requestStatus() { var valueentry = '' + ''; + 'id="button'+key+'" ' + + 'data-controllable="'+name_controllable+'" ' + + 'data-param="'+name_param+'" ' + + '>upd'; $('#rctable > tbody:last').append( ''+key+''+ ''+valueentry+''+ ''+param['help']+''); - $('#button'+key).click(function() { - console.log("trigger " + key + " with " + name_controllable + " " + name_param); - buttonSetRc("input"+key, name_controllable, name_param); + var attr_c = this.getAttribute('data-controllable'); + var attr_p = this.getAttribute('data-param'); + var k = attr_c + "_" + attr_p; + buttonSetRc("input"+k, attr_c, attr_p); }); } } -- cgit v1.2.3