forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdupoiri...@apache.org
Subject svn commit: r328340 - in /forrest/trunk: main/webapp/skins/common/scripts/ whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/ whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/css/ whiteboard/plu...
Date Tue, 25 Oct 2005 11:50:03 GMT
Author: cdupoirieux
Date: Tue Oct 25 04:49:47 2005
New Revision: 328340

URL: http://svn.apache.org/viewcvs?rev=328340&view=rev
Log:
Improvement of the nav-section.ft for pelt which was - actually - not working at all ;)

Modified:
    forrest/trunk/main/webapp/skins/common/scripts/menu.js
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt.fv
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/css/pelt.screen.css
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/html/branding-theme-profiler.ft
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/html/nav-section.ft
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/html/siteinfo-credits.ft

Modified: forrest/trunk/main/webapp/skins/common/scripts/menu.js
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/skins/common/scripts/menu.js?rev=328340&r1=328339&r2=328340&view=diff
==============================================================================
--- forrest/trunk/main/webapp/skins/common/scripts/menu.js (original)
+++ forrest/trunk/main/webapp/skins/common/scripts/menu.js Tue Oct 25 04:49:47 2005
@@ -32,19 +32,17 @@
     var title = document.getElementById(obj+'Title');
 
     if(obj.indexOf("_selected_")==0&&el.style.display == ""){
-      //nicolaken: doesn't work :-(
-      //title.style.backgroundImage = "url('images/chapter_open.gif')";
       el.style.display = "block";
+      title.className = "pagegroupselected";
     }
 
-    if(el.style.display != "block"){ 
-      //nicolaken: doesn't work :-(
-      //title.style.backgroundImage = 'url([url]images/chapter_open.gif[/url])';
+    if(el.style.display != "block"){
       el.style.display = "block";
-    }else{
-      //nicolaken: doesn't work :-(
-      //title.style.backgroundImage = "url('images/chapter.gif')";
+      title.className = "pagegroupopen";
+    }
+    else{
       el.style.display = "none";
+      title.className = "pagegroup";
     }
   }// end -  if(document.getElementById) 
 }//end - function SwitchMenu(obj)

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt.fv
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt.fv?rev=328340&r1=328339&r2=328340&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt.fv
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt.fv
Tue Oct 25 04:49:47 2005
@@ -303,6 +303,10 @@
               <forrest:property name="nav-section" nugget="get.navigation">
                 <jx:import uri="cocoon://#{$cocoon/parameters/getRequest}.navigation.xml"/>
               </forrest:property>
+              <forrest:property name="nav-section-toc" nugget="get.tov">
+                <jx:import uri="cocoon://#{$cocoon/parameters/getRequest}.toc.xml"/>
+              </forrest:property>
+              <forrest:property name="toc" max-depth="2"/>
             </forrest:properties>
           </forrest:contract>
           <forrest:contract name="genericMarkup">

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/css/pelt.screen.css
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/css/pelt.screen.css?rev=328340&r1=328339&r2=328340&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/css/pelt.screen.css
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/css/pelt.screen.css
Tue Oct 25 04:49:47 2005
@@ -272,7 +272,7 @@
 #leftbar {
     position: relative;
     float: left;
-    width: 160px;
+    width: 180px;
     padding-top: 0px;
     top:-18px;
     left:10px;
@@ -305,12 +305,15 @@
 }
 .pagegroup span {
         background-image: url('images/chapter.gif');
+        color: white;
 }
 .pagegroupselected span {
         background-image: url('images/chapter_open.gif');
+        color: white;
 }
 .pagegroupopen span {
         background-image: url('images/chapter_open.gif');
+        color: white;
 }
 
 .pagegroupselected {
@@ -322,17 +325,17 @@
         display: block;
         cursor:pointer;
 }
-#leftbar .menuitemgroup {
+#nav-section .menuitemgroup {
         margin: 0px 0px 6px 8px;
         padding: 0px;
         font-weight : bold; }
 
-#leftbar .selectedmenuitemgroup{
+#nav-section .selectedmenuitemgroup{
         margin: 0px 0px 6px 8px;
         padding: 0px;
         font-weight : bold; }
 
-#leftbar .menuitem {
+#nav-section .menuitem {
         padding: 0px 0px 2px 12px;
         background-image: url('images/page.gif');
         background-repeat: no-repeat;
@@ -341,7 +344,7 @@
         margin-left: 10px;
 }
 
-#leftbar .menupage {
+#nav-section .menupage {
         margin: 5px 0px 5px 10px;
         padding: 0px 3px 0px 12px;
         background-image: url('images/current.gif');
@@ -349,14 +352,15 @@
         background-position: top left;
         font-style : normal;
 }
-#leftbar .menupagetitle {
+#nav-section .menupagetitle {
         padding: 0px 0px 0px 6px;
         font-style : normal;
         border-style: solid;
         border-width: 1px;
         margin-right: 10px;
 }
-#leftbar .menupageitemgroup {
+
+#nav-section .menupageitemgroup {
         padding: 3px 0px 4px 6px;
         font-style : normal;
         border-bottom: 1px solid ;
@@ -364,7 +368,7 @@
         border-right: 1px solid ;
         margin-right: 10px;
 }
-#leftbar .menupageitem {
+#nav-section .menupageitem {
         font-style : normal;
         font-weight : normal;
         border-width: 0px;
@@ -390,7 +394,7 @@
 }
 
 #content {
-    padding: 20px 20px 20px 180px;
+    padding: 20px 20px 20px 200px;
     margin: 0;
     font : small Verdana, Helvetica, sans-serif;
     font-size : 80%;

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/html/branding-theme-profiler.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/html/branding-theme-profiler.ft?rev=328340&r1=328339&r2=328340&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/html/branding-theme-profiler.ft
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/html/branding-theme-profiler.ft
Tue Oct 25 04:49:47 2005
@@ -202,8 +202,8 @@
 
 <xsl:template match="color[@name='border']">
 #leftbar           { border-color: <xsl:value-of select="@value"/>;}
-#leftbar .menupagetitle  { border-color: <xsl:value-of select="@value"/>;}
-#leftbar .menupageitemgroup  { border-color: <xsl:value-of select="@value"/>;}
+#nav-section .menupagetitle  { border-color: <xsl:value-of select="@value"/>;}
+#nav-section .menupageitemgroup  { border-color: <xsl:value-of select="@value"/>;}
 </xsl:template> 
 
 <xsl:template match="color[@name='menu']">
@@ -216,16 +216,16 @@
 color: <xsl:value-of select="@hlink"/>;} 
 </xsl:template> 
 <xsl:template match="color[@name='dialog']"> 
-#leftbar .menupagetitle  { color: <xsl:value-of select="@font"/>;}    
-#leftbar .menupageitemgroup     { 
+#nav-section .menupagetitle  { color: <xsl:value-of select="@font"/>;}    
+#nav-section .menupageitemgroup     { 
 background-color: <xsl:value-of select="@value"/>;
 }
-#leftbar .menupageitem {
+#nav-section .menupageitem {
 color: <xsl:value-of select="@font"/>;
 } 
-#leftbar .menupageitem a:link {  color: <xsl:value-of select="@link"/>;} 
-#leftbar .menupageitem a:visited {  color: <xsl:value-of select="@vlink"/>;} 
-#leftbar .menupageitem a:hover {  
+#nav-section .menupageitem a:link {  color: <xsl:value-of select="@link"/>;} 
+#nav-section .menupageitem a:visited {  color: <xsl:value-of select="@vlink"/>;} 
+#nav-section .menupageitem a:hover {  
 background-color: <xsl:value-of select="@value"/>;
 color: <xsl:value-of select="@hlink"/>;
 }

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/html/nav-section.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/html/nav-section.ft?rev=328340&r1=328339&r2=328340&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/html/nav-section.ft
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/html/nav-section.ft
Tue Oct 25 04:49:47 2005
@@ -18,13 +18,27 @@
 <forrest:contract name="nav-section" type="nugget"
   xmlns:forrest="http://apache.org/forrest/templates/1.0">
   <description>
-    nav-section will output the navigation to pages within the current site section AKA menu
+    <p>
+      <strong>nav-section</strong> will output the navigation to pages within
the current site section AKA menu.
+    </p>
+    <div class="note">
+      <div class="label">Minitoc inclusion</div>
+      <div class="content">
+        <p><code>&lt;toc&gt;</code> argument can be used to specify
the minitoc depth.<br>
+        This argument is facultative and no minitoc will be displayed if it is omitted.
+        </p>
+      </div>
+    </div>
   </description>
   <usage><![CDATA[<forrest:contract name="nav-section">
   <forrest:properties contract="nav-section">
     <forrest:property name="nav-section" nugget="get.navigation">
       <jx:import uri="cocoon://#{$cocoon/parameters/getRequest}.navigation.xml"/>
     </forrest:property>
+    <forrest:property name="nav-section-toc" nugget="get.tov">
+      <jx:import uri="cocoon://#{$cocoon/parameters/getRequest}.toc.xml"/>
+    </forrest:property>
+    [<forrest:property name="toc" max-depth="2"/>]
   </forrest:properties>
 </forrest:contract>]]></usage>
   <forrest:template
