svghmi/gen_index_xhtml.xslt
branchsvghmi
changeset 3206 4fd7bd10e606
parent 3199 1582753e409b
child 3210 0ddefd20ca2b
equal deleted inserted replaced
3205:62753288be74 3206:4fd7bd10e606
    42     <xsl:text>var hmitree_types = [
    42     <xsl:text>var hmitree_types = [
    43 </xsl:text>
    43 </xsl:text>
    44     <xsl:for-each select="$indexed_hmitree/*">
    44     <xsl:for-each select="$indexed_hmitree/*">
    45       <xsl:text>    /* </xsl:text>
    45       <xsl:text>    /* </xsl:text>
    46       <xsl:value-of select="@index"/>
    46       <xsl:value-of select="@index"/>
    47       <xsl:text>  </xsl:text>
       
    48       <xsl:value-of select="@hmipath"/>
       
    49       <xsl:text> */ "</xsl:text>
    47       <xsl:text> */ "</xsl:text>
    50       <xsl:value-of select="substring(local-name(), 5)"/>
    48       <xsl:value-of select="substring(local-name(), 5)"/>
       
    49       <xsl:text>"</xsl:text>
       
    50       <xsl:if test="position()!=last()">
       
    51         <xsl:text>,</xsl:text>
       
    52       </xsl:if>
       
    53       <xsl:text>
       
    54 </xsl:text>
       
    55     </xsl:for-each>
       
    56     <xsl:text>];
       
    57 </xsl:text>
       
    58     <xsl:text>
       
    59 </xsl:text>
       
    60     <xsl:text>var hmitree_paths = [
       
    61 </xsl:text>
       
    62     <xsl:for-each select="$indexed_hmitree/*">
       
    63       <xsl:text>    /* </xsl:text>
       
    64       <xsl:value-of select="@index"/>
       
    65       <xsl:text> */ "</xsl:text>
       
    66       <xsl:value-of select="@hmipath"/>
    51       <xsl:text>"</xsl:text>
    67       <xsl:text>"</xsl:text>
    52       <xsl:if test="position()!=last()">
    68       <xsl:if test="position()!=last()">
    53         <xsl:text>,</xsl:text>
    69         <xsl:text>,</xsl:text>
    54       </xsl:if>
    70       </xsl:if>
    55       <xsl:text>
    71       <xsl:text>
  3050 </xsl:text>
  3066 </xsl:text>
  3051     <xsl:text>
  3067     <xsl:text>
  3052 </xsl:text>
  3068 </xsl:text>
  3053     <xsl:text>    function sprintf(key) {
  3069     <xsl:text>    function sprintf(key) {
  3054 </xsl:text>
  3070 </xsl:text>
  3055     <xsl:text>        // </xsl:text>
  3071     <xsl:text>        // arguments is not an array, but should be fine for this call
  3056     <arguments/>
       
  3057     <xsl:text> is not an array, but should be fine for this call
       
  3058 </xsl:text>
  3072 </xsl:text>
  3059     <xsl:text>        return sprintf_format(sprintf_parse(key), arguments)
  3073     <xsl:text>        return sprintf_format(sprintf_parse(key), arguments)
  3060 </xsl:text>
  3074 </xsl:text>
  3061     <xsl:text>    }
  3075     <xsl:text>    }
  3062 </xsl:text>
  3076 </xsl:text>
  7601 </xsl:text>
  7615 </xsl:text>
  7602           <xsl:text>var current_subscribed_page;
  7616           <xsl:text>var current_subscribed_page;
  7603 </xsl:text>
  7617 </xsl:text>
  7604           <xsl:text>var current_page_index;
  7618           <xsl:text>var current_page_index;
  7605 </xsl:text>
  7619 </xsl:text>
       
  7620           <xsl:text>var page_node_local_index = hmi_local_index("page_node");
       
  7621 </xsl:text>
  7606           <xsl:text>
  7622           <xsl:text>
  7607 </xsl:text>
  7623 </xsl:text>
  7608           <xsl:text>function prepare_svg() {
  7624           <xsl:text>function prepare_svg() {
  7609 </xsl:text>
  7625 </xsl:text>
  7610           <xsl:text>    // prevents context menu from appearing on right click and long touch
  7626           <xsl:text>    // prevents context menu from appearing on right click and long touch
  7698           <xsl:text>
  7714           <xsl:text>
  7699 </xsl:text>
  7715 </xsl:text>
  7700           <xsl:text>    current_subscribed_page = page_name;
  7716           <xsl:text>    current_subscribed_page = page_name;
  7701 </xsl:text>
  7717 </xsl:text>
  7702           <xsl:text>    current_page_index = page_index;
  7718           <xsl:text>    current_page_index = page_index;
       
  7719 </xsl:text>
       
  7720           <xsl:text>    let page_node;
       
  7721 </xsl:text>
       
  7722           <xsl:text>    if(page_index != undefined){
       
  7723 </xsl:text>
       
  7724           <xsl:text>        page_node = hmitree_paths[page_index];
       
  7725 </xsl:text>
       
  7726           <xsl:text>    }else{
       
  7727 </xsl:text>
       
  7728           <xsl:text>        page_node = "";
       
  7729 </xsl:text>
       
  7730           <xsl:text>    }
       
  7731 </xsl:text>
       
  7732           <xsl:text>    apply_hmi_value(page_node_local_index, page_node);
  7703 </xsl:text>
  7733 </xsl:text>
  7704           <xsl:text>
  7734           <xsl:text>
  7705 </xsl:text>
  7735 </xsl:text>
  7706           <xsl:text>    jumps_need_update = true;
  7736           <xsl:text>    jumps_need_update = true;
  7707 </xsl:text>
  7737 </xsl:text>