diff options
| author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-12-12 10:22:06 +0100 | 
|---|---|---|
| committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-12-12 10:22:06 +0100 | 
| commit | 823c57c747c77bda86c670c446d6f857bd2d1585 (patch) | |
| tree | 025f6e48359fd2fc4f729cf1a86ba2c1eaf8b4ca /python/gui/static/js | |
| parent | 5b5c607822139ba46fb08da84755ec0218d08151 (diff) | |
| download | dabmod-823c57c747c77bda86c670c446d6f857bd2d1585.tar.gz dabmod-823c57c747c77bda86c670c446d6f857bd2d1585.tar.bz2 dabmod-823c57c747c77bda86c670c446d6f857bd2d1585.zip | |
Fix rc values button function
Diffstat (limited to 'python/gui/static/js')
| -rw-r--r-- | python/gui/static/js/odr-rcvalues.js | 12 | 
1 files changed, 8 insertions, 4 deletions
| 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 = '<input type="text" id="input'+key+'" ' +                      'value="' + param['value'] + '">' +                      '<button type="button" class="btn btn-xs btn-warning"' + -                    'id="button'+key+'" >upd</button>'; +                    'id="button'+key+'" ' + +                    'data-controllable="'+name_controllable+'" ' + +                    'data-param="'+name_param+'" ' + +                    '>upd</button>';                  $('#rctable > tbody:last').append(                      '<tr><td>'+key+'</td>'+                      '<td>'+valueentry+'</td>'+                      '<td>'+param['help']+'</td></tr>'); -                  $('#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);                  });              }          } | 
