[Zope3-checkins] SVN: Zope3/branches/roger-bostonskin/src/zope/app/boston/ Implemented base viewlets for boston skin

Roger Ineichen roger at projekt01.ch
Fri Oct 7 09:41:41 EDT 2005


Log message for revision 38883:
  Implemented base viewlets for boston skin

Changed:
  U   Zope3/branches/roger-bostonskin/src/zope/app/boston/browser/__init__.py
  U   Zope3/branches/roger-bostonskin/src/zope/app/boston/browser/configure.zcml
  U   Zope3/branches/roger-bostonskin/src/zope/app/boston/browser/template.pt
  U   Zope3/branches/roger-bostonskin/src/zope/app/boston/configure.zcml
  U   Zope3/branches/roger-bostonskin/src/zope/app/boston/regions/__init__.py
  U   Zope3/branches/roger-bostonskin/src/zope/app/boston/regions/configure.zcml
  U   Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/__init__.py
  U   Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/configure.zcml
  D   Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/css.pt
  D   Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/css.zcml
  U   Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/head.pt
  U   Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/head.zcml
  D   Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/javascript.pt
  D   Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/javascript.zcml
  A   Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/
  A   Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/__init__.py
  A   Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/
  A   Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/__init__.py
  A   Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/configure.zcml.sample
  A   Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/divmenu.js
  A   Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbar.css
  A   Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbar.pt
  A   Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbarArrow.gif
  A   Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbarArrowOver.gif
  A   Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbarGrip.gif
  A   Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbar_layout.pt
  A   Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/configure.zcml
  U   Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar.zcml

-=-
Modified: Zope3/branches/roger-bostonskin/src/zope/app/boston/browser/__init__.py
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/browser/__init__.py	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/browser/__init__.py	2005-10-07 13:41:40 UTC (rev 38883)
@@ -15,3 +15,12 @@
 
 $Id$
 """
+
+from zope.viewlet import viewlet
+
+
+BostonJavascriptViewlet = viewlet.JavaScriptViewlet('boston.js')
+
+BostonSkinCSSViewlet = viewlet.CSSViewlet('skin.css', 'all')
+
+BostonWidgetCSSViewlet = viewlet.CSSViewlet('widget.css', 'all')

Modified: Zope3/branches/roger-bostonskin/src/zope/app/boston/browser/configure.zcml
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/browser/configure.zcml	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/browser/configure.zcml	2005-10-07 13:41:40 UTC (rev 38883)
@@ -1,49 +1,79 @@
 <configure
-    xmlns="http://namespaces.zope.org/zope"
-    xmlns:browser="http://namespaces.zope.org/browser">
+    xmlns:zope="http://namespaces.zope.org/zope"
+    xmlns="http://namespaces.zope.org/browser">
 
-  <browser:layer 
+  <layer 
       name="boston"
       interface="zope.app.boston.boston"
       />  
 
-  <browser:skin 
+  <skin 
       name="Boston"
       interface="zope.app.boston.Boston"
       />
 
-  <browser:resource 
+  <resource 
       name="boston.js"
       file="boston.js"
       layer="zope.app.boston.boston"
       />
 
-  <browser:resource 
+  <resource 
       name="skin.css"
       file="skin.css"
       layer="zope.app.boston.boston"
       />
 
-  <browser:resource 
+  <resource 
       name="widget.css"
       file="widget.css"
       layer="zope.app.boston.boston"
       />
 
+  <viewlet
+      name="boston.js"
+      for="*"
+      region="zope.app.boston.regions.IJavaScript"
+      permission="zope.Public"
+      class=".BostonJavascriptViewlet"
+      layer="zope.app.boston.boston"
+      weight="1"
+      />
+
+  <viewlet
+      name="skin.css"
+      for="*"
+      region="zope.app.boston.regions.ICSS"
+      permission="zope.Public"
+      class=".BostonSkinCSSViewlet"
+      layer="zope.app.boston.boston"
+      weight="0"
+      />
+
+  <viewlet
+      name="widget.css"
+      for="*"
+      region="zope.app.boston.regions.ICSS"
+      permission="zope.Public"
+      class=".BostonWidgetCSSViewlet"
+      layer="zope.app.boston.boston"
+      weight="1"
+      />
+
   <!-- layout img -->
-  <browser:resource
+  <resource
       name="favicon.png"
       file="img/favicon.png"
       layer="zope.app.boston.boston"
       />
 
-  <browser:resource 
+  <resource 
       name="logo.gif"
       file="img/zopelogo.gif"
       layer="zope.app.boston.boston"
       />
 
-  <browser:page
+  <page
       for="*"
       name="standard_macros"
       permission="zope.View"
@@ -52,7 +82,7 @@
       layer="zope.app.boston.boston" 
       />
 
-  <browser:page 
+  <page 
       for="*"
       name="skin_macros"
       permission="zope.View"
@@ -60,7 +90,7 @@
       layer="zope.app.boston.boston"
       />
 
-  <browser:page
+  <page
       for="*"
       name="widget_macros"
       permission="zope.Public"

Modified: Zope3/branches/roger-bostonskin/src/zope/app/boston/browser/template.pt
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/browser/template.pt	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/browser/template.pt	2005-10-07 13:41:40 UTC (rev 38883)
@@ -10,27 +10,22 @@
   </title>
 
   <!-- head region -->
-<!--
   <metal:block tal:repeat="provider providers:zope.app.boston.regions.IHead">
-    <tal:block repeat="structure provider" />
+    <tal:block replace="structure provider" />
   </metal:block>
--->	
   <metal:block define-slot="headers"></metal:block>
 
   <!-- css region -->
-<!--
   <metal:block tal:repeat="provider providers:zope.app.boston.regions.ICSS">
-    <tal:block repeat="structure provider" />
+    <tal:block replace="structure provider" />
   </metal:block>
--->	
   <metal:block define-slot="style_slot"></metal:block>
 
   <!-- javascripts region -->
-<!--
   <metal:block tal:repeat="provider providers:zope.app.boston.regions.IJavaScript">
-    <tal:block repeat="structure provider" />
+    <tal:block replace="structure provider" />
   </metal:block>
--->	
+
   <metal:block define-slot="ecmascript_slot"></metal:block>
 
   <link rel="icon" type="image/png" 
@@ -43,13 +38,12 @@
   <table id="layout">
     <tr class="menu">
       <td colspan="2">
-
         <!-- toolbar region (zmi_action) -->
 <!--
         <metal:block tal:repeat="provider providers:zope.app.boston.regions.IToolBar">
-          <tal:block repeat="structure provider" />
+          <tal:block replace="structure provider" />
         </metal:block>
--->	
+-->
         <div id="userdetails">
           <metal:block define-macro="logged_user">
             <span tal:omit-tag="" i18n:translate="">User:</span>
@@ -95,22 +89,18 @@
     <tr>
       <td id="navigation">
         <div id="slotbox">
-<!--	
         	<metal:block tal:repeat="provider providers:zope.app.boston.regions.ILeft">
-          	<tal:block repeat="structure provider" />
+          	<tal:block replace="structure provider" />
         	</metal:block>
--->	
         </div>
       </td>
       <td id="content">
         <!-- context menu (zmi_views) just visible in view template -->
         <div id="contextmenu">
-<!--
           <metal:block tal:condition="python: macroname == 'view'"
-                       tal:repeat="pagelets providers:zope.app.boston.regions.IContextMenu">
-            <tal:block repeat="structure provider" />
+                       tal:repeat="provider providers:zope.app.boston.regions.IContextMenu">
+            <tal:block replace="structure provider" />
           </metal:block>
--->	
         </div>
         <!-- content area -->
         <div metal:define-slot="message" id="message" />

Modified: Zope3/branches/roger-bostonskin/src/zope/app/boston/configure.zcml
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/configure.zcml	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/configure.zcml	2005-10-07 13:41:40 UTC (rev 38883)
@@ -5,8 +5,8 @@
     xmlns:zcml="http://namespaces.zope.org/zcml"
     i18n_domain="zope">
 
-<!--  <include package=".viewlet" />-->
   <include package=".regions" />
+  <include package=".viewlets" />
   <include package=".browser" />
 
   <configure zcml:condition="have onlinehelp">

Modified: Zope3/branches/roger-bostonskin/src/zope/app/boston/regions/__init__.py
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/regions/__init__.py	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/regions/__init__.py	2005-10-07 13:41:40 UTC (rev 38883)
@@ -16,59 +16,65 @@
 $Id:$
 """
 
