aheritier    2004/05/10 15:25:05

  Modified:    xdoc     plugin.jelly
               xdoc/src/plugin-resources navigation.jelly site.jsl
               xdoc/src/plugin-resources/css maven-classic.css
                        maven-theme.css
               xdoc/src/plugin-resources/templates maven-reports.xml
  Added:       xdoc/src/plugin-resources/images external-classic.png
                        external.png newwindow-classic.png newwindow.png
  Log:
  MPXDOC-97
  
  Revision  Changes    Path
  1.60      +20 -3     maven-plugins/xdoc/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven-plugins/xdoc/plugin.jelly,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- plugin.jelly      5 May 2004 07:38:30 -0000       1.59
  +++ plugin.jelly      10 May 2004 22:25:05 -0000      1.60
  @@ -55,6 +55,7 @@
         @pluginName the name of the plugin.  @plugin:report goal must exist
         @description text description of report
         @link the nav-bar link for this report
  +      @target the target for the new page (_self, _blank, ...) 
         -->
         <maven:pluginVar var="reports" plugin="maven-xdoc-plugin" property="reports" 
/>
   
  @@ -73,6 +74,7 @@
             ${report.put('pluginName', pluginName)}
             ${report.put('description', description)}
             ${report.put('link', link)}
  +          ${report.put('target', target)}
             ${reports.add(report)}
           </j:set>
         </j:if>
  @@ -182,13 +184,28 @@
           @name
           @img
           @state - expanded / collapsed / none
  +        @target
           -->
       <define:tag name="itemLink">
  -      <a href="${pathTool.calculateLink(link,relativePath)}">
  +      <x:element name="a">
  +        <x:attribute 
name="href">${pathTool.calculateLink(link,relativePath)}</x:attribute>
  +        <j:choose>
  +          <j:when test="${target != null and target.equals('_blank')}">
  +            <x:attribute name="class">newWindow</x:attribute>
  +            <x:attribute name="title">New Window</x:attribute>
  +          </j:when>
  +          <j:when test="${link.startsWith('http')}">
  +            <x:attribute name="class">externalLink</x:attribute>
  +            <x:attribute name="title">External Link</x:attribute>
  +          </j:when>
  +        </j:choose>
  +        <j:if test="${!empty(target)}">
  +          <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="${img}" 
title="${name}" alt="${name}"/></j:if>
  -      </a>
  +        <j:if test="${!empty(img)}"><img style="border: 1px" 
src="${pathTool.calculateLink(img,relativePath)}" title="${name}" 
alt="${name}"/></j:if>
  +      </x:element>
       </define:tag>
       
       <define:tag name="text-xdoc">
  
  
  
  1.9       +1 -11     maven-plugins/xdoc/src/plugin-resources/navigation.jelly
  
  Index: navigation.jelly
  ===================================================================
  RCS file: /home/cvs/maven-plugins/xdoc/src/plugin-resources/navigation.jelly,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- navigation.jelly  2 May 2004 10:16:08 -0000       1.8
  +++ navigation.jelly  10 May 2004 22:25:05 -0000      1.9
  @@ -54,20 +54,10 @@
                 <j:forEach var="report" items="${reports}">
                     <j:set var="link" value="${report.link}"/>
                     <j:if test="${!empty(link)}">
  -                    <item name="${report.name}" href="/${report.link}.html"/>
  +                    <item name="${report.name}" href="/${report.link}.html" 
target="${report.target}"/>
                     </j:if>
                 </j:forEach>
               </item>
  -            <!-- j:if test="${pom.reports.isEmpty()}">
  -              <j:if test="${sourcesPresent}">
  -                <item name="JavaDocs" href="/apidocs/index.html"/>
  -                <item name="Source XReference" href="/xref/index.html"/>
  -
  -                <j:if test="${unitTestSourcesPresent == 'true'}">
  -                  <item name="Test XReference" href="/xref-test/index.html"/>
  -                </j:if>
  -              </j:if>
  -            </j:if -->
               <j:set var="devProcess" value="false"/>
               <util:available file="${maven.docs.src}/development-process.xml">
                 <j:set var="devProcess" value="true"/>
  
  
  
  1.58      +43 -18    maven-plugins/xdoc/src/plugin-resources/site.jsl
  
  Index: site.jsl
  ===================================================================
  RCS file: /home/cvs/maven-plugins/xdoc/src/plugin-resources/site.jsl,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- site.jsl  5 May 2004 07:38:31 -0000       1.57
  +++ site.jsl  10 May 2004 22:25:05 -0000      1.58
  @@ -253,6 +253,7 @@
       <x:set var="_name" select="string(@name)"/>
       <x:set var="_link" select="string(@href)"/>
       <x:set var="_img" select="string(@img)"/>
  +    <x:set var="_target" select="string(@target)"/>
       <x:set var="_childCount" select="count(./item)"/>
       <j:set var="_isCollapsed" value="${navbean.isCollapsed(item.get(0))}"/>
       <j:set var="_state" value="none"/>
  @@ -262,10 +263,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}"/></strong>
  +        <strong><doc:itemLink name="${_name}" link="${_link}" img="${_img}" 
