[Checkins] SVN: z3ext.controlpanel/tags/1.2.2/ egg 1.2.2

Nikolay Kim fafhrd at datacom.kz
Tue Apr 8 01:15:19 EDT 2008


Log message for revision 85157:
  egg 1.2.2

Changed:
  A   z3ext.controlpanel/tags/1.2.2/
  D   z3ext.controlpanel/tags/1.2.2/CHANGES.txt
  A   z3ext.controlpanel/tags/1.2.2/CHANGES.txt
  U   z3ext.controlpanel/tags/1.2.2/setup.py
  D   z3ext.controlpanel/tags/1.2.2/src/z3ext/controlpanel/browser/navigation.py
  A   z3ext.controlpanel/tags/1.2.2/src/z3ext/controlpanel/browser/navigation.py

-=-
Copied: z3ext.controlpanel/tags/1.2.2 (from rev 85155, z3ext.controlpanel/trunk)

Deleted: z3ext.controlpanel/tags/1.2.2/CHANGES.txt
===================================================================
--- z3ext.controlpanel/trunk/CHANGES.txt	2008-04-08 03:25:09 UTC (rev 85155)
+++ z3ext.controlpanel/tags/1.2.2/CHANGES.txt	2008-04-08 05:15:18 UTC (rev 85157)
@@ -1,70 +0,0 @@
-=======
-CHANGES
-=======
-
-1.2.1 (2008-03-28)
-------------------
-
-- Removed 'principals' configlet category
-
-
-1.2.0 (2008-03-21)
-------------------
-
-- Use z3ext.pagelet directive for browser views
-
-- Added i18n
-
-- Moved to svn.zope.org
-
-
-1.1.7 (2008-03-18)
-------------------
-
-- Added functional tests
-
-
-1.1.6 (2008-02-28)
-------------------
-
-- Use z3c.autoinclude
-
-
-1.1.5 (2008-02-22)
-------------------
-
-- Added buildout.cfg for testing
-
-- Added viewlet manager for configlet navigation
-
-
-1.1.4 (2008-02-20)
-------------------
-
-- Use z3ext.layoutform
-
-
-1.1.3 (2008-02-0?)
-------------------
-
-- Added 'UI' configuration category
-
-
-1.1.2 (2008-02-04)
-------------------
-
-- Fixed problem with generated class and persistence
-
-- Remove all <grant/> directives
-
-
-1.1.0 (2008-01-31)
-------------------
-
-- Use z3ext.layout for rendering
-
-
-1.0.0 (2007-26-07)
-------------------
-
-- Initial release.

Copied: z3ext.controlpanel/tags/1.2.2/CHANGES.txt (from rev 85156, z3ext.controlpanel/trunk/CHANGES.txt)
===================================================================
--- z3ext.controlpanel/tags/1.2.2/CHANGES.txt	                        (rev 0)
+++ z3ext.controlpanel/tags/1.2.2/CHANGES.txt	2008-04-08 05:15:18 UTC (rev 85157)
@@ -0,0 +1,76 @@
+=======
+CHANGES
+=======
+
+1.2.2 (2008-04-08)
+------------------
+
+- Fix UI navigation
+
+
+1.2.1 (2008-03-28)
+------------------
+
+- Removed 'principals' configlet category
+
+
+1.2.0 (2008-03-21)
+------------------
+
+- Use z3ext.pagelet directive for browser views
+
+- Added i18n
+
+- Moved to svn.zope.org
+
+
+1.1.7 (2008-03-18)
+------------------
+
+- Added functional tests
+
+
+1.1.6 (2008-02-28)
+------------------
+
+- Use z3c.autoinclude
+
+
+1.1.5 (2008-02-22)
+------------------
+
+- Added buildout.cfg for testing
+
+- Added viewlet manager for configlet navigation
+
+
+1.1.4 (2008-02-20)
+------------------
+
+- Use z3ext.layoutform
+
+
+1.1.3 (2008-02-0?)
+------------------
+
+- Added 'UI' configuration category
+
+
+1.1.2 (2008-02-04)
+------------------
+
+- Fixed problem with generated class and persistence
+
+- Remove all <grant/> directives
+
+
+1.1.0 (2008-01-31)
+------------------
+
+- Use z3ext.layout for rendering
+
+
+1.0.0 (2007-26-07)
+------------------
+
+- Initial release.

Modified: z3ext.controlpanel/tags/1.2.2/setup.py
===================================================================
--- z3ext.controlpanel/trunk/setup.py	2008-04-08 03:25:09 UTC (rev 85155)
+++ z3ext.controlpanel/tags/1.2.2/setup.py	2008-04-08 05:15:18 UTC (rev 85157)
@@ -21,7 +21,7 @@
 def read(*rnames):
     return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
 