-from zope.contentprovider.interfaces import IRegion
+from zope.interface import Interface
 
 
 
-class IHead(IRegion):
-    """Head pagelet slot interface.
+class IHead(Interface):
+    """Head region slot interface.
 
-    This pagelet slot will lookup for pagelets. If you like to additional 
-    content to this slot, use the 'zope.app.boston.slots.IHead' 
-    interface for the slot attribute in a pagelet directive.
+    This region will lookup for content providers. If you like to add 
+    additional content providers to this region, use the 
+    'zope.app.boston.regions.IHead' interface for the region attribute 
+    in a provider directive. 
     """
 
 
-class ICSS(IRegion):
-    """CSS pagelet slot interface.
+class ICSS(Interface):
+    """CSS region slot interface.
 
-    This pagelet slot will lookup for pagelets. If you like to additional 
-    content to this slot, use the 'zope.app.boston.slots.ICSS' 
-    interface for the slot attribute in a pagelet directive.
+    This region will lookup for content providers. If you like to add 
+    additional content providers to this region, use the 
+    'zope.app.boston.regions.ICSS' interface for the region attribute 
+    in a provider directive. 
     """
 
 
-class IJavaScript(IRegion):
-    """Javasscript pagelet slot interface. 
+class IJavaScript(Interface):
+    """Javasscript region slot interface.
 
-    This pagelet slot will lookup for pagelets. If you like to additional 
-    content to this slot, use the 'zope.app.boston.slots.IJavaScript' 
-    interface for the slot attribute in a pagelet directive. 
+    This region will lookup for content providers. If you like to add 
+    additional content providers to this region, use the 
+    'zope.app.boston.regions.IJavaScript' interface for the region attribute 
+    in a provider directive. 
     """
 
 
-class IToolBar(IRegion):
-    """View action pagelet slot interface.
+class IToolBar(Interface):
+    """View action region slot interface.
 
-    This pagelet slot will lookup for pagelets. If you like to additional 
-    content to this slot, use the 'zope.app.boston.slots.IToolBar' 
-    interface for the slot attribute in a pagelet directive. 
+    This region will lookup for content providers. If you like to add 
+    additional content providers to this region, use the 
+    'zope.app.boston.regions.IToolBar' interface for the region attribute 
+    in a provider directive.  
     """
 
 
-class IContextMenu(IRegion):
-    """Context menu (zmi_views) pagelet slot interface.
+class IContextMenu(Interface):
+    """Context menu (zmi_views) region interface.
 
