[Zope-Checkins] (for Philipp von Weitershausen) CVS:
Zope3/src/zope/app/browser/skins/rotterdam
- navigation_macros.pt:1.1 configure.zcml:1.18 standardmacros.py:1.3
template.pt:1.43
Ken Manheimer
klm at zope.com
Sat Dec 6 12:36:06 EST 2003
(This is the other one, besides my correction of the traffic table
which i'm not going to bother redirecting. klm.)
From: Philipp von Weitershausen <cvs-admin at zope.org>
Subject: CVS: Zope3/src/zope/app/browser/skins/rotterdam - navigation_macros.pt:1.1 configure.zcml:1.18 standardmacros.py:1.3 template.pt:1.43
Date: Sat, 6 Dec 2003 12:04:03 -0500
Update of /cvs-repository/Zope3/src/zope/app/browser/skins/rotterdam
In directory cvs.zope.org:/tmp/cvs-serv2934/rotterdam
Modified Files:
configure.zcml standardmacros.py template.pt
Added Files:
navigation_macros.pt
Log Message:
Separated the XML Javascript tree out into its own template and macros.
This clears the way for your own navigation trees, for example static ones
(e.g. using my soon-to-be-publicly-released statictree product).
Also, made the tree work for the ZopeTop skin again. Rotterdam and ZopeTop
share the same code now, so code duplication was reduced.
=== Added File Zope3/src/zope/app/browser/skins/rotterdam/navigation_macros.pt ===
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
i18n:domain="zope">
<body>
<!-- Java scripts for the navigation tree -->
<metal:tree define-macro="navigation_tree_js">
<!-- Ugly is better than lobotomized. -->
<script type="text/javascript" src="xmltree.js"
tal:attributes="src string:${context/++resource++xmltree.js}" >
</script>
<tal:var define="rooturl request/getApplicationURL;
thisbaseurl request/URL/-1;
global body_onload string:loadtree('${rooturl}/', '${thisbaseurl}/');" />
</metal:tree>
<!-- Box containing the actual navigation tree-->
<metal:tree define-macro="navigation_tree_box">
<!-- Ugly is better than lobotomized. -->
<div class="box" id="navigationTree">
<h4 i18n:translate="">Navigation</h4>
<div xmlns="http://www.zope.org/zope3xmltree"
id="navtreecontents"
class="body"
onclick="treeclicked(event);"
i18n:translate="">Loading...</div>
</div>
</metal:tree>
</body>
</html>
=== Zope3/src/zope/app/browser/skins/rotterdam/configure.zcml 1.17 => 1.18 ===
--- Zope3/src/zope/app/browser/skins/rotterdam/configure.zcml:1.17 Fri Nov 21 12:10:23 2003
+++ Zope3/src/zope/app/browser/skins/rotterdam/configure.zcml Sat Dec 6 12:03:32 2003
@@ -78,7 +78,15 @@
permission="zope.View"
layer="rotterdam"
template="dialog_macros.pt" />
-
+
+ <browser:page
+ for="*"
+ name="navigation_macros"
+ permission="zope.View"
+ layer="rotterdam"
+ template="navigation_macros.pt"
+ />
+
<browser:page
permission="zope.Public"
allowed_interface="zope.app.interfaces.browser.form.IBrowserWidget"
=== Zope3/src/zope/app/browser/skins/rotterdam/standardmacros.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/skins/rotterdam/standardmacros.py:1.2 Fri Jun 6 17:35:18 2003
+++ Zope3/src/zope/app/browser/skins/rotterdam/standardmacros.py Sat Dec 6 12:03:32 2003
@@ -19,4 +19,5 @@
BaseMacros = StandardMacros
class StandardMacros(BaseMacros):
- macro_pages = ('skin_macros', 'view_macros', 'dialog_macros')
+ macro_pages = ('skin_macros', 'view_macros', 'dialog_macros',
+ 'navigation_macros')
=== Zope3/src/zope/app/browser/skins/rotterdam/template.pt 1.42 => 1.43 ===
--- Zope3/src/zope/app/browser/skins/rotterdam/template.pt:1.42 Thu Oct 16 06:15:45 2003
+++ Zope3/src/zope/app/browser/skins/rotterdam/template.pt Sat Dec 6 12:03:32 2003
@@ -8,12 +8,8 @@
<head>
<title metal:define-slot="title" i18n:translate="">Z3 UI</title>
-
- <style type="text/css"
- media="all"
- tal:content=
- "string: @import url(${context/++resource++zope3.css});"
- >
+ <style type="text/css" media="all"
+ tal:content="string:@import url(${context/++resource++zope3.css});">
@import url(zope3.css);
</style>
@@ -24,25 +20,18 @@
<metal:block define-slot="style_slot" />
<metal:block define-slot="ecmascript_slot" />
- <!-- Ugly is better than lobotomized. -->
- <script type="text/javascript" src="xmltree.js"
- tal:attributes="src string:${context/++resource++xmltree.js}" >
- </script>
-
<!-- Popup sript for the OnlineHelp -->
<script type="text/javascript" src="onlinehelp.js"
tal:attributes="src string:${context/++resource++onlinehelp.js}" >
</script>
+ <metal:tree use-macro="context/@@standard_macros/navigation_tree_js" />
+
<link rel="icon" type="image/png"
tal:attributes="href context/++resource++favicon.png" />
</head>
- <body onload="loadtree('');"
- tal:define="rooturl request/getApplicationURL;
- thisbaseurl request/URL/-1;"
- tal:attributes="
- onload string:loadtree('${rooturl}/', '${thisbaseurl}/');">
+ <body onload="" tal:attributes="onload body_onload">
<div id="global">
<div id="userDetails">
@@ -61,25 +50,15 @@
tal:attributes="href string:@@login.html?nextURL=${request/URL}"
tal:condition="python: not hasattr(view.request.user, 'getLogin')"
i18n:translate="">
- [Login]</a>
+ [Login]</a>
</div>
<img tal:attributes="src context/++resource++zope3logo.gif" />
</div>
<div id="navigators">
- <!-- Ugly is better than lobotomized. -->
- <div class="box" id="navigationTree">
- <h4 i18n:translate="">Navigation</h4>
- <div
- xmlns="http://www.zope.org/zope3xmltree"
- id="navtreecontents"
- class="body"
- onclick="treeclicked(event);"
- i18n:translate=""
- >Loading...
- </div>
- </div>
+ <!-- Navigation tree box -->
+ <metal:tree use-macro="context/@@standard_macros/navigation_tree_box" />
<div class="box" id="commonTasks"
tal:define="view context/@@commonTasks|nothing"
@@ -109,21 +88,21 @@
<div id="workspace">
<div id="breadcrumbs"
- metal:define-macro="breadcrumbs"
- > <div tal:omit-tag="" i18n:translate="">Location: </div><tal:block
- repeat="breadcrumb context/@@absolute_url/breadcrumbs"
- ><a href=""
+ metal:define-macro="breadcrumbs">
+ <div tal:omit-tag="" i18n:translate="">Location: </div><tal:block
+ repeat="breadcrumb context/@@absolute_url/breadcrumbs">
+ <a href=""
tal:condition="repeat/breadcrumb/start"
tal:attributes="
href string:${breadcrumb/url}/@@SelectedManagementView.html"
- i18n:translate=""
- >[top]</a
- ><a href=""
- tal:condition="not:repeat/breadcrumb/start"
- tal:content="string:${breadcrumb/name}"
- tal:attributes="
- href string:${breadcrumb/url}/@@SelectedManagementView.html"
- >breadcrumb item</a> / </tal:block>
+ i18n:translate="">[top]
+ </a>
+ <a href=""
+ tal:condition="not:repeat/breadcrumb/start"
+ tal:content="string:${breadcrumb/name}"
+ tal:attributes="
+ href string:${breadcrumb/url}/@@SelectedManagementView.html">
+ breadcrumb item</a> / </tal:block>
</div>
<div class="itemViews"
More information about the Zope-Checkins
mailing list