summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorctucx <c@ctu.cx>2021-03-06 22:52:12 +0100
committerctucx <c@ctu.cx>2021-03-06 22:52:12 +0100
commit863b2b2817e180c3db9f64e59db3201dcfd527e1 (patch)
tree1d94b2ca5402c4452e00f956b200c6bfa9f366b7
parent4abc74c024995fb508c0493a8fcf1207a0b78b4a (diff)
downloadwebmusic-nginx-863b2b2817e180c3db9f64e59db3201dcfd527e1.tar.gz
webmusic-nginx-863b2b2817e180c3db9f64e59db3201dcfd527e1.tar.bz2
webmusic-nginx-863b2b2817e180c3db9f64e59db3201dcfd527e1.zip
add class 'dir' to folders, class 'file' to files
-rw-r--r--webmusic.xslt12
1 files changed, 9 insertions, 3 deletions
diff --git a/webmusic.xslt b/webmusic.xslt
index c407119..15e3fd7 100644
--- a/webmusic.xslt
+++ b/webmusic.xslt
@@ -77,6 +77,9 @@
<li>
<a class="action">[--] </a>
<xsl:element name="a">
+ <xsl:attribute name="class">
+ <xsl:text>dir</xsl:text>
+ </xsl:attribute>
<xsl:attribute name="href">
<xsl:call-template name="url-encode">
<xsl:with-param name="str" select="concat($path, current())" />
@@ -89,7 +92,6 @@
<xsl:template match="file">
<li>
- <script>queue.push('<xsl:call-template name="url-encode"><xsl:with-param name="str" select="concat($path, current())" /></xsl:call-template>')</script>
<xsl:element name="a">
<xsl:attribute name="class">
<xsl:text>action</xsl:text>
@@ -103,8 +105,12 @@
</xsl:attribute>
<xsl:text>[DL] </xsl:text>
</xsl:element>
- <a href="#">
- <xsl:attribute name="onclick">playSong('<xsl:call-template name="url-encode"><xsl:with-param name="str" select="concat($path, current())" /></xsl:call-template>')</xsl:attribute>
+ <a class="file">
+ <xsl:attribute name="href">
+ <xsl:call-template name="url-encode">
+ <xsl:with-param name="str" select="concat($path, current())" />
+ </xsl:call-template>
+ </xsl:attribute>
<xsl:value-of select="." />
</a>
</li>