state="${_state}" target="${_target}"/></strong>
         </j:if>
         <j:if test="${!navbean.isSelected(item.get(0))}">
  -        <doc:itemLink name="${_name}" link="${_link}" img="${_img}" 
state="${_state}"/>
  +        <doc:itemLink name="${_name}" link="${_link}" img="${_img}" 
state="${_state}" target="${_target}"/>
         </j:if>
         <j:if test="${_state == 'expanded'}">
           <ul>
  @@ -279,15 +280,17 @@
     <jsl:template match="links" trim="true">
       <j:set var="linkCount" value="1"/>
       <x:forEach var="link" select="item">
  +      <j:set var="_img"><x:expr select="@img"/></j:set>
         <j:set var="_name"><x:expr select="@name"/></j:set>
         <j:set var="_link"><x:expr select="@href"/></j:set>
  +      <j:set var="_target"><x:expr select="@target"/></j:set>
         <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}"/>
  +        <doc:itemLink name="${_name}" link="${_link}" img="${_img}" 
target="${_target}"/>
         </j:whitespace>
         <j:set var="linkCount" value="${1+linkCount}"/>
       </x:forEach>
  @@ -446,25 +449,47 @@
   
     <!-- remove the space at the end of parsed "a" anchors and fix local hrefs -->
     <jsl:template match="a" trim="true">
  -    <j:set var="href"><x:expr select="@href" /></j:set>
  -    <j:choose>
  -      <j:when test="${!empty(href) and href.startsWith('#')}">
  -        <x:element name="a" trim="true">
  -          <x:forEach var="attr" select="@*">
  -            <j:choose>
  -              <j:when test="${attr.name == 'href'}">
  -                <x:attribute name="href"><doc:escapeNameToken 
value="${attr.value}"/></x:attribute>
  +    <x:element name="a" trim="true">
  +      <x:forEach var="attr" select="@*">
  +        <j:choose>
  +          <j:when test="${attr.name == 'href'}">
  +            <j:set var="href">${attr.value}</j:set>
  +            <j:choose>                 
  +              <j:when test="${href.startsWith('#')}">
  +                     <x:attribute name="href">
  +                       <doc:escapeNameToken value="${href}"/>
  +                     </x:attribute>
                 </j:when>
  +              <j:when test="${href.startsWith('http://')}">
  +                <x:attribute name="href">${href}</x:attribute>
  +                     <x:attribute name="class">externalLink</x:attribute>
  +                     <x:attribute name="title">External Link</x:attribute>
  +              </j:when>                  
                 <j:otherwise>
  -                <x:attribute name="${attr.name}">${attr.value}</x:attribute>
  +                <x:attribute name="href">${href}</x:attribute>
                 </j:otherwise>
               </j:choose>
  -          </x:forEach>
  -          <jsl:applyTemplates/>
  -        </x:element>
  -      </j:when>
  -      <j:otherwise><jsl:copy><jsl:applyTemplates/></jsl:copy></j:otherwise>
  -    </j:choose>
  +          </j:when>
  +          <j:when test="${attr.name == 'target'}">
  +            <j:set var="target">${attr.value}</j:set>
  +            <j:if test="${!empty(target) and target.equals('_blank')}">
  +              <x:attribute name="class">newWindow</x:attribute>
  +              <x:attribute name="title">New Window</x:attribute>
  +            </j:if>              
  +            <x:attribute name="target">${target}</x:attribute>
  +          </j:when>
  +          <j:when test="${attr.name == 'name'}">
  +            <x:attribute name="name">
  +               <doc:escapeNameToken value="${attr.value}"/>
  +             </x:attribute>
  +          </j:when>
  +          <j:otherwise>
  +            <x:attribute name="${attr.name}">${attr.value}</x:attribute>
  +          </j:otherwise>
  +        </j:choose>
  +      </x:forEach>
  +      <jsl:applyTemplates/>
  +    </x:element>
     </jsl:template>
      
     <!-- copy any other elements through -->
  
  
  
  1.2       +11 -1     maven-plugins/xdoc/src/plugin-resources/css/maven-classic.css
  
  Index: maven-classic.css
  ===================================================================
  RCS file: /home/cvs/maven-plugins/xdoc/src/plugin-resources/css/maven-classic.css,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- maven-classic.css 3 May 2004 23:51:22 -0000       1.1
  +++ maven-classic.css 10 May 2004 22:25:05 -0000      1.2
  @@ -96,6 +96,16 @@
    color: @UI_HREF_LINK_SELFREF@ !important;
    }
   
  +a.externalLink:link, a.externalLink:visited, a.externalLink:active, 
