Skip to content

Commit

Permalink
Add support for subtitle
Browse files Browse the repository at this point in the history
  • Loading branch information
mcartmel committed Nov 17, 2020
1 parent f47e099 commit 5ab3976
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions nodel-webui-js/src/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
<row>
<column sm="12">
<title showevent="Show" showvalue="On">Testing button groups</title>
<subtitle showevent="Show" showvalue="On">Subtitle</subtitle>
<buttongroup showevent="Show" showvalue="On">
<button action='PresetChromecast' class='btn-default'>Chromecast</button>
<button action='PresetTV' class='btn-default'>TV</button>
Expand Down
18 changes: 16 additions & 2 deletions nodel-webui-js/src/templates.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
</div>
</xsl:template>
<!-- column -->
<!-- title -->
<!-- title / subtitle -->
<xsl:template name="title_body">
<xsl:if test="@showevent">
<xsl:attribute name="class">
Expand Down Expand Up @@ -190,7 +190,21 @@
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- title -->
<xsl:template match="subtitle">
<xsl:choose>
<xsl:when test="@size">
<xsl:element name="h{@size}">
<xsl:call-template name="title_body"/>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<h5>
<xsl:call-template name="title_body"/>
</h5>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- title / subtitle -->
<!-- text -->
<xsl:template match="text">
<p>
Expand Down

0 comments on commit 5ab3976

Please sign in to comment.