-    This pagelet slot will lookup for pagelets. If you like to additional 
-    content to this slot, use the 'zope.app.boston.slots.IContextMenu' 
-    interface for the slot attribute in a pagelet directive. 
+    This region will lookup for content providers. If you like to add 
+    additional content providers to this region, use the 
+    'zope.app.boston.regions.IContextMenu' interface for the region attribute 
+    in a provider directive. 
     """
 
 
-class ILeft(IRegion):
-    """Left pagelet slot interface.
+class ILeft(Interface):
+    """Left region slot interface.
 
-    This pagelet slot will lookup for pagelets. If you like to additional 
-    content to this slot, use the 'zope.app.boston.slots.ILeft' 
-    interface for the slot attribute in a pagelet directive.
+    This region will lookup for content providers. If you like to add 
+    additional content providers to this region, use the 
+    'zope.app.boston.regions.ILeft' interface for the region attribute 
+    in a provider directive. 
     """

Modified: Zope3/branches/roger-bostonskin/src/zope/app/boston/regions/configure.zcml
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/regions/configure.zcml	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/regions/configure.zcml	2005-10-07 13:41:40 UTC (rev 38883)
@@ -1,12 +1,34 @@
 <configure
-    xmlns="http://namespaces.zope.org/zope"
-    xmlns:browser="http://namespaces.zope.org/browser">
+    xmlns="http://namespaces.zope.org/zope">
 
-  <interface interface="zope.app.boston.regions.IHead" />
-  <interface interface="zope.app.boston.regions.IJavaScript" />
-  <interface interface="zope.app.boston.regions.ICSS" />
-  <interface interface="zope.app.boston.regions.IToolBar" />
-  <interface interface="zope.app.boston.regions.ILeft" />
-  <interface interface="zope.app.boston.regions.IContextMenu" />
+  <interface
+      interface="zope.app.boston.regions.IHead"
+      type="zope.contentprovider.interfaces.IRegion"
+      />
 
+  <interface
+      interface="zope.app.boston.regions.IJavaScript"
+      type="zope.contentprovider.interfaces.IRegion"
+      />
+
+  <interface
+      interface="zope.app.boston.regions.ICSS"
+      type="zope.contentprovider.interfaces.IRegion"
+      />
+
+  <interface
+      interface="zope.app.boston.regions.IToolBar"
+      type="zope.contentprovider.interfaces.IRegion"
+      />
+
+  <interface
+      interface="zope.app.boston.regions.ILeft"
+      type="zope.contentprovider.interfaces.IRegion"
+      />
+
+  <interface
+      interface="zope.app.boston.regions.IContextMenu"
+      type="zope.contentprovider.interfaces.IRegion"
+      />
+
 </configure>

Modified: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/__init__.py
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/__init__.py	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/__init__.py	2005-10-07 13:41:40 UTC (rev 38883)
@@ -13,5 +13,13 @@
 ##############################################################################
 """Boston skin
 
-$Id:$
+$Id$
 """
+
+from zope.viewlet import viewlet
+
+
+BostonJavascriptViewlet = viewlet.JavaScriptViewlet('boston.js')
+
+BostonCSSViewlet = viewlet.CSSViewlet('boston.css', 'all')
+BostonWidgetsCSSViewlet = viewlet.CSSViewlet('widgets.css', 'all')

Modified: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/configure.zcml
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/configure.zcml	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/configure.zcml	2005-10-07 13:41:40 UTC (rev 38883)
@@ -5,26 +5,28 @@
   <!-- IHead slot pagelets -->
   <include file="head.zcml" />
 
-  <!-- ICSS slot pagelets -->
-  <include file="css.zcml" />
-
   <!-- IJavaScript slot pagelets -->
-  <include file="javascript.zcml" />
+<!--
   <include file="toggle.zcml" />
+-->
 
   <!-- IToolBar slot pagelets -->
+<!--
   <include file="toolbar.zcml" />
-<!--
   <include file="zmiactions.zcml" />
+  <include file="helpaction.zcml" />
 -->
-  <include file="helpaction.zcml" />
 
   <!-- ILeft slot pagelets -->
+<!--
   <include file="zmicookietreebox.zcml" />
   <include file="addbox.zcml" />
   <include file="tooltipbox.zcml" />
+-->
 
   <!-- IContent slot pagelets -->
+<!--
   <include file="contextmenu.zcml" />
+-->
 
 </configure>

Deleted: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/css.pt
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/css.pt	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/css.pt	2005-10-07 13:41:40 UTC (rev 38883)
@@ -1,10 +0,0 @@
-<metal:block define-macro="css">
-  <style type="text/css" media="all" 
-         tal:content="string: @import url(${context/++resource++skin.css});">
-    @import url(skin.css);
-  </style>
-  <style type="text/css" media="all" 
-         tal:content="string: @import url(${context/++resource++widget.css});">
-    @import url(widget.css);
-  </style>
-</metal:block>

Deleted: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/css.zcml
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/css.zcml	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/css.zcml	2005-10-07 13:41:40 UTC (rev 38883)
@@ -1,16 +0,0 @@
-<configure
-    xmlns:zope="http://namespaces.zope.org/zope"
-    xmlns="http://namespaces.zope.org/browser"
-    i18n_domain="zope">
-
-  <pagelet
-      name="css"
-      for="*"
-      slot="zope.app.boston.slots.ICSS"
-      permission="zope.Public"
-      template="css.pt"
-      layer="zope.app.boston.boston"
-      weight="0"
-      />
-
-</configure>
\ No newline at end of file

Modified: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/head.pt
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/head.pt	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/head.pt	2005-10-07 13:41:40 UTC (rev 38883)
@@ -1,3 +1 @@
-<metal:block define-macro="head">
-  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-</metal:block>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
\ No newline at end of file

Modified: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/head.zcml
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/head.zcml	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/head.zcml	2005-10-07 13:41:40 UTC (rev 38883)
@@ -3,10 +3,10 @@
     xmlns="http://namespaces.zope.org/browser"
     i18n_domain="zope">
 
-  <pagelet
+  <viewlet
       name="head"
       for="*"