@@ -32,101 +46,119 @@
   format="html" name="nav-section" inputFormat="xsl" body="true" head="true">
 
     <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-		  <xsl:template name="nav-section-head">
-		      <script type="text/javascript" language="javascript" 
-			        src="{$root}skin/menu.js">&#160;</script>
-		  </xsl:template>
-      
-		  <xsl:template name="nav-section-body">
+      <xsl:template name="nav-section-head">
+          <script type="text/javascript" language="javascript"
+              src="{$root}skin/menu.js">&#160;</script>
+      </xsl:template>
+
+      <xsl:template name="nav-section-body">
         <xsl:param name="nav-section" select="'test'"/>
+        <xsl:param name="nav-section-toc" select="'test'"/>
+        <xsl:param name="toc" select="'noToc'"/>
 <xsl:comment>+
     |start menu
     +</xsl:comment>
-            <xsl:if test="$nav-section/navigation/menu/div[@id='menu']/ul/li">
-              <xsl:call-template name="menu">
-                <xsl:with-param name="root" select="$nav-section/navigation/menu"/>
-              </xsl:call-template>
-            </xsl:if>
+        <xsl:variable name="max-depth">
+          <xsl:choose>
+            <xsl:when test="$toc = 'noToc'">0</xsl:when>
+            <xsl:otherwise><xsl:value-of select="$toc/@max-depth"/></xsl:otherwise>
+          </xsl:choose>
+        </xsl:variable>
+        <xsl:if test="$nav-section/navigation/menu/div[@id='menu']/ul/li">
+          <xsl:call-template name="menu">
+            <xsl:with-param name="root" select="$nav-section/navigation/menu"/>
+            <xsl:with-param name="nav-section-toc" select="$nav-section-toc"/>
+            <xsl:with-param name="max-depth" select="$max-depth"/>
+          </xsl:call-template>
+        </xsl:if>
 <xsl:comment>+
     |end menu
     +</xsl:comment>
-		  </xsl:template>
+      </xsl:template>
       <xsl:template name="menu">
         <xsl:param name="root" value="'test'"/>
+        <xsl:param name="nav-section-toc" value="'test'"/>
+        <xsl:param name="max-depth" value="0"/>
 <xsl:comment>+
     |start Menu
     +</xsl:comment>
-   	<div id="nav-section">
-			<ul>
-<!--menu - inner-->	
-        <xsl:for-each select = "$root/div[@id='menu']/ul/li">
-          <xsl:call-template name = "innermenuli" >
-              <xsl:with-param name="id" select="concat('1.', position())"/>
-          </xsl:call-template>
-        </xsl:for-each>
-			</ul>
-		</div>
-	</xsl:template>  
-  
-  <xsl:template name="innermenuli">   
-    <xsl:param name="id"/>
-    <xsl:variable name="tagid">
-      <xsl:choose>
-        <xsl:when test="descendant-or-self::node()/li/div/@class='current'"><xsl:value-of
select="concat('menu_selected_',$id)"/></xsl:when>
-        <xsl:otherwise><xsl:value-of select="concat('menu_',concat(font,$id))"/></xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:variable name="whichGroup">
-      <xsl:choose>
-        <xsl:when test="descendant-or-self::node()/li/div/@class='current'">selectedmenuitemgroup</xsl:when>
-        <xsl:otherwise>menuitemgroup</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <li class="pagegroup" id="{$tagid}Title"><span onclick="SwitchMenu('{$tagid}',
'{$root}skin/')"><xsl:value-of select="h1"/></span>
-      <ul class="{$whichGroup}" id="{$tagid}">
-        <xsl:for-each select= "ul/li">
+        <div id="nav-section">
+          <ul>
+<!--menu - inner-->
+            <xsl:for-each select = "$root/div[@id='menu']/ul/li">
+              <xsl:call-template name = "innermenuli" >
+                <xsl:with-param name="id" select="concat('1.', position())"/>
+                <xsl:with-param name="nav-section-toc" select="$nav-section-toc"/>
+                <xsl:with-param name="max-depth" select="$max-depth"/>
+              </xsl:call-template>
+            </xsl:for-each>
+          </ul>
+        </div>
+      </xsl:template>
 
+      <xsl:template name="innermenuli">
+        <xsl:param name="id"/>
+        <xsl:param name="nav-section-toc"/>
+        <xsl:param name="max-depth"/>
+        <xsl:variable name="tagid">
           <xsl:choose>