-version='1.2.2dev'
+version='1.2.2'
 
 
 setup(name = 'z3ext.controlpanel',

Deleted: z3ext.controlpanel/tags/1.2.2/src/z3ext/controlpanel/browser/navigation.py
===================================================================
--- z3ext.controlpanel/trunk/src/z3ext/controlpanel/browser/navigation.py	2008-04-08 03:25:09 UTC (rev 85155)
+++ z3ext.controlpanel/tags/1.2.2/src/z3ext/controlpanel/browser/navigation.py	2008-04-08 05:15:18 UTC (rev 85157)
@@ -1,80 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 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.
-#
-##############################################################################
-"""
-
-$Id$
-"""
-from zope.component import queryMultiAdapter
-from zope.viewlet.manager import ViewletManagerBase
-from z3ext.controlpanel.interfaces import IConfiglet, IRootConfiglet
-
-
-class Navigation(ViewletManagerBase):
-
-    def update(self):
-        super(Navigation, self).update()
-
-        context = self.context
-
-        self.isRoot = IRootConfiglet.providedBy(context)
-        if self.isRoot:
-            return
-
-        path = []
-        parent = context
-        while IConfiglet.providedBy(parent):
-            path.insert(0, parent)
-            parent = parent.__parent__
-
-        self.root, path = path[0], path[1:]
-
-        self.data = self._process(self.root, path)
-
-    def _process(self, context, path, level=1):
-        request = self.request
-
-        if path:
-            data = []
-            for name, configlet in context.items():
-                if not IConfiglet.providedBy(configlet) or \
-                        not configlet.isAvailable():
-                    continue
-
-                info = {'name': name,
-                        'title': configlet.__title__,
-                        'icon': queryMultiAdapter(
-                             (configlet, request), name='zmi_icon'),
-                        'items': (),
-                        'selected': False,
-                        'configlet': configlet,
-                        'level': level}
-
-                if configlet.__id__ == path[0].__id__:
-                    info['items'] = self._process(configlet, path[1:], level+1)
-                
-                if configlet.__id__ == self.context.__id__:
-                    info['selected'] = True
-                    info['items'] = self._process(configlet, [configlet], level+1)
-
-                data.append((configlet.__title__, info))
-
-            data.sort()
-            data = [info for t, info in data]
-            return data
-
-    def render(self):
-        if self.isRoot:
-            return u''
-        else:
-            return super(Navigation, self).render()

Copied: z3ext.controlpanel/tags/1.2.2/src/z3ext/controlpanel/browser/navigation.py (from rev 85156, z3ext.controlpanel/trunk/src/z3ext/controlpanel/browser/navigation.py)
===================================================================
--- z3ext.controlpanel/tags/1.2.2/src/z3ext/controlpanel/browser/navigation.py	                        (rev 0)
+++ z3ext.controlpanel/tags/1.2.2/src/z3ext/controlpanel/browser/navigation.py	2008-04-08 05:15:18 UTC (rev 85157)
@@ -0,0 +1,93 @@
+##############################################################################
+#
+# Copyright (c) 2007 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.
+#
+##############################################################################
+"""
+
+$Id$
+"""
+from zope.component import queryMultiAdapter
+from zope.viewlet.manager import ViewletManagerBase
+from z3ext.controlpanel.interfaces import IConfiglet, IRootConfiglet
+
+
+class Navigation(ViewletManagerBase):
+
+    def update(self):
+        super(Navigation, self).update()
+
+        context = self.context
+
+        # search configlet
+        while not IConfiglet.providedBy(context):
+            context = getattr(context, '__parent__', None)
+            if context is None:
+                break
+
+        if context is not None:
+            self.context = context
+        else:
+            self.data = []
+            self.isRoot = True
+            return
+
+        self.isRoot = IRootConfiglet.providedBy(context)
+        if self.isRoot:
+            return
+
+        path = []
+        parent = context
+        while IConfiglet.providedBy(parent):
+            path.insert(0, parent)
+            parent = parent.__parent__
+
+        self.root, path = path[0], path[1:]
+
+        self.data = self._process(self.root, path)
+
+    def _process(self, context, path, level=1):
+        request = self.request
+
+        if path:
+            data = []
+            for name, configlet in context.items():
+                if not IConfiglet.providedBy(configlet) or \
+                        not configlet.isAvailable():
+                    continue
+
+                info = {'name': name,
+                        'title': configlet.__title__,
+                        'icon': queryMultiAdapter(
+                             (configlet, request), name='zmi_icon'),
+                        'items': (),
+                        'selected': False,
+                        'configlet': configlet,
+                        'level': level}
+
+                if configlet.__id__ == path[0].__id__:
+                    info['items'] = self._process(configlet, path[1:], level+1)
+                
+                if configlet.__id__ == self.context.__id__:
+                    info['selected'] = True
+                    info['items'] = self._process(configlet, [configlet], level+1)
+
+                data.append((configlet.__title__, info))
+
+            data.sort()
+            data = [info for t, info in data]
+            return data
+
+    def render(self):
+        if self.isRoot:
+            return u''
+        else:
+            return super(Navigation, self).render()



More information about the Checkins mailing list