Author: jmorliaguet
Date: Mon Oct 17 23:19:07 2005
New Revision: 28371

Modified:
   z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/configure.zcml
   z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/hello.py
   z3lab/z3ecm/trunk/src/ecm/cpsskins/example2/configure.zcml
   z3lab/z3ecm/trunk/src/ecm/cpsskins/example2/text.py
   z3lab/z3ecm/trunk/src/ecm/cpsskins/example3/configure.zcml
   z3lab/z3ecm/trunk/src/ecm/cpsskins/example3/items.py
   z3lab/z3ecm/trunk/src/ecm/cpsskins/example4/actions.py
   z3lab/z3ecm/trunk/src/ecm/cpsskins/example4/configure.zcml
Log:

- we register implements() / adapts() in zcml



Modified: z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/configure.zcml
==============================================================================
--- z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/configure.zcml  (original)
+++ z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/configure.zcml  Mon Oct 17 
23:19:07 2005
@@ -12,6 +12,7 @@
       description="A hello world"
       factory=".hello.HelloPortlet"
       schema=".hello.IHelloPortlet"
+      data=".hello.HelloDisplayData"
       icon="hello-icon.png"
   />
 

Modified: z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/hello.py
==============================================================================
--- z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/hello.py        (original)
+++ z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/hello.py        Mon Oct 17 
23:19:07 2005
@@ -17,10 +17,6 @@
 """
 __docformat__ = "reStructuredText"
 
-from zope.component import adapts
-from zope.interface import implements
-
-from cpsskins.browser.rendering.interfaces import IContextInfo, IDisplayData
 from cpsskins.elements.interfaces import IPortlet
 from cpsskins.elements.portlet import Portlet
 
@@ -32,14 +28,10 @@
 
     It is not configurable.
     """
-    implements(IHelloPortlet)
 
 class HelloDisplayData(object):
     """The portlet returns 'Hello world'.
     """
-    adapts(IHelloPortlet, IContextInfo)
-    implements(IDisplayData)
-
     def __call__(self, **kw):
         return 'Hello world'
 

Modified: z3lab/z3ecm/trunk/src/ecm/cpsskins/example2/configure.zcml
==============================================================================
--- z3lab/z3ecm/trunk/src/ecm/cpsskins/example2/configure.zcml  (original)
+++ z3lab/z3ecm/trunk/src/ecm/cpsskins/example2/configure.zcml  Mon Oct 17 
23:19:07 2005
@@ -12,6 +12,7 @@
       description="A simple text portlet"
       factory=".text.TextPortlet"
       schema=".text.ITextPortlet"
+      data=".text.TextDisplayData"
       icon="text-icon.png"
   />
 

Modified: z3lab/z3ecm/trunk/src/ecm/cpsskins/example2/text.py
==============================================================================
--- z3lab/z3ecm/trunk/src/ecm/cpsskins/example2/text.py (original)
+++ z3lab/z3ecm/trunk/src/ecm/cpsskins/example2/text.py Mon Oct 17 23:19:07 2005
@@ -17,11 +17,8 @@
 """
 __docformat__ = "reStructuredText"
 
-from zope.component import adapts
-from zope.interface import implements
 from zope.schema import Text
 
-from cpsskins.browser.rendering.interfaces import IContextInfo, IDisplayData
 from cpsskins.elements.interfaces import IPortlet
 from cpsskins.elements.portlet import Portlet
 
@@ -32,18 +29,14 @@
     """The Text portlet displays some text entered by the user.
 
     """
-    implements(ITextPortlet)
-
     text = Text(
         title=_("Some text"),
         )
 
 class TextDisplayData(object):
     """The portlet returns the text entered by the user.
-    """
-    adapts(ITextPortlet, IContextInfo)
-    implements(IDisplayData)
 
+    """
     def __init__(self, portlet, info):
         self.portlet = portlet
         self.info = info

Modified: z3lab/z3ecm/trunk/src/ecm/cpsskins/example3/configure.zcml
==============================================================================
--- z3lab/z3ecm/trunk/src/ecm/cpsskins/example3/configure.zcml  (original)
+++ z3lab/z3ecm/trunk/src/ecm/cpsskins/example3/configure.zcml  Mon Oct 17 
23:19:07 2005
@@ -12,6 +12,7 @@
       description="A portlet that returns a list of items"
       factory=".items.ItemsPortlet"
       schema=".items.IItemsPortlet"
+      data=".items.ItemsDisplayData"
       icon="items-icon.png"
   />
 

Modified: z3lab/z3ecm/trunk/src/ecm/cpsskins/example3/items.py
==============================================================================
--- z3lab/z3ecm/trunk/src/ecm/cpsskins/example3/items.py        (original)
+++ z3lab/z3ecm/trunk/src/ecm/cpsskins/example3/items.py        Mon Oct 17 
23:19:07 2005
@@ -17,10 +17,6 @@
 """
 __docformat__ = "reStructuredText"
 
-from zope.component import adapts
-from zope.interface import implements
-
-from cpsskins.browser.rendering.interfaces import IContextInfo, IDisplayData
 from cpsskins.elements.interfaces import IPortlet
 from cpsskins.elements.portlet import Portlet
 from cpsskins.model import Items, Item
@@ -32,15 +28,12 @@
     """The Items portlet returns a list of items.
 
     """
-    implements(IItemsPortlet)
 
 class ItemsDisplayData(object):
     """The portlet creates a list of predefined items.
 
     The list of items can be used by some widget to produce HTML.
     """
-    adapts(IItemsPortlet, IContextInfo)
-    implements(IDisplayData)
 
     def __init__(self, portlet, info):
         self.portlet = portlet

Modified: z3lab/z3ecm/trunk/src/ecm/cpsskins/example4/actions.py
==============================================================================
--- z3lab/z3ecm/trunk/src/ecm/cpsskins/example4/actions.py      (original)
+++ z3lab/z3ecm/trunk/src/ecm/cpsskins/example4/actions.py      Mon Oct 17 
23:19:07 2005
@@ -18,11 +18,8 @@
 __docformat__ = "reStructuredText"
 
 from zope.app.publisher.browser.menu import getMenu
-from zope.component import adapts
-from zope.interface import implements
 from zope.schema import TextLine
 
-from cpsskins.browser.rendering.interfaces import IContextInfo, IDisplayData
 from cpsskins.elements.interfaces import IPortlet
 from cpsskins.elements.portlet import Portlet
 from cpsskins.model import Items, Item
@@ -38,7 +35,6 @@
     """The actions portlet returns a list of items.
 
     """
-    implements(IActionsPortlet)
 
     def __init__(self, category='zmi_actions', **kw):
         Portlet.__init__(self, **kw)
@@ -49,8 +45,6 @@
 
     The list of items can be used by some widget to produce HTML.
     """
-    adapts(IActionsPortlet, IContextInfo)
-    implements(IDisplayData)
 
     def __init__(self, portlet, info):
         self.portlet = portlet

Modified: z3lab/z3ecm/trunk/src/ecm/cpsskins/example4/configure.zcml
==============================================================================
--- z3lab/z3ecm/trunk/src/ecm/cpsskins/example4/configure.zcml  (original)
+++ z3lab/z3ecm/trunk/src/ecm/cpsskins/example4/configure.zcml  Mon Oct 17 
23:19:07 2005
@@ -12,6 +12,7 @@
       description="A portlet that returns a list of actions items"
       factory=".actions.ActionsPortlet"
       schema=".actions.IActionsPortlet"
+      data=".actions.ActionsDisplayData"
       icon="actions-icon.png"
   />
 
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to