maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From denn...@apache.org
Subject svn commit: r1310063 - in /maven/doxia/doxia-sitetools/trunk: doxia-decoration-model/pom.xml doxia-decoration-model/src/main/mdo/decoration.mdo doxia-site-renderer/src/main/resources/org/apache/maven/doxia/siterenderer/resources/default-site.vm
Date Thu, 05 Apr 2012 20:46:27 GMT
Author: dennisl
Date: Thu Apr  5 20:46:27 2012
New Revision: 1310063

URL: http://svn.apache.org/viewvc?rev=1310063&view=rev
Log:
[DOXIASITETOOLS-54] site.xml should also have <title> attribute for all elements that
have <alt> attributes

Add <title> attribute for banner, linkItem and menu.

Modified:
    maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml
    maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo
    maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/resources/org/apache/maven/doxia/siterenderer/resources/default-site.vm

Modified: maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml?rev=1310063&r1=1310062&r2=1310063&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml (original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/pom.xml Thu Apr  5 20:46:27 2012
@@ -51,7 +51,7 @@ under the License.
           <models>
             <model>src/main/mdo/decoration.mdo</model>
           </models>
-          <version>1.1.0</version>
+          <version>1.3.0</version>
           <firstVersion>1.0.0</firstVersion>
         </configuration>
         <executions>

Modified: maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo?rev=1310063&r1=1310062&r2=1310063&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo (original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/main/mdo/decoration.mdo Thu
Apr  5 20:46:27 2012
@@ -270,6 +270,13 @@ under the License.
           <type>String</type>
           <identifier>true</identifier>
         </field>
+        <field>
+          <name>title</name>
+          <version>1.3.0+</version>
+          <description>The title for the banner image.</description>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
       </fields>
     </class>
 
@@ -439,6 +446,13 @@ under the License.
           <type>String</type>
           <identifier>true</identifier>
         </field>
+        <field xml.attribute="true">
+          <name>title</name>
+          <description>The title to use for the image.</description>
+          <version>1.3.0+</version>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
       </fields>
     </class>
 
@@ -525,6 +539,13 @@ under the License.
           <type>String</type>
           <identifier>true</identifier>
         </field>
+        <field xml.attribute="true">
+          <name>title</name>
+          <version>1.3.0+</version>
+          <description>The title for the image.</description>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
         <field>
           <name>items</name>
           <description>A list of menu item.</description>

Modified: maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/resources/org/apache/maven/doxia/siterenderer/resources/default-site.vm
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/resources/org/apache/maven/doxia/siterenderer/resources/default-site.vm?rev=1310063&r1=1310062&r2=1310063&view=diff
==============================================================================
--- maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/resources/org/apache/maven/doxia/siterenderer/resources/default-site.vm
(original)
+++ maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/resources/org/apache/maven/doxia/siterenderer/resources/default-site.vm
Thu Apr  5 20:46:27 2012
@@ -1,6 +1,6 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <!-- Generated by Apache Maven Doxia @project.version@ at $dateFormat.format( $currentDate
) -->
-#macro ( link $href $name $target $img $position $alt $border $width $height )
+#macro ( link $href $name $target $img $position $alt $border $width $height $title )
   #set ( $linkTitle = ' title="' + $name + '"' )
   #if( $target )
     #set ( $linkTarget = ' target="' + $target + '"' )
@@ -16,16 +16,16 @@
   #end
   #if ( $img )
     #if ( $position == "left" )
-      <a href="$href"$linkClass$linkTarget$linkTitle>#image($img $alt $border $width
$height)$name</a>
+      <a href="$href"$linkClass$linkTarget$linkTitle>#image($img $alt $border $width
$height $title)$name</a>
     #else
-      <a href="$href"$linkClass$linkTarget$linkTitle>$name #image($img $alt $border
$width $height)</a>
+      <a href="$href"$linkClass$linkTarget$linkTitle>$name #image($img $alt $border
$width $height $title)</a>
     #end
   #else
     <a href="$href"$linkClass$linkTarget$linkTitle>$name</a>
   #end
 #end
 ##
-#macro ( image $img $alt $border $width $height )
+#macro ( image $img $alt $border $width $height $title )
   #if( $img )
     #if ( ! ( $img.toLowerCase().startsWith("http:/") || $img.toLowerCase().startsWith("https:/")
||
             $img.toLowerCase().startsWith("ftp:/") || $img.toLowerCase().startsWith("mailto:")
