[Checkins] SVN: z3ext.layoutform/tags/1.3.4/ release tag

Nikolay Kim fafhrd at datacom.kz
Fri Apr 3 05:46:13 EDT 2009


Log message for revision 98826:
  release tag

Changed:
  A   z3ext.layoutform/tags/1.3.4/
  D   z3ext.layoutform/tags/1.3.4/CHANGES.txt
  A   z3ext.layoutform/tags/1.3.4/CHANGES.txt
  U   z3ext.layoutform/tags/1.3.4/setup.py
  D   z3ext.layoutform/tags/1.3.4/src/z3ext/layoutform/subform.py
  A   z3ext.layoutform/tags/1.3.4/src/z3ext/layoutform/subform.py
  D   z3ext.layoutform/tags/1.3.4/src/z3ext/layoutform/utils.py
  A   z3ext.layoutform/tags/1.3.4/src/z3ext/layoutform/utils.py

-=-
Deleted: z3ext.layoutform/tags/1.3.4/CHANGES.txt
===================================================================
--- z3ext.layoutform/trunk/CHANGES.txt	2009-04-03 04:08:51 UTC (rev 98805)
+++ z3ext.layoutform/tags/1.3.4/CHANGES.txt	2009-04-03 09:46:12 UTC (rev 98826)
@@ -1,154 +0,0 @@
-=======
-CHANGES
-=======
-
-1.3.3 (2009-03-11)
-------------------
-
-- Added a patched sequence converters that don't raise a LookupError
-  when dealing with values that are removed from the terms. This
-  is fixed in z3c.form's 2.0.0, so it's only needed when using z3c.form
-  1.9.x and below. Include the ``converter.zcml`` file with the
-  ``includeOverrides`` directive, if you need it.
-
-- Added applyChanges method to subform
-
-- Do not insert <form> html tag if form wrapped with other <form>
-
-
-1.3.2 (2009-01-22)
-------------------
-
-- Added missing security declarations
-
-
-1.3.1 (2008-12-25)
-------------------
-
-- Fixed subform initialization
-
-- Fixed IPagelet contract implementation
-
-
-1.3.0 (2008-12-22)
-------------------
-
-- Added subforms based on new z3ext.layout pagelet api
-
-- Fixed 'formError' status message
-
-- Use button.handler instead of buttonAndHandler
-
-- Use new pagelet api for rendering widgets
-
-
-1.2.8 (2008-11-21)
-------------------
-
-- Fixed 'formError' status message
-
-
-1.2.7 (2008-11-20)
-------------------
-
-- Use new z3ext.statusmessage api
-
-
-1.2.6 (2008-11-06)
-------------------
-
-- Use updated pagelet api for nameless pagelets
-
-
-1.2.5 (2008-10-22)
-------------------
-
-- Update translations
-
-
-1.2.4 (2008-10-20)
-------------------
-
-- Added support of display form
-
-- Added tranlsations: nl, ru
-
-
-1.2.3 (2008-10-14)
-------------------
-
-- Groups support restored
-
-- Use IPageletType for views
-
-
-1.2.2 (2008-10-08)
-------------------
-
-- Added extra views for form
-
-
-1.2.1 (2008-10-08)
-------------------
-
-- Show all form errors
-
-
-1.2.0 (2008-10-06)
-------------------
-
-- Added default css styles
-
-- Removed z3c packages dependencies
-
-- Use pagelets instead of macros
-
-
-1.1.2 (2008-09-26)
-------------------
-
-- Added group support
-
-- Return added object in createAndAdd method
-
-
-1.1.1 (2008-08-05)
-------------------
-
-- Fixed wrong `for` in label tag
-
-
-1.1.0 (2008-07-22)
-------------------
-
-- Remove cancel button from edit form
-
-
-1.0.1 (2008-06-02)
-------------------
-
-- Redirect to nextURL after success 'apply'
-
-
-1.0.0 (2008-05-13)
-------------------
-
-- Use `includeDependencies` instead `autoinclude`
-
-
-0.2.0 (2008-??-??)
-------------------
-
-- Use z3c.autoinclude
-
-
-0.1.1 (2008-01-22)
-------------------
-
-- Fixed missing import in add.py
-
-
-0.1 (2008-01-19)
-----------------
-
-- Initial release

