[z3-checkins] r8253 - in z3/Five/trunk: . tests/products/FiveTest

regebro at codespeak.net regebro at codespeak.net
Thu Jan 13 13:49:08 MET 2005


Author: regebro
Date: Thu Jan 13 13:49:07 2005
New Revision: 8253

Added:
   z3/Five/trunk/globalbrowsermenuservice.py   (props changed)
      - copied unchanged from r7256, z3/Five/branch/regebro-menudirectives/globalbrowsermenuservice.py
Modified:
   z3/Five/trunk/interfaces.py
   z3/Five/trunk/meta.zcml
   z3/Five/trunk/tests/products/FiveTest/configure.zcml
Log:
merge -r7242:7256 svn+ssh://codespeak.net/svn/z3/Five/branch/regebro-menudirectives

Modified: z3/Five/trunk/interfaces.py
==============================================================================
--- z3/Five/trunk/interfaces.py	(original)
+++ z3/Five/trunk/interfaces.py	Thu Jan 13 13:49:07 2005
@@ -17,6 +17,7 @@
 $Id$
 """
 from zope.interface import Interface, Attribute
+from zope.interface.interfaces import IInterface
 from zope.schema import Bool, BytesLine, Tuple
 
 try:
@@ -1221,3 +1222,12 @@
         """Check the global (zclass) registry for problems, which can
         be caused by things like disk-based products being deleted.
         Return true if a problem is found"""
+
+
+class IMenuItemType(IInterface):
+    """Menu item type
+
+    Menu item types are interfaces that define classes of
+    menu items.
+    """
+        
\ No newline at end of file

Modified: z3/Five/trunk/meta.zcml
==============================================================================
--- z3/Five/trunk/meta.zcml	(original)
+++ z3/Five/trunk/meta.zcml	Thu Jan 13 13:49:07 2005
@@ -140,6 +140,31 @@
         handler=".browserconfigure.resourceDirectory"
         />
 
+    <meta:directive
+        name="menu"
+        schema="zope.app.publisher.browser.metadirectives.IMenuDirective"
+        handler=".globalbrowsermenuservice.menuDirective"
+        />
+
+    <meta:directive
+        name="menuItem"
+        schema="zope.app.publisher.browser.metadirectives.IMenuItemDirective"
+        handler=".globalbrowsermenuservice.menuItemDirective"
+        />
+    
+    <meta:complexDirective
+        name="menuItems"
+        schema="zope.app.publisher.browser.metadirectives.IMenuItemsDirective"
+        handler=".globalbrowsermenuservice.menuItemsDirective"
+        >
+
+      <meta:subdirective
+          name="menuItem"
+          schema="zope.app.publisher.browser.metadirectives.IMenuItemSubdirective"
+          />
+    
+    </meta:complexDirective>
+                
   </meta:directives>
 
   <meta:directives namespace="http://namespaces.zope.org/five">

Modified: z3/Five/trunk/tests/products/FiveTest/configure.zcml
==============================================================================
--- z3/Five/trunk/tests/products/FiveTest/configure.zcml	(original)
+++ z3/Five/trunk/tests/products/FiveTest/configure.zcml	Thu Jan 13 13:49:07 2005
@@ -294,13 +294,47 @@
   <!-- browser:page directives with new style classes are ignored -->
 
   <browser:page
-    for=".interfaces.ISimpleContent"
-    class=".browser.NewStyleClass"
-    name="invalid_page"
-    attribute="method"
-    permission="zope2.Public"
-    />
+      for=".interfaces.ISimpleContent"
+      class=".browser.NewStyleClass"
+      name="invalid_page"
+      attribute="method"
+      permission="zope2.Public"
+      />
+    
+  <!-- browser menu support -->
+  <browser:menu
+      id="testmenu"
+      title="Test menu" />
+
+  <browser:menuItem
+      for=".interfaces.ISimpleContent"
+      menu="testmenu"
+      title="Test Menu Item"
+      action="seagull.html"
+      description="This is a test menu item"
+      permission="zope2.Public"
+      />
 
+  <browser:menuItems
+      for=".interfaces.ISimpleContent"
+      menu="testmenu">
+      
+      <menuItem
+          title="Test Menu Item 2"
+          action="parakeet.html"
+          description="This is a test menu item"
+          permission="zope2.Public"
+          />
+      
+      <menuItem
+          title="Test Menu Item 3"
+          action="falcon.html"
+          description="This is a test menu item"
+          permission="zope2.Public"
+          />
+          
+  </browser:menuItems>
+    
   <!-- subscribe to all events -->
   <five:sendEvents
       class=".simplecontent.SimpleContent"


More information about the z3-checkins mailing list