You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2007/05/04 17:07:52 UTC
svn commit: r535282 - in /lenya/trunk/src/webapp/lenya:
resources/css/menu.xml xslt/menu/menu2xhtml.xsl
Author: andreas
Date: Fri May 4 08:07:52 2007
New Revision: 535282
URL: http://svn.apache.org/viewvc?view=rev&rev=535282
Log:
Improved layout of disabled and checked menu items
Modified:
lenya/trunk/src/webapp/lenya/resources/css/menu.xml
lenya/trunk/src/webapp/lenya/xslt/menu/menu2xhtml.xsl
Modified: lenya/trunk/src/webapp/lenya/resources/css/menu.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/resources/css/menu.xml?view=diff&rev=535282&r1=535281&r2=535282
==============================================================================
--- lenya/trunk/src/webapp/lenya/resources/css/menu.xml (original)
+++ lenya/trunk/src/webapp/lenya/resources/css/menu.xml Fri May 4 08:07:52 2007
@@ -62,7 +62,9 @@
#lenya-options ul li.disabled { cursor: default; color: #999; }
-#lenya-options ul li ul li a { font-size: 11px; font-weight: normal; padding: 2px 0; margin-left: 13px; text-indent: -13px; }
+#lenya-options ul li ul li a {
+ font-size: 11px; font-weight: normal; padding: 2px 0 2px 2px; margin-left: 11px;
+}
#lenya-options ul li ul li a img { border: none; vertical-align: top; }
#lenya-options ul li ul li a:hover { background: #fff; }
Modified: lenya/trunk/src/webapp/lenya/xslt/menu/menu2xhtml.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/xslt/menu/menu2xhtml.xsl?view=diff&rev=535282&r1=535281&r2=535282
==============================================================================
--- lenya/trunk/src/webapp/lenya/xslt/menu/menu2xhtml.xsl (original)
+++ lenya/trunk/src/webapp/lenya/xslt/menu/menu2xhtml.xsl Fri May 4 08:07:52 2007
@@ -239,24 +239,33 @@
<xsl:template name="checkItem">
- <xsl:choose>
- <xsl:when test="@checked = 'true'">
- <img src="{$contextprefix}/lenya/menu/images/checked.png" alt="checked"/>
- </xsl:when>
- <xsl:when test="@checked = 'false'">
- <img src="{$contextprefix}/lenya/menu/images/unchecked.png" alt="unchecked"/>
- </xsl:when>
- <xsl:otherwise>
- <img src="{$contextprefix}/lenya/menu/images/checkedPlaceholder.png" alt=""/>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:if test="@checked">
+ <xsl:variable name="image">
+ <xsl:choose>
+ <xsl:when test="@checked = 'true'">
+ <xsl:text>checked.png</xsl:text>
+ </xsl:when>
+ <xsl:when test="@checked = 'false'">
+ <xsl:text>unchecked.png</xsl:text>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:attribute name="style">
+ <xsl:text>background: url('</xsl:text>
+ <xsl:value-of select="$contextprefix"/><xsl:text>/lenya/menu/images/</xsl:text>
+ <xsl:value-of select="$image"/>
+ <xsl:text>') left 2px no-repeat;</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
</xsl:template>
<xsl:template match="menu:item">
<xsl:choose>
<xsl:when test="@href">
- <li><a>
+ <li>
+ <xsl:call-template name="checkItem"/>
+ <a>
<xsl:attribute name="href">
<xsl:value-of select="@href"/>
<xsl:apply-templates select="@*[local-name() != 'href']"/>
@@ -272,12 +281,12 @@
</xsl:choose>
</xsl:if>
</xsl:attribute>
- <xsl:call-template name="checkItem"/>
<span><xsl:apply-templates select="i18n:*|text()"/></span>
</a></li>
</xsl:when>
<xsl:otherwise>
<li class="disabled">
+ <xsl:call-template name="checkItem"/>
<a>
<xsl:for-each select="menu:message">
<xsl:copy>
@@ -289,7 +298,6 @@
</i18n:translate>
</xsl:copy>
</xsl:for-each>
- <xsl:call-template name="checkItem"/>
<span><xsl:apply-templates select="i18n:*|text()"/></span>
</a>
</li>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org