svghmi/gen_index_xhtml.xslt
branchsvghmi
changeset 3155 99ce78ddd353
parent 3154 a8c81a080588
child 3156 76c0c0a524c9
equal deleted inserted replaced
3154:a8c81a080588 3155:99ce78ddd353
  4450       <xsl:text>    frequency: 5,
  4450       <xsl:text>    frequency: 5,
  4451 </xsl:text>
  4451 </xsl:text>
  4452     </xsl:if>
  4452     </xsl:if>
  4453     <xsl:text>    dispatch: function(value) {
  4453     <xsl:text>    dispatch: function(value) {
  4454 </xsl:text>
  4454 </xsl:text>
  4455     <xsl:if test="$have_edit">
  4455     <xsl:if test="$have_value or $have_edit">
  4456       <xsl:text>        this.last_val = value;
       
  4457 </xsl:text>
       
  4458     </xsl:if>
       
  4459     <xsl:if test="$have_value">
       
  4460       <xsl:choose>
  4456       <xsl:choose>
  4461         <xsl:when test="count(arg) = 1">
  4457         <xsl:when test="count(arg) = 1">
  4462           <xsl:text>        this.last_display = vsprintf("</xsl:text>
  4458           <xsl:text>        this.last_display = vsprintf("</xsl:text>
  4463           <xsl:value-of select="arg[1]/@value"/>
  4459           <xsl:value-of select="arg[1]/@value"/>
  4464           <xsl:text>", value);
  4460           <xsl:text>", [value]);
  4465 </xsl:text>
  4461 </xsl:text>
  4466         </xsl:when>
  4462         </xsl:when>
  4467         <xsl:otherwise>
  4463         <xsl:otherwise>
  4468           <xsl:text>        this.last_display = value;
  4464           <xsl:text>        this.last_display = value;
  4469 </xsl:text>
  4465 </xsl:text>
  4470         </xsl:otherwise>
  4466         </xsl:otherwise>
  4471       </xsl:choose>
  4467       </xsl:choose>
       
  4468     </xsl:if>
       
  4469     <xsl:if test="$have_value">
  4472       <xsl:text>        this.request_animate();
  4470       <xsl:text>        this.request_animate();
  4473 </xsl:text>
  4471 </xsl:text>
  4474     </xsl:if>
  4472     </xsl:if>
  4475     <xsl:text>    },
  4473     <xsl:text>    },
  4476 </xsl:text>
  4474 </xsl:text>
  4487     <xsl:if test="$have_edit">
  4485     <xsl:if test="$have_edit">
  4488       <xsl:text>        this.edit_elt.onclick = () =&gt; edit_value("</xsl:text>
  4486       <xsl:text>        this.edit_elt.onclick = () =&gt; edit_value("</xsl:text>
  4489       <xsl:value-of select="path/@value"/>
  4487       <xsl:value-of select="path/@value"/>
  4490       <xsl:text>", "</xsl:text>
  4488       <xsl:text>", "</xsl:text>
  4491       <xsl:value-of select="path/@type"/>
  4489       <xsl:value-of select="path/@type"/>
  4492       <xsl:text>", this, this.last_val);
  4490       <xsl:text>", this, this.last_display);
  4493 </xsl:text>
  4491 </xsl:text>
  4494       <xsl:if test="$have_value">
  4492       <xsl:if test="$have_value">
  4495         <xsl:text>        this.value_elt.style.pointerEvents = "none";
  4493         <xsl:text>        this.value_elt.style.pointerEvents = "none";
  4496 </xsl:text>
  4494 </xsl:text>
  4497       </xsl:if>
  4495       </xsl:if>