Uploaded image for project: 'Multimedia gallery'
  1. Multimedia gallery
  2. GALL-38

[Audio gallery] Impossible to click on track link when the track description is multiline.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.2
    • 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="'&#10;'"/>
      	<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>
      

            Unassigned Unassigned
            jonathan Jonathan Wendlinger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: