You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by th...@apache.org on 2004/09/10 18:45:05 UTC
svn commit: rev 43676 - in forrest/trunk: . src/core/context/skins/common/scripts src/core/context/skins/pelt/xslt/html
Author: thorsten
Date: Fri Sep 10 09:45:04 2004
New Revision: 43676
Added:
forrest/trunk/src/core/context/skins/common/scripts/getMenu.js
Modified:
forrest/trunk/src/core/context/skins/pelt/xslt/html/site2xhtml.xsl
forrest/trunk/status.xml
Log:
Finished the pelt skin by resolving the chapter image issue with the new getMenu.js
Added: forrest/trunk/src/core/context/skins/common/scripts/getMenu.js
==============================================================================
--- (empty file)
+++ forrest/trunk/src/core/context/skins/common/scripts/getMenu.js Fri Sep 10 09:45:04 2004
@@ -0,0 +1,44 @@
+/*
+* Copyright 2002-2004 The Apache Software Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+/**
+ * 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>
+ */
+
+if (document.getElementById){
+ document.write('<style type="text/css">.menuitemgroup{display: none;}</style>')
+}
+
+
+function SwitchMenu(obj, thePath)
+{
+var open = 'url("'+thePath + 'images/chapter_open.gif")';
+var close = 'url("'+thePath + 'images/chapter.gif")';
+ if(document.getElementById) {
+ var el = document.getElementById(obj);
+ var title = document.getElementById(obj+'Title');
+
+ if(el.style.display != "block"){
+ title.style.backgroundImage = open;
+ el.style.display = "block";
+ }else{
+ title.style.backgroundImage = close;
+ el.style.display = "none";
+ }
+ }// end - if(document.getElementById)
+}//end - function SwitchMenu(obj)
Modified: forrest/trunk/src/core/context/skins/pelt/xslt/html/site2xhtml.xsl
==============================================================================
--- forrest/trunk/src/core/context/skins/pelt/xslt/html/site2xhtml.xsl (original)
+++ forrest/trunk/src/core/context/skins/pelt/xslt/html/site2xhtml.xsl Fri Sep 10 09:45:04 2004
@@ -73,7 +73,7 @@
<script type="text/javascript" language="javascript"
src="{$root}skin/getBlank.js"></script>
<script type="text/javascript" language="javascript"
- src="{$root}skin/menu.js"></script>
+ src="{$root}skin/getMenu.js"></script>
<script type="text/javascript" language="javascript"
src="{$root}skin/fontsize.js"></script>
<!--+
@@ -422,8 +422,27 @@
</xsl:variable>
- <div class="menutitle" id="{$tagid}Title" onclick="SwitchMenu('{$tagid}')"><xsl:value-of select="h1"/></div>
+ <!-- <div class="menutitle" id="{$tagid}Title"
+ onclick="SwitchMenu('{$tagid}', '{$tagid}Title', '{$root}skin/')">
+ <xsl:value-of select="h1"/>
+ </div>-->
+ <div class="menutitle" id="{$tagid}Title"
+ onclick="SwitchMenu('{$tagid}', '{$root}skin/')">
+ <xsl:if test="contains($tagid, '_selected_')" >
+ <xsl:attribute name="style">
+ <xsl:text>background-image: url('</xsl:text>
+ <xsl:value-of select="$root"/>
+ <xsl:text>skin/images/chapter_open.gif');</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="h1"/>
+ </div>
<div class="{$whichGroup}" id="{$tagid}">
+ <xsl:if test="contains($tagid, '_selected_')" >
+ <xsl:attribute name="style">
+ <xsl:text>display: block;</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
<xsl:for-each select= "ul/li">
<xsl:choose>
Modified: forrest/trunk/status.xml
==============================================================================
--- forrest/trunk/status.xml (original)
+++ forrest/trunk/status.xml Fri Sep 10 09:45:04 2004
@@ -49,6 +49,19 @@
Added new document to facilitate
<link href="site:upgrading_06">upgrading to v0.6</link>
</action>
+ <action context="skins" dev="TS" type="fix">
+ Fixed the domain bug of the searchbox in pelt.
+ </action>
+ <action context="skins" dev="TS" type="fix">
+ Fixed the menu in pelt by adding getMenu.js and changing the site2xhtml.xsl.
+ Now the chapter image will get expand again.
+ </action>
+ <action context="skins" dev="TS" type="add">
+ getMenu.js - fixes a path issue and the double click behaviour of pelt.
+ </action>
+ <action context="core" dev="TS" type="add">
+ Explained the usage of the extra-css element in skinconf.xml of the fresh site.
+ </action>
<action dev="DC" type="add" context="core" due-to="Fabio Rinaldi" fixes-bug="FOR-268">
Initial Chaperon grammar for minimal MoinMoin Wiki to Forrest xdocs
transformation. Source documents use the *.moinwiki filename extension.