-      slot="zope.app.boston.slots.IHead"
+      region="zope.app.boston.regions.IHead"
       permission="zope.Public"
       template="head.pt"
       layer="zope.app.boston.boston"

Deleted: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/javascript.pt
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/javascript.pt	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/javascript.pt	2005-10-07 13:41:40 UTC (rev 38883)
@@ -1,8 +0,0 @@
-<metal:block define-macro="javascript">
-  <script type="text/javascript" src="boston.js"
-          tal:attributes="src string:${context/++resource++boston.js}">
-    <!-- Using a separate end tag instead of a single empty tag is
-         necessary to support some browsers (Firefox 1.0, for example).
-         -->
-  </script>
-</metal:block>

Deleted: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/javascript.zcml
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/javascript.zcml	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/javascript.zcml	2005-10-07 13:41:40 UTC (rev 38883)
@@ -1,16 +0,0 @@
-<configure
-    xmlns:zope="http://namespaces.zope.org/zope"
-    xmlns="http://namespaces.zope.org/browser"
-    i18n_domain="zope">
-
-  <pagelet
-      name="javascript"
-      for="*"
-      slot="zope.app.boston.slots.IJavaScript"
-      permission="zope.Public"
-      template="javascript.pt"
-      layer="zope.app.boston.boston"
-      weight="1"
-      />
-
-</configure>
\ No newline at end of file

Added: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/__init__.py
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/__init__.py	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/__init__.py	2005-10-07 13:41:40 UTC (rev 38883)
@@ -0,0 +1,24 @@
+##############################################################################
+#
+# Copyright (c) 2005 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Skintools toolbar
+
+$Id$
+"""
+__docformat__ = "reStructuredText"
+
+from zope.app.pagelet.interfaces import IPageletSlot
+
+
+class IToolBarLayout(IPageletSlot):
+    """This slot contains all pagelet for the toolbar layout."""


Property changes on: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/__init__.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/__init__.py
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/__init__.py	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/__init__.py	2005-10-07 13:41:40 UTC (rev 38883)
@@ -0,0 +1,17 @@
+##############################################################################
+#
+# Copyright (c) 2005 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Skintools toolbar views
+
+$Id$
+"""


Property changes on: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/__init__.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/configure.zcml.sample
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/configure.zcml.sample	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/configure.zcml.sample	2005-10-07 13:41:40 UTC (rev 38883)
@@ -0,0 +1,90 @@
+<configure
+    xmlns:zope="http://namespaces.zope.org/zope"
+    xmlns="http://namespaces.zope.org/browser"
+    i18n_domain="zope">
+
+  <!-- This is only a sample configure.zcml file
+       See README.txt in zope.app.skintools for more 
+       information about the skintools concept.
+       -->
+  <resource 
+      name="divmenu.js"
+      file="divmenu.js"
+      layer="the layer of your skin"
+      />
+
+  <resource 
+      name="toolbar.css"
+      file="toolbar.css"
+      layer="the layer of your skin"
+      />
+ 
+  <resource
+      name="toolbarGrip.gif"
+      file="toolbarGrip.gif"
+      layer="the layer of your skin"
+      />
+ 
+  <resource
+      name="toolbarArrow.gif"
+      file="toolbarArrow.gif"
+      layer="the layer of your skin"
+      />
+ 
+  <resource
+      name="toolbarArrowOver.gif"
+      file="toolbarArrowOver.gif"
+      layer="the layer of your skin"
+      />
+
+  <!-- pagelet defining javascript -->
+  <pagelet
+      name="toolbar-js"
+      for="*"
+      slot="the slot used in your skin" 
+      permission="zope.Public"
+      template="toolbar.pt"
+      layer="the layer of your skin"
+      />
+
+  <!-- pagelet defining css -->
+  <pagelet
+      name="toolbar-css"
+      for="*"
+      slot="the slot used in your skin"
+      permission="zope.Public"
+      template="toolbar.pt"
+      layer="the layer of your skin"
+      />
+
+  <!-- pagelet defining the toolbar -->
+  <pagelet
+      name="toolbar"
+      for="*"
+      slot="the slot used in your skin"
+      permission="zope.ManageContent"
+      template="toolbar.pt"
+      layer="the layer of your skin"
+      weight="2"
+      />
+
+  <!-- pagelet defining nested layout -->
+  <pagelet
+      name="toolbar-button"
+      for="*"
+      slot="the slot used in your skin"
+      permission="zope.View"
+      template="toolbar.pt"
+      layer="the layer of your skin"
+      />
+
+  <pagelet
+      name="toolbar-item"
+      for="*"
+      slot="the slot used in your skin"
+      permission="zope.View"
+      template="toolbar.pt"
+      layer="the layer of your skin"
+      />
+
+</configure>
\ No newline at end of file