a.externalLink:hover {
  +  background: url(../images/external-classic.png) right center no-repeat;
  +  padding-right: 15px;
  +}
  +
  +a.newWindow:link, a.newWindow:visited, a.newWindow:active, a.newWindow:hover {
  +  background: url(../images/newwindow-classic.png) right center no-repeat;
  +  padding-right: 18px;
  +}
  +
   h2, h3 {
    margin-top: 1em;
    margin-bottom: 0;
  
  
  
  1.5       +11 -3     maven-plugins/xdoc/src/plugin-resources/css/maven-theme.css
  
  Index: maven-theme.css
  ===================================================================
  RCS file: /home/cvs/maven-plugins/xdoc/src/plugin-resources/css/maven-theme.css,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- maven-theme.css   2 Feb 2004 23:15:20 -0000       1.4
  +++ maven-theme.css   10 May 2004 22:25:05 -0000      1.5
  @@ -14,6 +14,14 @@
   a:active, a:hover {
     color:#69c;
   }
  +a.externalLink:link, a.externalLink:visited, a.externalLink:active, 
a.externalLink:hover {
  +  background: url(../images/external.png) right center no-repeat;
  +  padding-right: 15px;
  +}
  +a.newWindow:link, a.newWindow:visited, a.newWindow:active, a.newWindow:hover {
  +  background: url(../images/newwindow.png) right center no-repeat;
  +  padding-right: 18px;
  +}
   h2 {
     padding: 4px 4px 4px 6px;
     border: 1px solid #999;
  @@ -45,9 +53,9 @@
     background-color: #eee;
   }
   #navcolumn h5 {
  -   font-size: smaller;
  -   border-bottom: 1px solid #aaaaaa;
  -   padding-top: 2px;
  +  font-size: smaller;
  +  border-bottom: 1px solid #aaaaaa;
  +  padding-top: 2px;
   }
   
   table.bodyTable th {
  
  
  
  1.1                  
maven-plugins/xdoc/src/plugin-resources/images/external-classic.png
  
        <<Binary file>>
  
  
  1.1                  maven-plugins/xdoc/src/plugin-resources/images/external.png
  
        <<Binary file>>
  
  
  1.1                  
maven-plugins/xdoc/src/plugin-resources/images/newwindow-classic.png
  
        <<Binary file>>
  
  
  1.1                  maven-plugins/xdoc/src/plugin-resources/images/newwindow.png
  
        <<Binary file>>
  
  
  1.11      +1 -1      
maven-plugins/xdoc/src/plugin-resources/templates/maven-reports.xml
  
  Index: maven-reports.xml
  ===================================================================
  RCS file: 
/home/cvs/maven-plugins/xdoc/src/plugin-resources/templates/maven-reports.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- maven-reports.xml 28 Apr 2004 03:37:29 -0000      1.10
  +++ maven-reports.xml 10 May 2004 22:25:05 -0000      1.11
  @@ -39,7 +39,7 @@
             #foreach ($report in $reports)
               #if ($report.link && $report.link.length() != 0)
               <tr>
  -              <td><a href="${report.link}.html">$report.name</a></td>
  +              <td><a href="${report.link}.html" 
target="${report.target}">$report.name</a></td>
                 <td>$report.description</td>
               </tr>
               #end
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to