Copied: z3ext.layoutform/tags/1.3.4/CHANGES.txt (from rev 98825, z3ext.layoutform/trunk/CHANGES.txt)
===================================================================
--- z3ext.layoutform/tags/1.3.4/CHANGES.txt	                        (rev 0)
+++ z3ext.layoutform/tags/1.3.4/CHANGES.txt	2009-04-03 09:46:12 UTC (rev 98826)
@@ -0,0 +1,161 @@
+=======
+CHANGES
+=======
+
+
+1.3.4 (2009-04-03)
+------------------
+
+- Added changed attributes descriptions to ObjectModifiedEvent for subform
+
+
+1.3.3 (2009-03-11)
+------------------
+
+- Added a patched sequence converters that don't raise a LookupError
+  when dealing with values that are removed from the terms. This
+  is fixed in z3c.form's 2.0.0, so it's only needed when using z3c.form
+  1.9.x and below. Include the ``converter.zcml`` file with the
+  ``includeOverrides`` directive, if you need it.
+
+- Added applyChanges method to subform
+
+- Do not insert <form> html tag if form wrapped with other <form>
+
+
+1.3.2 (2009-01-22)
+------------------
+
+- Added missing security declarations
+
+
+1.3.1 (2008-12-25)
+------------------
+
+- Fixed subform initialization
+
+- Fixed IPagelet contract implementation
+
+
+1.3.0 (2008-12-22)
+------------------
+
+- Added subforms based on new z3ext.layout pagelet api
+
+- Fixed 'formError' status message
+
+- Use button.handler instead of buttonAndHandler
+
+- Use new pagelet api for rendering widgets
+
+
+1.2.8 (2008-11-21)
+------------------
+
+- Fixed 'formError' status message
+
+
+1.2.7 (2008-11-20)
+------------------
+
+- Use new z3ext.statusmessage api
+
+
+1.2.6 (2008-11-06)
+------------------
+
+- Use updated pagelet api for nameless pagelets
+
+
+1.2.5 (2008-10-22)
+------------------
+
+- Update translations
+
+
+1.2.4 (2008-10-20)
+------------------
+
+- Added support of display form
+
+- Added tranlsations: nl, ru
+
+
+1.2.3 (2008-10-14)
+------------------
+
+- Groups support restored
+
+- Use IPageletType for views
+
+
+1.2.2 (2008-10-08)
+------------------
+
+- Added extra views for form
+
+
+1.2.1 (2008-10-08)
+------------------
+
+- Show all form errors
+
+
+1.2.0 (2008-10-06)
+------------------
+
+- Added default css styles
+
+- Removed z3c packages dependencies
+
+- Use pagelets instead of macros
+
+
+1.1.2 (2008-09-26)
+------------------
+
+- Added group support
+
+- Return added object in createAndAdd method
+
+
+1.1.1 (2008-08-05)
+------------------
+
+- Fixed wrong `for` in label tag
+
+
+1.1.0 (2008-07-22)
+------------------
+
+- Remove cancel button from edit form
+
+
+1.0.1 (2008-06-02)
+------------------
+
+- Redirect to nextURL after success 'apply'
+
+
+1.0.0 (2008-05-13)
+------------------
+
+- Use `includeDependencies` instead `autoinclude`
+
+
+0.2.0 (2008-??-??)
+------------------
+
+- Use z3c.autoinclude
+
+
+0.1.1 (2008-01-22)
+------------------
+
+- Fixed missing import in add.py
+
+
+0.1 (2008-01-19)
+----------------
+
+- Initial release

Modified: z3ext.layoutform/tags/1.3.4/setup.py
===================================================================
--- z3ext.layoutform/trunk/setup.py	2009-04-03 04:08:51 UTC (rev 98805)
+++ z3ext.layoutform/tags/1.3.4/setup.py	2009-04-03 09:46:12 UTC (rev 98826)
@@ -21,7 +21,7 @@
 def read(*rnames):
     return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
 