Added: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/divmenu.js
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/divmenu.js	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/divmenu.js	2005-10-07 13:41:40 UTC (rev 38883)
@@ -0,0 +1,427 @@
+//----------------------------------------------------------------------------
+// DivMenu renders a nested list of <div> tags to a menu bar. See README.html 
+// for a static sample.
+// We move this javascript to zope.app.skintools.javascripts.divmenu later
+//----------------------------------------------------------------------------
+
+var menus = new Array(); // we put each menu in this Array
+
+function DivMenu(id) {
+    this.type = "horizontal";
+    this.menuPosTop = 0;
+    this.menuPosLeft = 0;
+    this.subPosTop = 0;
+    this.subPosLeft = 0;
+    this.arrow = null;
+    this.arrowOver = null;
+    this.id = id;
+    menus[self.id] = this;
+    this.tree = new Array();
+    this.visible = new Array();
+
+    // Browser detection
+    this.browser = {
+        "ie": Boolean(document.body.currentStyle),
+        "ie5": (navigator.appVersion.indexOf("MSIE 5.5") != -1 || navigator.appVersion.indexOf("MSIE 5.0") != -1)
+    };
+    if (!this.browser.ie) {
+        this.browser.ie5 = false;
+    }
+}
+
+/* Initialize the menu */
+DivMenu.prototype.init = function() {
+    document.onmousedown = this.click;
+    if (this.browser.ie && this.browser.ie5) {
+        this.fixWrap();
+    }
+    this.fixSections();
+    this.parse(document.getElementById(this.id).childNodes, this.tree, this.id);
+}
+
+/* Search for menugroup elements and set width for them */
+DivMenu.prototype.fixSections = function() {
+    var arr = document.getElementById(this.id).getElementsByTagName("div");
+    var menugroups = new Array();
+    var widths = new Array();
+
+    for (var i = 0; i < arr.length; i++) {
+        if (arr[i].className == "menugroup") {
+            menugroups.push(arr[i]);
+        }
+    }
+    for (var i = 0; i < menugroups.length; i++) {
+        widths.push(this.getMaxWidth(menugroups[i].childNodes));
+    }
+    for (var i = 0; i < menugroups.length; i++) {
+        menugroups[i].style.width = (widths[i]) + "px";
+    }
+    if (menus[self.id].browser.ie) {
+        for (var i = 0; i < menugroups.length; i++) {
+            this.setMaxWidth(menugroups[i].childNodes, widths[i]);
+        }
+    }
+
+}
+
+DivMenu.prototype.fixWrap = function() {
+    var elements = document.getElementById(this.id).getElementsByTagName("a");
+    for (var i = 0; i < elements.length; i++) {
+        if (/submenu/.test(elements[i].className)) {
+            elements[i].innerHTML = '<div nowrap="nowrap">'+elements[i].innerHTML+'</div>';
+        }
+    }
+}
+
+/* Search for highest width */
+DivMenu.prototype.getMaxWidth = function(nodes) {
+    var maxWidth = 0;
+    for (var i = 0; i < nodes.length; i++) {
+        if (nodes[i].nodeType != 1 || nodes[i].className == "menugroup") {
+            continue;
+        }
+        if (nodes[i].offsetWidth > maxWidth) maxWidth = nodes[i].offsetWidth;
+    }
+    return maxWidth;
+}
+
+/* Set width for submenu elements */
+DivMenu.prototype.setMaxWidth = function(nodes, maxWidth) {
+    for (var i = 0; i < nodes.length; i++) {
+        if (nodes[i].nodeType == 1 && /submenu/.test(nodes[i].className) && nodes[i].currentStyle) {
+            if (this.browser.ie5) {
+                nodes[i].style.width = (maxWidth) + "px";
+            } else {
+                nodes[i].style.width = (maxWidth - parseInt(nodes[i].currentStyle.paddingLeft) - parseInt(nodes[i].currentStyle.paddingRight)) + "px";
+            }
+        }
+    }
+}
+
+/* Parse menu structure, create events and position elements */
+DivMenu.prototype.parse = function(nodes, tree, id) {
+    for (var i = 0; i < nodes.length; i++) {
+        if (nodes[i].nodeType != 1) { continue };
+        switch (nodes[i].className) {
+            case "topmenu":
+                nodes[i].id = id + "-" + tree.length;
+                tree.push(new Array());
+                nodes[i].onmouseover = this.topmenuOverShowsChilds;
+                nodes[i].onclick = this.topmenuClick;
+                break;
+            case "submenu":
+                nodes[i].id = id + "-" + tree.length;
+                tree.push(new Array());
+                nodes[i].onmouseover = this.submenuOver;
+                nodes[i].onmouseout = this.submenuOut;
+                nodes[i].onclick = this.submenuClick;
+                break;
+            case "menugroup":
+                nodes[i].id = id + "-" + (tree.length - 1) + "-menugroup";
+                var parentDiv = document.getElementById(id + "-" + (tree.length - 1));
+                var childDiv = document.getElementById(nodes[i].id);
+                var el = new DivMenuGroup(parentDiv.id);
+                if (el.level == 1) {
+                    if (this.type == "horizontal") {
+                        childDiv.style.top = (parentDiv.offsetTop + parentDiv.offsetHeight + this.menuPosTop-3) + "px";
+                        if (this.browser.ie5) {
+                            childDiv.style.left = (2+this.menuPosLeft) + "px";
+                        } else {
+                            childDiv.style.left = (2+parentDiv.offsetLeft + this.menuPosLeft) + "px";
+                        }
+                    } else if (this.type == "vertical") {
+                        childDiv.style.top = (parentDiv.offsetTop + this.menuPosTop) + "px";
+                        if (this.browser.ie5) {
+                            childDiv.style.left = (2+parentDiv.offsetWidth + this.menuPosLeft) + "px";
+                        } else {
+                            childDiv.style.left = (2+parentDiv.offsetLeft + parentDiv.offsetWidth + this.menuPosLeft) + "px";
+                        }
+                    }
+                } else {
+                    childDiv.style.top = (parentDiv.offsetTop + this.subPosTop-3) + "px";
+                    childDiv.style.left = (2+parentDiv.offsetLeft + parentDiv.offsetWidth + this.subPosLeft) + "px";
+                }
+                break;
+            case "menuarrow":
+                nodes[i].id = id + "-" + (tree.length - 1) + "-menuarrow";
+                break;
+        }
+        if (nodes[i].childNodes) {
+            if (nodes[i].className == "menugroup") {
+                this.parse(nodes[i].childNodes, tree[tree.length - 1], id + "-" + (tree.length - 1));
+            } else {
+                this.parse(nodes[i].childNodes, tree, id);
+            }
+        }
+    }
+}
+
+/* Hide all menugroups */
+DivMenu.prototype.hideAll = function() {
+    for (var i = this.visible.length - 1; i >= 0; i--) {
+        this.hide(this.visible[i]);
+    }
+}
+
+/* Hide higher or equal levels */
+DivMenu.prototype.hideHigherOrEqualLevels = function(n) {
+    for (var i = this.visible.length - 1; i >= 0; i--) {
+        var el = new DivMenuGroup(this.visible[i]);
+        if (el.level >= n) {
+            this.hide(el.id);
+        } else {
+            return;
+        }
+    }
+}
+
+/* Hide a menugroup */
+DivMenu.prototype.hide = function(id) {
+    var el = new DivMenuGroup(id);
+    document.getElementById(id).className = (el.level == 1 ? "topmenu" : "submenu");
+    if (el.level > 1 && this.arrowOver) {
+        document.getElementById(id + "-menuarrow").src = this.arrow;
+    }
+    document.getElementById(id + "-menugroup").style.visibility = "hidden";
+    document.getElementById(id + "-menugroup").style.zIndex = -1;
+    if (this.visible.contains(id)) {
+        if (this.visible[this.visible.length - 1] == id) {
+            this.visible.pop();
+        }
+    }
+}
+
+/* Show a menugroup */
+DivMenu.prototype.show = function(id) {
+    var el = new DivMenuGroup(id);
+    document.getElementById(id).className = (el.level == 1 ? "topmenu-active" : "submenu-active");
+    if (el.level > 1 && this.arrowOver) {
+        document.getElementById(id + "-menuarrow").src = this.arrowOver;
+    }
+    document.getElementById(id + "-menugroup").style.visibility = "visible";
+    document.getElementById(id + "-menugroup").style.zIndex = 1;
+    this.visible.push(id);
+}
+
+/* event, document.onmousedown */
+DivMenu.prototype.click = function(e) {
+    var el;
+    if (e) {
+        el = e.target.tagName ? e.target : e.target.parentNode;
+    } else {
+        el = window.event.srcElement;
+        if (el.parentNode && /submenu/.test(el.parentNode.className)) {
+            el = el.parentNode;
+        }
+    }
+    if (!menus[self.id].visible.length) { return };
+    if (!el.onclick) { menus[self.id].hideAll(); }
+}
+
+/* event, topmenu.onmouseover will show children*/
+DivMenu.prototype.topmenuOverShowsChilds = function() {
+    var el = new DivMenuGroup(this.id);
+    menus[self.id].hideHigherOrEqualLevels(el.level);
+    if (el.hasChilds()) {
+        menus[self.id].show(this.id);
+    }
+}
+
+/* event, topmenu.onmouseover */
+DivMenu.prototype.topmenuOver = function() {
+    if (!menus[self.id].visible.length) {
+        return;
+    }
+    if (menus[self.id].visible.contains(this.id)) { return };
+    menus[self.id].hideAll();
+    var el = new DivMenuGroup(this.id);
+    if (el.hasChilds()) {
+        menus[self.id].show(this.id);
+    }
+}
+
+/* event, topmenu.onclick */
+DivMenu.prototype.topmenuClick = function() {
+    this.blur();
+    if (menus[self.id].visible.length) {
+        menus[self.id].hideAll();
+    } else {
+        var el = new DivMenuGroup(this.id);
+        if (el.hasChilds()) {
+            menus[self.id].show(this.id);
+        }
+    }
+}
+
+/* event, submenu.onmouseover */
+DivMenu.prototype.submenuOver = function() {
+    var el = new DivMenuGroup(this.id);
+    menus[self.id].hideHigherOrEqualLevels(el.level);
+    if (el.hasChilds()) {
+        menus[self.id].show(this.id);
+    }
+}
+
+/* event, onmouseout hide all children */
+DivMenu.prototype.mouseOutHideAll = function() {
+    menus[self.id].hideAll();
+}
+
+/* event, submenu.onmouseout */
+DivMenu.prototype.submenuOut = function() {
+    var el = new DivMenuGroup(this.id);
+    if (!el.hasChilds()) {
+        document.getElementById(this.id).className = "submenu";
+    }
+}
+
+/* event, submenu.onclick */
+DivMenu.prototype.submenuClick = function() {
+    this.blur();
+    var el = new DivMenuGroup(this.id);
+    menus[self.id].hideHigherOrEqualLevels(el.level);
+    if (el.hasChilds()) {
+        menus[self.id].show(this.id);
+    }
+}
+
+/* DivMenuGroup */
+function DivMenuGroup(id) {
+    this.id = id;
+    this.level = this.getLevel();
+}
+
+/* Get Level of given id */
+DivMenuGroup.prototype.getLevel = function() {
+    menu = menus[self.id]
+    var s = this.id.substr(menu.id.length);
+    return s.split("-").length - 1;
+}
+
+
+/* Check whether an element has a sub menugroup */
+DivMenuGroup.prototype.hasChilds = function() {
+    return Boolean(document.getElementById(this.id + "-menugroup"));
+}
+
+/* add missing Array function if needed (e.g. ie5) */
+if (!Array.prototype.contains) {
+    Array.prototype.contains = function(s) {
+        for (var i = 0; i < this.length; i++) {
+            if (this[i] == s) {
+                return true;
+            }
+        }
+        return false;
+    }
+}
+
+if(!Array.prototype.copy) {
+    Array.prototype.copy=function(a){
+        var i = 0;
+        var b = [];
+        for(i;i<this.length;i++)
+            b[i] = (typeof this[i].copy != 'undefined')?
+                this[i].copy():
+                this[i];
+        return b
+    };
+}
+
+if(!Array.prototype.concat) {
+    Array.prototype.concat=function(a){
+        var i = 0;
+        var b = this.copy();
+        for(i;i<a.length;i++) {
+            b[b.length]=a[i];
+        }
+        return b
+    };
+}
+    
+if(!Array.prototype.pop) {
+    Array.prototype.pop=function(){
+      var response = this[this.length - 1]
+      this.length--
+      return response
+    };
+}
+
+if(!Array.prototype.push) {
+    Array.prototype.push=function(){
+        var i = 0;
+        var b = this.length;
+        var a = arguments;
+        for(i;i<a.length;i++) {
+            this[b+i] = a[i];
+        }
+        return this.length
+    };
+}
+
+if(!Array.prototype.shift) {
+    Array.prototype.shift=function(){
+        var i = 0;
+        var b = this[0];
+        for(i;i<this.length-1;i++) {
+            this[i] = this[i+1];
+        }
+        this.length--;
+        return b
+    };
+}
+
+if(!Array.prototype.slice) {
+    Array.prototype.slice=function(a,c){
+        var i = 0;
+        var b;
+        var d = [];
+        if(!c) {
+            c=this.length;
+        }
+        if(c<0) {
+            c=this.length+c;
+        }
+        if(a<0) {
+            a=this.length-a;
+        }
+        if(c<a){
+            b = a;
+            a = c;
+            c = b
+        }
+        for(i;i<c-a;i++)
+            d[i] = this[a+i];
+        return d
+    };
+}
+
+if(!Array.prototype.splice) {
+    Array.prototype.splice=function(a,c){
+        var i = 0;
+        var e = arguments;
+        var d = this.copy();
+        var f = a;
+        if(!c) {
+            c=this.length-a;
+        }
+        for(i;i<e.length-2;i++) {
+            this[a+i]=e[i+2];
+        }
+        for(a;a<this.length-c;a++) {
+            this[a+e.length-2]=d[a-c];
+        }
+        this.length-=c-e.length+2;
+        return d.slice(f,f+c)
+    };
+}
+
+if(!Array.prototype.unshift) {
+    Array.prototype.unshift=function(a){
+        var b;
+        this.reverse();
+        b = this.push(a);
+        this.reverse();
+        return b
+    };
+}

