25 | id("«@id»").setAttribute("onclick", "hmi_widgets['«$hmi_element/@id»'].on_op_click('«func:escape_quotes(@inkscape:label)»')"); |
25 | id("«@id»").setAttribute("onclick", "hmi_widgets['«$hmi_element/@id»'].on_op_click('«func:escape_quotes(@inkscape:label)»')"); |
26 } |
26 } |
27 | }, |
27 | }, |
28 | on_op_click: function(opstr) { |
28 | on_op_click: function(opstr) { |
29 | let new_val = change_hmi_value(this.indexes[0], opstr); |
29 | let new_val = change_hmi_value(this.indexes[0], opstr); |
30 if "$have_value"{ |
30 // if "$have_value"{ |
31 | this.value_elt.textContent = String(new_val); |
31 // | this.value_elt.textContent = String(new_val); |
32 /* TODO gray out value until refreshed */ |
32 // /* TODO gray out value until refreshed */ |
33 } |
33 // } |
34 | }, |
34 | }, |
35 | on_edit_click: function(opstr) { |
35 | on_edit_click: function(opstr) { |
36 | edit_value("«path/@value»", "«path/@type»", this, this.last_val); |
36 | edit_value("«path/@value»", "«path/@type»", this, this.last_val); |
37 | }, |
37 | }, |
38 |
38 |
39 | edit_callback: function(new_val) { |
39 | edit_callback: function(new_val) { |
40 | apply_hmi_value(this.indexes[0], new_val); |
40 | apply_hmi_value(this.indexes[0], new_val); |
41 if "$have_value"{ |
41 // if "$have_value"{ |
42 | this.value_elt.textContent = String(new_val); |
42 // | this.value_elt.textContent = String(new_val); |
43 /* TODO gray out value until refreshed */ |
43 // /* TODO gray out value until refreshed */ |
44 } |
44 // } |
45 | }, |
45 | }, |
46 } |
46 } |