diff -r e38654ec6281 -r 8d15c6238e62 svghmi/gen_index_xhtml.xslt --- a/svghmi/gen_index_xhtml.xslt Mon Mar 02 16:30:29 2020 +0100 +++ b/svghmi/gen_index_xhtml.xslt Tue Mar 03 10:58:00 2020 +0100 @@ -1265,45 +1265,45 @@ - frequency: 5, + frequency: 5, - dispatch: function(value) { + dispatch: function(value) { - this.value_elt.textContent = String(value); + this.value_elt.textContent = String(value); - }, + }, - init: function() { + init: function() { - id(" + id(" ").addEventListener( - "click", - - evt => alert('XXX TODO : Edit value')); + "click", + + evt => alert('XXX TODO : Edit value')); - id(" + id(" ").addEventListener( - "click", - - evt => {let new_val = change_hmi_value(this.indexes[0], " + "click", + + evt => {let new_val = change_hmi_value(this.indexes[0], " "); - this.value_elt.textContent = String(new_val);}); + this.value_elt.textContent = String(new_val);}); - }, + }, @@ -1313,78 +1313,78 @@ - frequency: 5, - - dispatch: function(value) { - - for(let choice of this.choices){ - - if(value != choice.value){ - - choice.elt.setAttribute("style", "display:none"); - - } else { - - choice.elt.setAttribute("style", choice.style); + frequency: 5, + + dispatch: function(value) { + + for(let choice of this.choices){ + + if(value != choice.value){ + + choice.elt.setAttribute("style", "display:none"); + + } else { + + choice.elt.setAttribute("style", choice.style); + + } } - } - - }, - - init: function() { - - // Hello Switch - - }, - - choices: [ + }, + + init: function() { + + // Hello Switch + + }, + + choices: [ - { - - elt:id(" + { + + elt:id(" "), - style:" + style:" ", - value: + value: - } + } , - ], + ], - on_click: function(evt) { - - console.log(evt); - - switch_page(this.args[0]); - - }, - - init: function() { - - this.element.setAttribute("onclick", "hmi_widgets[' + on_click: function(evt) { + + console.log(evt); + + switch_page(this.args[0]); + + }, + + init: function() { + + this.element.setAttribute("onclick", "hmi_widgets[' '].on_click(evt)"); - }, + },