Added: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbar.css
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbar.css	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbar.css	2005-10-07 13:41:40 UTC (rev 38883)
@@ -0,0 +1,87 @@
+div.ToolBarContainer {
+    border-bottom: 1px solid #D8D2BD;
+    padding-top: 1px;
+    padding-bottom: 1px;
+    padding-left: 5px;
+    cursor: default;        
+}
+
+.ToolBar {
+    font-family: tahoma, verdana, arial, sans-serif;
+    font-size: 11px;
+}
+
+.ToolBar hr {
+    height: 1px;
+    color: silver;
+}
+
+.ToolBar .topmenu,
+.ToolBar .topmenu:hover,
+.ToolBar .topmenu-active,
+.ToolBar .topmenu-active:hover {
+    line-height: normal;
+    padding: 5px 6px 4px 6px;
+    margin: 1px; 
+    color: #000000;
+    text-decoration: none;
+    cursor: default;
+    white-space: nowrap;
+    display: block;
+    position: relative;
+}
+.ToolBar .topmenu:hover {
+    margin: 0px;
+    border: 1px solid #8F8F85;
+    background:#EFECDE;
+}
+.ToolBar .topmenu-active,
+.ToolBar .topmenu-active:hover {    
+    margin: 0px;
+    border: 1px solid #8F8F85;    
+    border-bottom:none;
+    background:#C9D5E5;
+}
+
+.ToolBar .submenu,
+.ToolBar .submenu:hover,
+.ToolBar .submenu-active,
+.ToolBar .submenu-active:hover {
+    border:1px solid #FDFDF9;
+    background: #FDFDF9;
+    line-height: normal;
+    padding: 3px 30px 3px 20px;
+    color: black;
+    text-decoration: none;
+    cursor: default;
+    white-space: nowrap;
+    display: block;
+    position: relative;
+}
+.ToolBar .submenu:hover,
+.ToolBar .submenu-active,
+.ToolBar .submenu-active:hover {
+    border:1px solid #316BC6;
+    background: #C9D5E5;
+    color: black;
+}
+
+.ToolBar .menugroup {
+    background: #FCFCF8;
+    border: 1px solid;
+    border-color: #F1EFE2 #716F64 #716F64 #F1EFE2;
+    padding: 2px 1px 1px 2px;
+    position: absolute;
+    visibility: hidden;
+    z-index: -1;       
+}
+.ToolBar .menuarrow {
+    position: absolute;
+    top: 7px;
+    right: 8px;
+    border: 0;
+}
+
+* html .ToolBar td { 
+    position: relative;
+} /* ie 5.0 fix */