-            <xsl:when test="a">
-              <li class="menuitem"><a href="{a/@href}" title="{a/@title}"><xsl:value-of
select="a" /></a></li>
-            </xsl:when>
-            <xsl:when test="div/@class='current'">
-              <li class="menupage">
-                <div class="menupagetitle"><xsl:value-of select="div" /></div>
-                <xsl:if test="$config/toc/@max-depth&gt;0 and contains($minitoc-location,'menu')">
-                  <ul>
-                    <li class="menupageitemgroup">
-                      <xsl:for-each select = "//tocitems/tocitem">
-                        <div class="menupageitem">
-                          <xsl:choose>
-                            <xsl:when test="string-length(normalize-space(@title))>15">
-                              <a href="{@href}" title="{normalize-space(@title)}"><xsl:value-of

-                                select="substring(@title,0,20)" />...</a>
-                            </xsl:when>
-                            <xsl:otherwise>
-                              <a href="{@href}" title="{normalize-space(@title)}">
-                                <xsl:value-of select="@title" />
-                              </a>
-                            </xsl:otherwise>
-                          </xsl:choose>
-                        </div>
-                      </xsl:for-each>
-                    </li>
-                  </ul>
-                </xsl:if>
-              </li>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:call-template name = "innermenuli">
-                 <xsl:with-param name="id" select="concat($id, '.', position())"/>
-              </xsl:call-template>
-            </xsl:otherwise>
+            <xsl:when test="descendant-or-self::node()/li/div/@class='current'"><xsl:value-of
select="concat('menu_selected_',$id)"/></xsl:when>
+            <xsl:otherwise><xsl:value-of select="concat('menu_',concat(font,$id))"/></xsl:otherwise>
           </xsl:choose>
+        </xsl:variable>
+        <xsl:variable name="selected">
+          <xsl:choose>
+            <xsl:when test="descendant-or-self::node()/li/div/@class='current'">selected</xsl:when>
+            <xsl:otherwise></xsl:otherwise>
+          </xsl:choose>
+        </xsl:variable>
+        <li class="pagegroup{$selected}" id="{$tagid}Title"><span onclick="SwitchMenu('{$tagid}')"><xsl:value-of
select="h1"/></span>
+          <ul class="{$selected}menuitemgroup" id="{$tagid}">
+            <xsl:for-each select= "ul/li">
+
+              <xsl:choose>
+                <xsl:when test="a">
+                  <li class="menuitem"><a href="{a/@href}" title="{a/@title}"><xsl:value-of
select="a" /></a></li>
+                </xsl:when>
+                <xsl:when test="div/@class='current'">
+                  <li class="menupage">
+                    <div class="menupagetitle"><xsl:value-of select="div" /></div>
+                    <xsl:if test="$max-depth&gt;0">
+                      <ul>
+                        <li class="menupageitemgroup">
+                          <xsl:for-each select = "$nav-section-toc//tocitems/tocitem">
+                            <div class="menupageitem">
+                              <xsl:choose>
+                                <xsl:when test="string-length(normalize-space(@title))>15">
+                                  <a href="{@href}" title="{normalize-space(@title)}"><xsl:value-of
+                                    select="substring(@title,0,20)" />...</a>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                  <a href="{@href}" title="{normalize-space(@title)}">
+                                    <xsl:value-of select="@title" />
+                                  </a>
+                                </xsl:otherwise>
+                              </xsl:choose>
+                            </div>
+                          </xsl:for-each>
+                        </li>
+                      </ul>
+                    </xsl:if>
+                  </li>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:call-template name = "innermenuli">
+                     <xsl:with-param name="id" select="concat($id, '.', position())"/>
+                     <xsl:with-param name="nav-section-toc" select="$nav-section-toc"/>
+                     <xsl:with-param name="max-depth" select="$max-depth"/>
+                  </xsl:call-template>
+                </xsl:otherwise>
+              </xsl:choose>
 
-        </xsl:for-each>
-      </ul></li>
-      <script>SwitchMenu('<xsl:value-of select="$tagid"/>', '<xsl:value-of
select="$root"/>skin/')</script>
-  		</xsl:template>
-		</xsl:stylesheet>
-	</forrest:template>
+            </xsl:for-each>
+          </ul>
+        </li>
+      </xsl:template>
+    </xsl:stylesheet>
+  </forrest:template>
 </forrest:contract>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/html/siteinfo-credits.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/html/siteinfo-credits.ft?rev=328340&r1=328339&r2=328340&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/html/siteinfo-credits.ft
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/html/siteinfo-credits.ft
Tue Oct 25 04:49:47 2005
@@ -56,6 +56,9 @@
             </xsl:if>
             <xsl:for-each 
               select="$siteinfo-credits/credits/credit[starts-with( $filename, concat( @role,
'.') )]">
+              <xsl:if test="not( position()=1 )">
+                <br/>
+              </xsl:if>
               <xsl:variable name="name" select="name"/>
               <xsl:variable name="url" select="url"/>
               <xsl:variable name="image" select="image"/>



Mime
View raw message