forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nicola...@apache.org
Subject cvs commit: xml-forrest/src/resources/skins/krysalis-site/xslt/html site2xhtml.xsl
Date Tue, 22 Jul 2003 15:49:21 GMT
nicolaken    2003/07/22 08:49:21

  Modified:    src/resources/skins/krysalis-site/css page.css
               src/resources/skins/krysalis-site/xslt/html site2xhtml.xsl
  Added:       src/resources/skins/krysalis-site/scripts menu.js
  Log:
        <action dev="NKB" type="add" context="skin">
          Now the Krysalis skin has javascript-collapsable menus.
        </action>
  
  Revision  Changes    Path
  1.1                  xml-forrest/src/resources/skins/krysalis-site/scripts/menu.js
  
  Index: menu.js
  ===================================================================
  /*
  
   ============================================================================
                     The Apache Software License, Version 1.1
   ============================================================================
  
   Copyright (C) @skinconfig.year@ The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
  
   1. Redistributions of  source code must  retain the above copyright  notice,
      this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
  
   3. The end-user documentation included with the redistribution, if any, must
      include  the following  acknowledgment:  "This product includes  software
      developed  by the  Apache Software Foundation  (http://www.apache.org/)."
      Alternately, this  acknowledgment may  appear in the software itself,  if
      and wherever such third-party acknowledgments normally appear.
  
   4. The names "Apache Forrest" and "Apache Software Foundation"
      must not be used to endorse or promote products derived from this  software
      without  prior written permission. For written permission, please contact
      apache@apache.org.
  
   5. Products  derived from this software may not  be called "Apache", nor may
      "Apache" appear  in their name,  without prior written permission  of the
      Apache Software Foundation.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation. For more  information on the
   Apache Software Foundation, please see <http://www.apache.org/>.
  
  */
  
  /**
   * This script, when included in a html file, can be used to make collapsible menus
   *
   * Typical usage:
   * <script type="text/javascript" language="JavaScript" src="menu.js"></script>
   *
   *@author     <a href="mailto:nicolaken@apache.org">Nicola Ken Barozzi</a>
   *@created    July 21, 2003
   *@version    1.0
   */
  
  if (document.getElementById){ 
    document.write('<style type="text/css">.menuitemgroup{display: none;}</style>')
  }
  
  function SwitchMenu(obj)
  {
    if(document.getElementById)  {
      var el = document.getElementById(obj);
  
      if(obj=="selected"&&el.style.display == ""){
        el.style.display = "block";
      }
  
      if(el.style.display != "block"){ 
        el.style.display = "block";
      }else{
        el.style.display = "none";
      }
    }// end -  if(document.getElementById) 
  }//end - function SwitchMenu(obj)
  
  
  
  1.14      +6 -0      xml-forrest/src/resources/skins/krysalis-site/css/page.css
  
  Index: page.css
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/krysalis-site/css/page.css,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- page.css	23 May 2003 01:22:55 -0000	1.13
  +++ page.css	22 Jul 2003 15:49:20 -0000	1.14
  @@ -30,7 +30,9 @@
           font-size : 70%;
   }
   
  +
   .menutitle { 
  +        cursor:pointer;
           padding: 0px 3px 5px 10px;  
           background-image: url('images/chapter_open.gif');
           background-repeat: no-repeat;
  @@ -42,6 +44,10 @@
           padding: 0px;  
           font-weight : bold; }
           
  +.menu .selectedmenuitemgroup{ 
  +        margin: 0px 0px 6px 8px; 
  +        padding: 0px;  
  +        font-weight : bold; }
           
   .menu .menuitem { 
           padding: 0px 0px 2px 10px;  
  
  
  
  1.17      +18 -3     xml-forrest/src/resources/skins/krysalis-site/xslt/html/site2xhtml.xsl
  
  Index: site2xhtml.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/krysalis-site/xslt/html/site2xhtml.xsl,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- site2xhtml.xsl	12 Jun 2003 13:25:00 -0000	1.16
  +++ site2xhtml.xsl	22 Jul 2003 15:49:20 -0000	1.17
  @@ -35,6 +35,7 @@
           <title><xsl:value-of select="div[@class='content']/table/tr/td/h1"/></title>
           <link rel="stylesheet" href="{$root}skin/page.css" type="text/css"/>
           <script type="text/javascript" language="javascript" src="{$root}skin/fontsize.js"></script>
  +        <script type="text/javascript" language="javascript" src="{$root}skin/menu.js"></script>
         </head>
         <body bgcolor="#FFFFFF" text="#000000" onload="init()">
           <script type="text/javascript">ndeSetTextSize();</script>
  @@ -357,8 +358,22 @@
   
   
     <xsl:template name="innermenuli">
  -    <div class="menutitle"><xsl:value-of select="font"/></div>
  -      <div class="menuitemgroup">
  +    <xsl:variable name="tagid">
  +      <xsl:choose>
  +    	<xsl:when test="descendant-or-self::node()/li/span/@class='sel'">selected</xsl:when>
  +       	<xsl:otherwise><xsl:value-of select="font"/></xsl:otherwise>
  +      </xsl:choose>
  +    </xsl:variable>
  +    <xsl:variable name="whichGroup">
  +      <xsl:choose>
  +    	<xsl:when test="descendant-or-self::node()/li/span/@class='sel'">selectedmenuitemgroup</xsl:when>
  +       	<xsl:otherwise>menuitemgroup</xsl:otherwise>
  +      </xsl:choose>
  +    </xsl:variable>
  +    
  +    
  +    <div class="menutitle" onclick="SwitchMenu('{$tagid}')"><xsl:value-of select="font"/></div>
  +      <div class="{$whichGroup}" id="{$tagid}">
           <xsl:for-each select= "ul/li">
   
             <xsl:choose>
  
  
  

Mime
View raw message