Property changes on: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbar.css
___________________________________________________________________
Name: svn:eol-style
   + native

Added: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbar.pt
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbar.pt	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbar.pt	2005-10-07 13:41:40 UTC (rev 38883)
@@ -0,0 +1,81 @@
+<html>
+<body>
+
+<metal:block define-macro="toolbar-css">
+  <style type="text/css" media="all" 
+         tal:content="string: @import url(${context/++resource++toolbar.css});">
+    @import url(toolbar.css);
+  </style>
+</metal:block>
+
+<metal:block define-macro="toolbar-js">
+<script type="text/javascript" src="divmenu.js"
+        tal:attributes="src string:${context/++resource++divmenu.js}" ></script>
+
+<script type="text/javascript"
+        tal:attributes="language string:JavaScript"
+        tal:content="structure string:
+	var divMenuArrow = new Image(4, 7);
+	divMenuArrow.src = '${context/++resource++toolbarArrow.gif}';
+	var divMenuArrowOver = new Image(4, 7);
+	divMenuArrowOver.src = '${context/++resource++toolbarArrowOver.gif}';">
+</script>
+</metal:block>
+
+<metal:block define-macro="toolbar">
+<div class="ToolBarContainer">
+	<table cellspacing="0" cellpadding="0" id="toolbar" class="ToolBar">
+		<tr>
+			<td><img src="/++resource++toolbarGrip.gif" width="5" height="18"
+								tal:attributes="src string:${context/++resource++toolbarGrip.gif}" /></td>
+			<td tal:repeat="menuitem context/@@view_get_menu/zmi_actions">
+				<metal:block use-macro="pagelet:zope.app.skintools.toolbar.IToolBarLayout/toolbar-button" /> 
+			</td>
+		</tr>
+	</table>
+</div>
+<script type="text/javascript"
+        tal:attributes="language string:JavaScript"
+        tal:content="structure string:
+  var toolbar = new DivMenu('toolbar');
+  toolbar.divMenuArrow = '${context/++resource++toolbarArrow.gif}';
+  toolbar.divMenuArrowOver = '${context/++resource++toolbarArrowOver.gif}';
+  toolbar.init();">
+</script>
+</metal:block>
+
+<!-- render first level items with class name 'button' -->
+<metal:block define-macro="toolbar-button">
+	<a href="" class="topmenu"
+		 tal:attributes="href menuitem/action"
+		 tal:content="menuitem/title"
+		 i18n:translate="">
+	</a>
+  <div tal:condition="menuitem/submenu">
+    <tal:block tal:repeat="subitem menuitem/submenu">
+			<tal:block define="menuitem subitem">
+				<metal:block use-macro="pagelet:zope.app.skintools.toolbar.IToolBarLayout/toolbar-item" />
+			</tal:block>
+		</tal:block>
+	</div>
+</metal:block>
+
+<!-- render all except first level items with class name 'item' -->
+<metal:block define-macro="toolbar-item">
+	<a href="" class="submenu"
+		 tal:attributes="href menuitem/action"
+		 tal:content="menuitem/title"
+		 i18n:translate="">
+	</a>
+  <div tal:condition="menuitem/submenu">
+    <tal:block tal:repeat="subitem menuitem/submenu">
+			<tal:block define="menuitem subitem">
+				<metal:block use-macro="pagelet:zope.app.skintools.toolbar.IToolBarLayout/toolbar-item" />
+			</tal:block>
+		</tal:block>
+	</div>
+</metal:block>
+
+</body>
+</html>
+


