# HG changeset patch # User Edouard Tisserant <edouard.tisserant@gmail.com> # Date 1612887008 -3600 # Node ID af558c9a514175c85c75713590188b05e0080dd7 # Parent 450cd01324ad112df3b3332aa83024121fc271e8 SVGHMI: Update generated XSLT diff -r 450cd01324ad -r af558c9a5141 svghmi/gen_index_xhtml.xslt --- a/svghmi/gen_index_xhtml.xslt Tue Feb 09 17:09:08 2021 +0100 +++ b/svghmi/gen_index_xhtml.xslt Tue Feb 09 17:10:08 2021 +0100 @@ -974,7 +974,7 @@ <xsl:text> </xsl:text> <xsl:variable name="translations" select="ns:GetTranslations($translatable_strings)"/> - <xsl:text>var langs = [</xsl:text> + <xsl:text>var langs = [ "default",</xsl:text> <xsl:for-each select="$translations/langs/lang"> <xsl:text>"</xsl:text> <xsl:value-of select="."/> @@ -3977,19 +3977,24 @@ <xsl:text>text box button highlight</xsl:text> </xsl:with-param> </xsl:call-template> - <xsl:text> content: [ -</xsl:text> - <xsl:text> /* TODO : Support HMI:List */ -</xsl:text> - <xsl:for-each select="arg"> - <xsl:text>"</xsl:text> - <xsl:value-of select="@value"/> - <xsl:text>", -</xsl:text> - </xsl:for-each> - <xsl:text> ], -</xsl:text> - <xsl:text> + <xsl:text> content:</xsl:text> + <xsl:choose> + <xsl:when test="count(arg) = 1 and arg[1]/@value = '#langs'"> + <xsl:text>langs</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>[ +</xsl:text> + <xsl:for-each select="arg"> + <xsl:text>"</xsl:text> + <xsl:value-of select="@value"/> + <xsl:text>", +</xsl:text> + </xsl:for-each> + <xsl:text> ]</xsl:text> + </xsl:otherwise> + </xsl:choose> + <xsl:text>, </xsl:text> </xsl:template> <xsl:template mode="widget_defs" match="widget[@type='ForEach']"> @@ -6967,8 +6972,6 @@ </xsl:text> <xsl:text> </xsl:text> - <xsl:text> -</xsl:text> <xsl:text> requestHMIAnimation(); </xsl:text> <xsl:text> return;