svghmi/gen_index_xhtml.xslt
branchsvghmi
changeset 3134 af558c9a5141
parent 3128 32a4675af377
child 3141 6d4c1e6560ac
equal deleted inserted replaced
3133:450cd01324ad 3134:af558c9a5141
   972     <xsl:text> */
   972     <xsl:text> */
   973 </xsl:text>
   973 </xsl:text>
   974     <xsl:text>
   974     <xsl:text>
   975 </xsl:text>
   975 </xsl:text>
   976     <xsl:variable name="translations" select="ns:GetTranslations($translatable_strings)"/>
   976     <xsl:variable name="translations" select="ns:GetTranslations($translatable_strings)"/>
   977     <xsl:text>var langs = [</xsl:text>
   977     <xsl:text>var langs = [ "default",</xsl:text>
   978     <xsl:for-each select="$translations/langs/lang">
   978     <xsl:for-each select="$translations/langs/lang">
   979       <xsl:text>"</xsl:text>
   979       <xsl:text>"</xsl:text>
   980       <xsl:value-of select="."/>
   980       <xsl:value-of select="."/>
   981       <xsl:text>"</xsl:text>
   981       <xsl:text>"</xsl:text>
   982       <xsl:if test="position()!=last()">
   982       <xsl:if test="position()!=last()">
  3975       <xsl:with-param name="hmi_element" select="$hmi_element"/>
  3975       <xsl:with-param name="hmi_element" select="$hmi_element"/>
  3976       <xsl:with-param name="labels">
  3976       <xsl:with-param name="labels">
  3977         <xsl:text>text box button highlight</xsl:text>
  3977         <xsl:text>text box button highlight</xsl:text>
  3978       </xsl:with-param>
  3978       </xsl:with-param>
  3979     </xsl:call-template>
  3979     </xsl:call-template>
  3980     <xsl:text>    content: [
  3980     <xsl:text>  content:</xsl:text>
  3981 </xsl:text>
  3981     <xsl:choose>
  3982     <xsl:text>    /* TODO : Support HMI:List */
  3982       <xsl:when test="count(arg) = 1 and arg[1]/@value = '#langs'">
  3983 </xsl:text>
  3983         <xsl:text>langs</xsl:text>
  3984     <xsl:for-each select="arg">
  3984       </xsl:when>
  3985       <xsl:text>"</xsl:text>
  3985       <xsl:otherwise>
  3986       <xsl:value-of select="@value"/>
  3986         <xsl:text>[
  3987       <xsl:text>",
  3987 </xsl:text>
  3988 </xsl:text>
  3988         <xsl:for-each select="arg">
  3989     </xsl:for-each>
  3989           <xsl:text>"</xsl:text>
  3990     <xsl:text>    ],
  3990           <xsl:value-of select="@value"/>
  3991 </xsl:text>
  3991           <xsl:text>",
  3992     <xsl:text>
  3992 </xsl:text>
       
  3993         </xsl:for-each>
       
  3994         <xsl:text>  ]</xsl:text>
       
  3995       </xsl:otherwise>
       
  3996     </xsl:choose>
       
  3997     <xsl:text>,
  3993 </xsl:text>
  3998 </xsl:text>
  3994   </xsl:template>
  3999   </xsl:template>
  3995   <xsl:template mode="widget_defs" match="widget[@type='ForEach']">
  4000   <xsl:template mode="widget_defs" match="widget[@type='ForEach']">
  3996     <xsl:param name="hmi_element"/>
  4001     <xsl:param name="hmi_element"/>
  3997     <xsl:if test="count(path) != 1">
  4002     <xsl:if test="count(path) != 1">
  6965 </xsl:text>
  6970 </xsl:text>
  6966           <xsl:text>        }
  6971           <xsl:text>        }
  6967 </xsl:text>
  6972 </xsl:text>
  6968           <xsl:text>
  6973           <xsl:text>
  6969 </xsl:text>
  6974 </xsl:text>
  6970           <xsl:text>        
       
  6971 </xsl:text>
       
  6972           <xsl:text>        requestHMIAnimation();
  6975           <xsl:text>        requestHMIAnimation();
  6973 </xsl:text>
  6976 </xsl:text>
  6974           <xsl:text>        return;
  6977           <xsl:text>        return;
  6975 </xsl:text>
  6978 </xsl:text>
  6976           <xsl:text>    }
  6979           <xsl:text>    }