Property changes on: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbar.pt
___________________________________________________________________
Name: svn:eol-style
   + native

Added: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbarArrow.gif
===================================================================
(Binary files differ)


Property changes on: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbarArrow.gif
___________________________________________________________________
Name: svn:mime-type
   + image/gif

Added: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbarArrowOver.gif
===================================================================
(Binary files differ)


Property changes on: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbarArrowOver.gif
___________________________________________________________________
Name: svn:mime-type
   + image/gif

Added: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbarGrip.gif
===================================================================
(Binary files differ)


Property changes on: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbarGrip.gif
___________________________________________________________________
Name: svn:mime-type
   + image/gif

Added: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbar_layout.pt
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbar_layout.pt	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbar_layout.pt	2005-10-07 13:41:40 UTC (rev 38883)
@@ -0,0 +1,36 @@
+<html>
+<body>
+
+<metal:block define-macro="toolbar_layout">
+    <metal:block define-slot="toolbar">
+      zmi actions
+    </metal:block>
+</metal:block>
+
+<metal:block define-macro="itemdisplay">
+   <img class="itemicon"
+        tal:condition="menuitem/icon"
+        tal:attributes="src menuitem/icon" />
+   &nbsp;
+   <span tal:content="menuitem/title" />
+
+   <img class="submenuhint" src="/++resource++submenuhint.png" 
+        tal:condition="menuitem/submenu"/>
+</metal:block>
+
+<metal:block define-macro="menuitem">
+  <a href=""
+     tal:attributes="href menuitem/action;">
+    <metal:block use-macro="context/@@menudemo_macros/itemdisplay" />
+  </a>
+  <ul tal:condition="menuitem/submenu">
+    <li tal:repeat="subitem menuitem/submenu">
+      <tal:block define="menuitem subitem">
+        <metal:block use-macro="context/@@menudemo_macros/menuitem" />
+      </tal:block>
+    </li>
+  </ul>
+</metal:block>
+
+</body>
+</html>


Property changes on: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/browser/toolbar_layout.pt
___________________________________________________________________
Name: svn:eol-style
   + native

Added: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/configure.zcml
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/configure.zcml	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/configure.zcml	2005-10-07 13:41:40 UTC (rev 38883)
@@ -0,0 +1,6 @@
+<configure
+    xmlns="http://namespaces.zope.org/zope">
+
+  <interface interface="zope.app.boston.toolbar.IToolBarLayout" />
+
+</configure>
\ No newline at end of file


Property changes on: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar/configure.zcml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar.zcml
===================================================================
--- Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar.zcml	2005-10-07 13:25:03 UTC (rev 38882)
+++ Zope3/branches/roger-bostonskin/src/zope/app/boston/viewlets/toolbar.zcml	2005-10-07 13:41:40 UTC (rev 38883)
@@ -3,7 +3,7 @@
     xmlns="http://namespaces.zope.org/browser"
     i18n_domain="tiks">
 
-  <configure package="zope.app.skintools.toolbar.browser">
+  <configure package="zope.app.boston.toolbar.browser">
     <resource 
         name="divmenu.js"
         file="divmenu.js"



More information about the Zope3-Checkins mailing list