-
Bug
-
Resolution: Fixed
-
Major
-
None
-
None
It is impossible to click on track link to change track when the track description is multiline.
I have made a change in a project in order to make this work :
Instead of
<a href="#" onclick="playAudio (this, '{$playListId}', '{$audioUrl}', '{$info-id}', '{file-description}'); return false;">
I put
<xsl:variable name="description"> <xsl:call-template name="replace-string"> <xsl:with-param name="str" select="file-description"/> <xsl:with-param name="strToReplace" select="' '"/> <xsl:with-param name="newStr" select="' '"/> </xsl:call-template> </xsl:variable> <a href="#" onclick="playAudio (this, '{$playListId}', '{$audioUrl}', '{$info-id}', '{$description}'); return false;">
With this template to replace strings :
<xsl:template name="replace-string"> <xsl:param name="str" /> <xsl:param name="strToReplace" /> <xsl:param name="newStr" /> <xsl:if test="string-length(substring-before($str,$strToReplace)) =0"> <xsl:value-of select="$str" /> </xsl:if> <xsl:if test="string-length(substring-before($str,$strToReplace)) > 0"> <xsl:value-of select="substring-before($str,$strToReplace)" /> <xsl:value-of select="$newStr" /> </xsl:if> <xsl:if test="string-length(substring-after($str,$strToReplace)) > 0"> <xsl:call-template name="replace-string"> <xsl:with-param name="str" select="substring-after($str,$strToReplace)" /> <xsl:with-param name="strToReplace" select="$strToReplace" /> <xsl:with-param name="newStr" select="$newStr" /> </xsl:call-template> </xsl:if> </xsl:template>