You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ah...@apache.org on 2006/03/19 01:19:12 UTC
svn commit: r386905 - in /maven/maven-1/plugins/trunk/xdoc: ./
src/plugin-resources/ src/plugin-resources/css/
src/plugin-resources/images/ src/plugin-resources/xsd/ src/xsd/ xdocs/
Author: aheritier
Date: Sat Mar 18 16:19:09 2006
New Revision: 386905
URL: http://svn.apache.org/viewcvs?rev=386905&view=rev
Log:
Item name is always displayed even if img attribute is setted. In the navigation file the new attribute 'hideName' can be used to hide the name in the link (if you want to display only the image for example).
An image can be used in the menu entry for a report.
Removed:
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/images/pdf.gif
Modified:
maven/maven-1/plugins/trunk/xdoc/plugin.jelly
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/css/maven-base.css
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/navigation.jelly
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/xsd/maven-navigation.xsd
maven/maven-1/plugins/trunk/xdoc/src/xsd/maven-navigation-1.10.xsd
maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml
maven/maven-1/plugins/trunk/xdoc/xdocs/tags.xml
Modified: maven/maven-1/plugins/trunk/xdoc/plugin.jelly
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/plugin.jelly?rev=386905&r1=386904&r2=386905&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/xdoc/plugin.jelly Sat Mar 18 16:19:09 2006
@@ -61,6 +61,7 @@
@fileSuffix the file suffix to add to the link ('.html' by default)
@externalLink the nav-bar link for this report
@target the target for the new page (_self, _blank, ...)
+ @image an image to display in the link generated in the reports list
-->
<maven:get var="reports" plugin="maven-xdoc-plugin" property="reports" />
@@ -82,6 +83,7 @@
${report.put('fileSuffix', fileSuffix)}
${report.put('externalLink', externalLink)}
${report.put('target', target)}
+ ${report.put('image', image)}
${reports.add(report)}
</j:set>
</j:if>
@@ -192,6 +194,7 @@
@img
@state - expanded / collapsed / none
@target
+ @hideName set it to true to hide the link name (can be use to display only the image)
-->
<define:tag name="itemLink">
<j:catch>
@@ -218,8 +221,7 @@
<x:attribute name="target">${target}</x:attribute>
</j:if>
<j:if test="${empty(state)}"><j:set var="state" value="none"/></j:if>
- <j:if test="${empty(img)}">${name}</j:if>
- <j:if test="${!empty(img)}"><img style="border: 1px" src="${pathTool.calculateLink(img, relativePath)}" title="${name}" alt="${name}"/></j:if>
+ <j:if test="${!empty(img)}"><img class="imageLink" src="${pathTool.calculateLink(img, relativePath)}" title="${name}" alt="${name}"/></j:if><j:if test="${empty(hideName) or hideName!=true}">${name}</j:if>
</x:element>
</define:tag>
Modified: maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/css/maven-base.css
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/css/maven-base.css?rev=386905&r1=386904&r2=386905&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/css/maven-base.css (original)
+++ maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/css/maven-base.css Sat Mar 18 16:19:09 2006
@@ -154,3 +154,11 @@
margin: 0px;
padding: 0px;
}
+#navcolumn img.imageLink, .imageLink{
+ padding-left: 0px;
+ padding-bottom: 0px;
+ padding-top: 0px;
+ padding-right: 2px;
+ border: 0px;
+ margin: 0px;
+}
Modified: maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/navigation.jelly
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/navigation.jelly?rev=386905&r1=386904&r2=386905&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/navigation.jelly (original)
+++ maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/navigation.jelly Sat Mar 18 16:19:09 2006
@@ -82,12 +82,14 @@
</j:if>
<item name="${report.name}"
href="/${link}${fileSuffix}"
- target="${report.target}" />
+ target="${report.target}"
+ img="${report.image}"/>
</j:if>
<j:if test="${empty(link) and !empty(externalLink)}">
<item name="${report.name}"
href="${externalLink}"
- target="${report.target}" />
+ target="${report.target}"
+ img="${report.image}"/>
</j:if>
</j:forEach>
</item>
Modified: maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl?rev=386905&r1=386904&r2=386905&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl (original)
+++ maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl Sat Mar 18 16:19:09 2006
@@ -673,13 +673,14 @@
<x:set var="_name" select="string(@name)"/>
<x:set var="_link" select="string(@href)"/>
<x:set var="_target" select="string(@target)"/>
+ <x:set var="_hideName" select="string(@hideName)"/>
<j:whitespace trim="false">
<j:if test="${linkCount != 1}">
<j:if test="${!(maven.xdoc.crumb.separator == '')}">
<span class="separator">${maven.xdoc.crumb.separator}</span>
</j:if>
</j:if>
- <doc:itemLink name="${_name}" link="${_link}" img="${_img}" target="${_target}"/>
+ <doc:itemLink name="${_name}" link="${_link}" img="${_img}" target="${_target}" hideName="${_hideName}"/>
</j:whitespace>
<j:set var="linkCount" value="${1+linkCount}"/>
</x:forEach>
@@ -692,8 +693,9 @@
<x:set var="_name" select="string(@name)"/>
<x:set var="_link" select="string(@href)"/>
<x:set var="_target" select="string(@target)"/>
+ <x:set var="_hideName" select="string(@hideName)"/>
<j:whitespace trim="false">
- <doc:itemLink name="${_name}" link="${_link}" img="${_img}" target="${_target}"/> <span class="separator">></span>
+ <doc:itemLink name="${_name}" link="${_link}" img="${_img}" target="${_target}" hideName="${_hideName}"/> <span class="separator">></span>
</j:whitespace>
</x:forEach>
</jsl:template>
@@ -742,6 +744,7 @@
<x:set var="_link" select="string(@href)"/>
<x:set var="_img" select="string(@img)"/>
<x:set var="_target" select="string(@target)"/>
+ <x:set var="_hideName" select="string(@hideName)"/>
<x:set var="_childCount" select="count(./item)"/>
<j:set var="_isCollapsed" value="${navbean.isCollapsed(item.get(0))}"/>
<j:set var="_state" value="none"/>
@@ -771,10 +774,10 @@
</j:if>
<li class="${_state}">
<j:if test="${navbean.isSelected(item.get(0))}">
- <strong><doc:itemLink name="${_name}" link="${_link}" img="${_img}" state="${_state}" target="${_target}"/></strong>
+ <strong><doc:itemLink name="${_name}" link="${_link}" img="${_img}" state="${_state}" target="${_target}" hideName="${_hideName}"/></strong>
</j:if>
<j:if test="${!navbean.isSelected(item.get(0))}">
- <doc:itemLink name="${_name}" link="${_link}" img="${_img}" state="${_state}" target="${_target}"/>
+ <doc:itemLink name="${_name}" link="${_link}" img="${_img}" state="${_state}" target="${_target}" hideName="${_hideName}"/>
</j:if>
<j:if test="${_state == 'expanded'}">
<ul>
Modified: maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/xsd/maven-navigation.xsd
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/xsd/maven-navigation.xsd?rev=386905&r1=386904&r2=386905&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/xsd/maven-navigation.xsd (original)
+++ maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/xsd/maven-navigation.xsd Sat Mar 18 16:19:09 2006
@@ -97,6 +97,7 @@
<xs:attribute name="target" type="xs:string"/>
<xs:attribute name="img" type="xs:string"/>
<!-- img is an href that will be used as the image for link -->
+ <xs:attribute name="hideName" type="xs:boolean"/>
</xs:complexType>
</xs:element>
</xs:schema>
Modified: maven/maven-1/plugins/trunk/xdoc/src/xsd/maven-navigation-1.10.xsd
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/src/xsd/maven-navigation-1.10.xsd?rev=386905&r1=386904&r2=386905&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/src/xsd/maven-navigation-1.10.xsd (original)
+++ maven/maven-1/plugins/trunk/xdoc/src/xsd/maven-navigation-1.10.xsd Sat Mar 18 16:19:09 2006
@@ -97,6 +97,7 @@
<xs:attribute name="target" type="xs:string"/>
<xs:attribute name="img" type="xs:string"/>
<!-- img is an href that will be used as the image for link -->
+ <xs:attribute name="hideName" type="xs:boolean"/>
</xs:complexType>
</xs:element>
</xs:schema>
Modified: maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml?rev=386905&r1=386904&r2=386905&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml Sat Mar 18 16:19:09 2006
@@ -27,6 +27,8 @@
</properties>
<body>
<release version="1.10-SNAPSHOT" date="in SVN">
+ <action dev="aheritier" type="update">An image can be used in the menu entry for a report.</action>
+ <action dev="aheritier" type="update">Item name is always displayed even if img attribute is setted. In the navigation file the new attribute 'hideName' can be used to hide the name in the link (if you want to display only the image for example).</action>
<action dev="aheritier" type="add">Allow the use of items' attributes 'target' and 'img' for breadcrumbs entries in the navigation file.</action>
<action dev="aheritier" type="update">In breadcrumbs, use for the project's name nav.title if defined, pom.name otherwise.</action>
<action dev="aheritier" type="fix">Display the "external link" icon only if the link host is different from the project url (pom.url).</action>
Modified: maven/maven-1/plugins/trunk/xdoc/xdocs/tags.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/xdocs/tags.xml?rev=386905&r1=386904&r2=386905&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/xdocs/tags.xml (original)
+++ maven/maven-1/plugins/trunk/xdoc/xdocs/tags.xml Sat Mar 18 16:19:09 2006
@@ -76,6 +76,11 @@
<td>Yes</td>
<td>The target for the new page (_self, _blank, ...).</td>
</tr>
+ <tr>
+ <td>image</td>
+ <td>Yes</td>
+ <td>The link to an image to display in the report entry in the navigation bar. This link must be relative to the root directory of the documentation.</td>
+ </tr>
</table>
</subsection>
<subsection name="formatAsNumber Tag">
@@ -183,7 +188,7 @@
</table>
</subsection>
<subsection name="itemLink Tag">
- <p>Used to generate the links in the navigation bar.</p>
+ <p>Used to generate the links in the navigation bar, the breadcrumbs and the quick links.</p>
<table>
<tr><th>Attribute</th><th>Optional?</th><th>Description</th></tr>
<tr>
@@ -204,7 +209,12 @@
<tr>
<td>img</td>
<td>Yes</td>
- <td>An optional image to display instead of the link name.</td>
+ <td>An optional image to display in addition to the name.</td>
+ </tr>
+ <tr>
+ <td>hideName</td>
+ <td>Yes</td>
+ <td>Set to true to hide the link's name (can be used to only display the image for example).</td>
</tr>
<tr>
<td>state</td>
@@ -214,7 +224,7 @@
<tr>
<td>target</td>
<td>Yes</td>
- <td></td>
+ <td>The same as in HTML. Used with frames to specify in which frame the link should be rendered. If <code>_blank</code> is used, an icon is displayed to show that a new window is opened by clicking on this link.</td>
</tr>
</table>
</subsection>