svghmi/gen_index_xhtml.xslt
branchsvghmi
changeset 2898 a2910281fcb5
parent 2897 bf8a39cc65e4
child 2899 f1baf2d0552c
equal deleted inserted replaced
2897:bf8a39cc65e4 2898:a2910281fcb5
   874   </xsl:template>
   874   </xsl:template>
   875   <xsl:template mode="widget_defs" match="widget[@type='Jump']">
   875   <xsl:template mode="widget_defs" match="widget[@type='Jump']">
   876     <xsl:param name="hmi_element"/>
   876     <xsl:param name="hmi_element"/>
   877     <xsl:text>    on_click: function(evt) {
   877     <xsl:text>    on_click: function(evt) {
   878 </xsl:text>
   878 </xsl:text>
   879     <xsl:text>        switch_page(this.args[0], this.indexes[0]);
   879     <xsl:text>        const index = this.indexes.length &gt; 0 ? this.indexes[0] + this.offset : undefined;
       
   880 </xsl:text>
       
   881     <xsl:text>        switch_page(this.args[0], index);
   880 </xsl:text>
   882 </xsl:text>
   881     <xsl:text>    },
   883     <xsl:text>    },
   882 </xsl:text>
   884 </xsl:text>
   883     <xsl:text>    init: function() {
   885     <xsl:text>    init: function() {
   884 </xsl:text>
   886 </xsl:text>