forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r426731 - /forrest/trunk/main/webapp/skins/common/xslt/html/tab-to-menu.xsl
Date Sat, 29 Jul 2006 00:54:25 GMT
Author: thorsten
Date: Fri Jul 28 17:54:24 2006
New Revision: 426731

URL: http://svn.apache.org/viewvc?rev=426731&view=rev
Log:
FOR-209 First level selected tab is not highlighted when containing 2nd level tabs
Using the tabPath and comparing it to the longest dir.

Modified:
    forrest/trunk/main/webapp/skins/common/xslt/html/tab-to-menu.xsl

Modified: forrest/trunk/main/webapp/skins/common/xslt/html/tab-to-menu.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/skins/common/xslt/html/tab-to-menu.xsl?rev=426731&r1=426730&r2=426731&view=diff
==============================================================================
--- forrest/trunk/main/webapp/skins/common/xslt/html/tab-to-menu.xsl (original)
+++ forrest/trunk/main/webapp/skins/common/xslt/html/tab-to-menu.xsl Fri Jul 28 17:54:24 2006
@@ -171,11 +171,14 @@
   </xsl:template>
 
   <xsl:template match="tab" mode="level1">
+    <xsl:variable name="tabPath">
+      <xsl:value-of select="@dir"/>/<xsl:value-of select="@href"/>
+    </xsl:variable>
     <xsl:choose>
       <xsl:when test="@id and @id = $matching-id">
         <xsl:call-template name="selected"/>
       </xsl:when>
-      <xsl:when test="not(@id) and @dir = $longest-dir or @href = $longest-dir">
+      <xsl:when test="starts-with($tabPath,$longest-dir)">
         <xsl:call-template name="selected"/>
       </xsl:when>
       <xsl:otherwise>



Mime
View raw message