||
@@ -56,7 +56,12 @@
     #else
       #set ( $imgHeight = "" )
     #end
-    <img class="imageLink"$imgSrc$imgAlt$imgBorder$imgWidth$imgHeight/>
+    #if( $title )
+      #set ( $imgTitle = ' title="' + $title + '"' )
+    #else
+      #set ( $imgTitle = "" )
+    #end
+    <img class="imageLink"$imgSrc$imgAlt$imgBorder$imgWidth$imgHeight$imgTitle/>
   #end
 #end
 #macro ( banner $banner $id )
@@ -90,7 +95,7 @@
         #else
             #set ( $alt = $banner.name )
         #end
-        <img src="$src" alt="$alt" />
+        <img src="$src" alt="$alt"#if( $banner.title ) title="$banner.title"#end />
     #else
         $banner.name
     #end
@@ -109,7 +114,7 @@
     #set ( $counter = $counter + 1 )
     #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
     #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) )
-    #link( $currentItemHref $item.name $item.target $item.img $item.position $item.alt $item.border
$item.width $item.height )
+    #link( $currentItemHref $item.name $item.target $item.img $item.position $item.alt $item.border
$item.width $item.height $item.title )
     #if ( $links.size() > $counter )
       |
     #end
@@ -124,7 +129,7 @@
       #set ( $currentItemHref = './' )
     #end
 ##
-      #link( $currentItemHref $item.name $item.target $item.img $item.position $item.alt
$item.border $item.width $item.height )
+      #link( $currentItemHref $item.name $item.target $item.img $item.position $item.alt
$item.border $item.width $item.height $item.title )
       &gt;
   #end
   $shortTitle
@@ -169,22 +174,22 @@
   #if ( $item.img )
     #if ( $item.position == "left" )
       #if ( $alignedFileName == $currentItemHref )
-        <strong>#image($item.img $item.alt $item.border $item.width $item.height) $item.name</strong>
+        <strong>#image($item.img $item.alt $item.border $item.width $item.height $item.title)
$item.name</strong>
       #else
-        #link($currentItemHref $item.name $item.target $item.img $item.position $item.alt
$item.border $item.width $item.height)
+        #link($currentItemHref $item.name $item.target $item.img $item.position $item.alt
$item.border $item.width $item.height $item.title)
       #end
     #else
       #if ( $alignedFileName == $currentItemHref )
-        <strong>$item.name #image($item.img $item.alt $item.border $item.width $item.height)</strong>
+        <strong>$item.name #image($item.img $item.alt $item.border $item.width $item.height
$item.title)</strong>
       #else
-        #link($currentItemHref $item.name $item.target $item.img $item.position $item.alt
$item.border $item.width $item.height)
+        #link($currentItemHref $item.name $item.target $item.img $item.position $item.alt
$item.border $item.width $item.height $item.title)
       #end
     #end
   #else
     #if ( $alignedFileName == $currentItemHref )
       <strong>$item.name</strong>
     #else
-      #link( $currentItemHref $item.name $item.target $item.img $item.position $item.alt
$item.border $item.width $item.height )
+      #link( $currentItemHref $item.name $item.target $item.img $item.position $item.alt
$item.border $item.width $item.height $item.title )
     #end
   #end
   #if ( $item && $item.items && $item.items.size() > 0 )
@@ -241,8 +246,13 @@
         #else
           #set ( $height = "" )
         #end
+        #if( $menu.title )
+          #set ( $title = ' title="' + $menu.title + '"' )
+        #else
+          #set ( $title = "" )
+        #end
 ##
-        #set ( $img = '<img class="imageLink"' + $src + $alt + $border + $width + $height
+ "/>" )
+        #set ( $img = '<img class="imageLink"' + $src + $alt + $border + $width + $height
+ $title + "/>" )
 ##
         #if ( $position == "left" )
         <h5>$img $menu.name</h5>
@@ -432,9 +442,14 @@
       #else
         #set ( $height = "" )
       #end
+      #if( $item.title )
+        #set ( $title = ' title="' + $item.title + '"' )
+      #else
+        #set ( $title = "" )
+      #end
 ##
       <a href="$href" title="$name" class="poweredBy">
-        <img class="poweredBy" $alt src="$img" $border $width $height />
+        <img class="poweredBy" $alt src="$img" $border $width $height $title />
       </a>
     #end
     #if( $poweredBy.isEmpty() )



Mime
View raw message