Author: jmorliaguet Date: Tue Oct 18 01:48:33 2005 New Revision: 28373 Modified: z3lab/z3ecm/trunk/src/ecm/cpsskins/example2/text.py z3lab/z3ecm/trunk/src/ecm/cpsskins/example3/items.py z3lab/z3ecm/trunk/src/ecm/cpsskins/example4/actions.py Log:
- fixes / simplifications 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 Tue Oct 18 01:48:33 2005 @@ -23,19 +23,20 @@ from cpsskins.elements.portlet import Portlet class ITextPortlet(IPortlet): - """Interface for the Text portlet""" - -class TextPortlet(Portlet): - """The Text portlet displays some text entered by the user. - + """Interface for the Text portlet. """ text = Text( title=_("Some text"), ) +class TextPortlet(Portlet): + """The Text portlet displays some text entered by the user. + """ + def __init__(self, text=''): + self.text = text + class TextPortletData(object): """The portlet returns the text entered by the user. - """ def __init__(self, portlet, info): self.portlet = portlet @@ -43,4 +44,3 @@ def __call__(self, **kw): return self.portlet.text - 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 Tue Oct 18 01:48:33 2005 @@ -22,11 +22,11 @@ from cpsskins.model import Items, Item class IItemsPortlet(IPortlet): - """Interface for the Items portlet""" + """Interface for the Items portlet. + """ class ItemsPortlet(Portlet): """The Items portlet returns a list of items. - """ class ItemsPortletData(object): 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 Tue Oct 18 01:48:33 2005 @@ -25,19 +25,16 @@ from cpsskins.model import Items, Item class IActionsPortlet(IPortlet): - """Interface for the actions portlet""" - + """Interface for the actions portlet. + """ category = TextLine( title=u"Category", ) class ActionsPortlet(Portlet): """The actions portlet returns a list of items. - """ - - def __init__(self, category='zmi_actions', **kw): - Portlet.__init__(self, **kw) + def __init__(self, category='zmi_actions'): self.category = category class ActionsPortletData(object): @@ -47,8 +44,6 @@ """ def __init__(self, portlet, info): - self.portlet = portlet - self.info = info try: menu = getMenu(portlet.category, info.location, info.request) -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins