[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Publisher/Browser - GlobalBrowserMenuService.py:1.2 ViewMeta.py:1.4 meta.zcml:1.4
Jim Fulton
jim@zope.com
Thu, 20 Jun 2002 16:00:58 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/Publisher/Browser
In directory cvs.zope.org:/tmp/cvs-serv19918/lib/python/Zope/App/Publisher/Browser
Modified Files:
GlobalBrowserMenuService.py ViewMeta.py meta.zcml
Log Message:
Gary and Jim implemented most of:
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/AddMenuProposalAndEndOfZmiNamespace
A lot of clean up is needed, including:
- Implementation additional add menus, for example for services.
- Ripping out old unused implementation.
=== Zope3/lib/python/Zope/App/Publisher/Browser/GlobalBrowserMenuService.py 1.1 => 1.2 ===
)]
+def menuItemDirective(_context, menu, for_,
+ action, title, description='', filter=None):
+ return menuItemsDirective(_context, menu, for_).menuItem(
+ _context, action, title, description, filter)
+
+
class menuItemsDirective:
def __init__(self, _context, menu, for_):
=== Zope3/lib/python/Zope/App/Publisher/Browser/ViewMeta.py 1.3 => 1.4 ===
require = {}
+
+ factory = self.factory[:]
+ klass = factory[-1]
+
klassdict = {'_PageTraverser__pages': {},
'_PageTraverser__default': self.__default,
+ '__implements__':
+ (klass.__implements__, PageTraverser.__implements__),
}
for name in self.__pages:
attribute, permission, template = self.__pages[name]
@@ -233,8 +239,6 @@
klassdict['_PageTraverser__pages'][name] = attribute
- factory = self.factory[:]
- klass = factory[-1]
klass = type(klass.__name__,
(klass, PageTraverser, object),
klassdict)
=== Zope3/lib/python/Zope/App/Publisher/Browser/meta.zcml 1.3 => 1.4 ===
Zope.App.Publisher.Browser.GlobalBrowserMenuService.menuDirective" />
- <directive name="menuItems" attributes="id for"
+ <directive name="menuItems" attributes="menu for"
handler="
Zope.App.Publisher.Browser.GlobalBrowserMenuService.menuItemsDirective">
<subdirective name="menuItem"
attributes="action title description filter"
/>
</directive>
+
+ <directive
+ name="menuItem"
+ attributes="menu for action title description filter"
+ handler="
+ Zope.App.Publisher.Browser.GlobalBrowserMenuService.menuItemDirective
+ "
+ />
<directive name="icon" attributes="name for file image alt layer"
handler="Zope.App.Publisher.Browser.IconDirective." />