-version='1.3.4dev'
+version='1.3.4'
 
 
 setup(name='z3ext.layoutform',

Deleted: z3ext.layoutform/tags/1.3.4/src/z3ext/layoutform/subform.py
===================================================================
--- z3ext.layoutform/trunk/src/z3ext/layoutform/subform.py	2009-04-03 04:08:51 UTC (rev 98805)
+++ z3ext.layoutform/tags/1.3.4/src/z3ext/layoutform/subform.py	2009-04-03 09:46:12 UTC (rev 98826)
@@ -1,84 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2008 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:  2007-12-12 12:27:02Z fafhrd $
-"""
-from zope import interface, event
-from zope.component import queryMultiAdapter
-from zope.traversing.browser import absoluteURL
-from zope.lifecycleevent import ObjectModifiedEvent
-
-from z3c.form import subform, button
-from z3c.form.interfaces import ISubForm, IActionHandler
-from z3ext.statusmessage.interfaces import IStatusMessage
-
-from utils import applyChanges
-from form import PageletBaseForm
-from interfaces import _, IPageletEditSubForm, IPageletSubform, ISaveAction
-
-
-class PageletEditSubForm(subform.EditSubForm, PageletBaseForm):
-    interface.implements(IPageletEditSubForm)
-
-    label = u''
-    description = u''
-
-    render = PageletBaseForm.render
-    __call__ = PageletBaseForm.__call__
-
-    def __init__(self, context, parentForm, request):
-        super(PageletEditSubForm, self).__init__(context, request, parentForm)
-
-    def applyChanges(self, data):
-        return applyChanges(self, self.getContent(), data)
-
-    @button.handler(ISaveAction)
-    def handleApply(self, action):
-        data, errors = self.extractData()
-        if errors:
-            IStatusMessage(self.request).add(
-                (self.formErrorsMessage,) + errors, 'formError')
-        else:
-            if self.applyChanges(data):
-                event.notify(ObjectModifiedEvent(self.getContent()))
-
-    def executeActions(self, form):
-        request = self.request
-        content = self.getContent()
-
-        if hasattr(form, 'actions'):
-            for action in form.actions.executedActions:
-                adapter = queryMultiAdapter(
-                    (self, request, content, action), IActionHandler)
-                if adapter:
-                    adapter()
-
-        if ISubForm.providedBy(form):
-            self.executeActions(form.parentForm)
-
-        elif IPageletSubform.providedBy(form) and form.managers:
-            self.executeActions(form.managers[0])
-
-    def update(self):
-        self.updateWidgets()
-
-        if not IPageletSubform.providedBy(self):
-            self.executeActions(self.parentForm)
-
-    def isAvailable(self):
-        return True
-
-    def postUpdate(self):
-        self.executeActions(self.parentForm)

Copied: z3ext.layoutform/tags/1.3.4/src/z3ext/layoutform/subform.py (from rev 98825, z3ext.layoutform/trunk/src/z3ext/layoutform/subform.py)
===================================================================
--- z3ext.layoutform/tags/1.3.4/src/z3ext/layoutform/subform.py	                        (rev 0)
+++ z3ext.layoutform/tags/1.3.4/src/z3ext/layoutform/subform.py	2009-04-03 09:46:12 UTC (rev 98826)
@@ -0,0 +1,89 @@
+##############################################################################
+#
+# Copyright (c) 2008 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:  2007-12-12 12:27:02Z fafhrd $
+"""
+from zope import interface, event
+from zope.component import queryMultiAdapter
+from zope.traversing.browser import absoluteURL
+from zope.lifecycleevent import Attributes, ObjectModifiedEvent
+
+from z3c.form import subform, button
+from z3c.form.interfaces import ISubForm, IActionHandler
+from z3ext.statusmessage.interfaces import IStatusMessage
+
+from utils import applyChanges
+from form import PageletBaseForm
+from interfaces import _, IPageletEditSubForm, IPageletSubform, ISaveAction
+
+
+class PageletEditSubForm(subform.EditSubForm, PageletBaseForm):
+    interface.implements(IPageletEditSubForm)
+
+    label = u''
+    description = u''
+
+    render = PageletBaseForm.render
+    __call__ = PageletBaseForm.__call__
+
+    def __init__(self, context, parentForm, request):
+        super(PageletEditSubForm, self).__init__(context, request, parentForm)
+
+    def applyChanges(self, data):
+        return applyChanges(self, self.getContent(), data)
+
+    @button.handler(ISaveAction)
+    def handleApply(self, action):
+        data, errors = self.extractData()
+        if errors:
+            IStatusMessage(self.request).add(
+                (self.formErrorsMessage,) + errors, 'formError')
+        else:
+            changes = self.applyChanges(data)
+            if changes:
+                descriptions = []
+                for interface, names in changes.items():
+                    descriptions.append(Attributes(interface, *names))
+
+                event.notify(ObjectModifiedEvent(self.getContent(), *descriptions))
+
+    def executeActions(self, form):
+        request = self.request
+        content = self.getContent()
+
+        if hasattr(form, 'actions'):
+            for action in form.actions.executedActions:
+                adapter = queryMultiAdapter(
+                    (self, request, content, action), IActionHandler)
+                if adapter:
+                    adapter()
+
+        if ISubForm.providedBy(form):
+            self.executeActions(form.parentForm)
+
+        elif IPageletSubform.providedBy(form) and form.managers:
+            self.executeActions(form.managers[0])
+
+    def update(self):
+        self.updateWidgets()
+
+        if not IPageletSubform.providedBy(self):
+            self.executeActions(self.parentForm)
+
+    def isAvailable(self):
+        return True
+
+    def postUpdate(self):
+        self.executeActions(self.parentForm)

Deleted: z3ext.layoutform/tags/1.3.4/src/z3ext/layoutform/utils.py
===================================================================
--- z3ext.layoutform/trunk/src/z3ext/layoutform/utils.py	2009-04-03 04:08:51 UTC (rev 98805)
+++ z3ext.layoutform/tags/1.3.4/src/z3ext/layoutform/utils.py	2009-04-03 09:46:12 UTC (rev 98826)
@@ -1,47 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2008 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:  2007-12-12 12:27:02Z fafhrd $
-"""
-from zope.component import getMultiAdapter
-from z3c.form.interfaces import IDataManager
-
-
-def applyChanges(form, content, data):
-    changes = {}
-    for name, field in form.fields.items():
-        # If the field is not in the data, then go on to the next one
-        if name not in data:
-            continue
-
-        # Get the datamanager and get the original value
-        dm = getMultiAdapter((content, field.field), IDataManager)
-        # Only update the data, if it is different
-        try:
-            value = dm.get()
-        except:
-            value = object()
-
-        try:
-            updated = value != data[name]
-        except TypeError:
-            updated = True
-
-        if updated:
-            dm.set(data[name])
-            # Record the change using information required later
-            changes.setdefault(dm.field.interface, []).append(name)
-
-    return changes

Copied: z3ext.layoutform/tags/1.3.4/src/z3ext/layoutform/utils.py (from rev 98825, z3ext.layoutform/trunk/src/z3ext/layoutform/utils.py)
===================================================================
--- z3ext.layoutform/tags/1.3.4/src/z3ext/layoutform/utils.py	                        (rev 0)
+++ z3ext.layoutform/tags/1.3.4/src/z3ext/layoutform/utils.py	2009-04-03 09:46:12 UTC (rev 98826)
@@ -0,0 +1,48 @@
+##############################################################################
+#
+# Copyright (c) 2008 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:  2007-12-12 12:27:02Z fafhrd $
+"""
+from zope.component import getMultiAdapter
+from z3c.form.interfaces import IDataManager
+
+
+def applyChanges(form, content, data):
+    changes = {}
+    for name, field in form.fields.items():
+        # If the field is not in the data, then go on to the next one
+        if name not in data:
+            continue
+
+        # Get the datamanager and get the original value
+        dm = getMultiAdapter((content, field.field), IDataManager)
+
+        # Only update the data, if it is different
+        try:
+            value = dm.get()
+        except:
+            value = object()
+
+        try:
+            updated = value != data[name]
+        except TypeError:
+            updated = True
+
+        if updated:
+            dm.set(data[name])
+            # Record the change using information required later
+            changes.setdefault(dm.field.interface, []).append(name)
+
+    return changes



More information about the Checkins mailing list