[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Content/Image/Views/Browser - ImageUpload.py:1.2
runyaga
runyaga@thisbox.com
Tue, 3 Dec 2002 08:56:06 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Content/Image/Views/Browser
In directory cvs.zope.org:/tmp/cvs-serv16400/Views/Browser
Modified Files:
ImageUpload.py
Log Message:
ImageUpload needs to publish that its been modified. The EditView
in its update calls apply_update() which is defined on ImageUpload
and since its this service that publishes the Modification Event
the ImageUpload view becomes responsible.
=== Zope3/lib/python/Zope/App/OFS/Content/Image/Views/Browser/ImageUpload.py 1.1 => 1.2 ===
--- Zope3/lib/python/Zope/App/OFS/Content/Image/Views/Browser/ImageUpload.py:1.1 Mon Nov 11 16:08:13 2002
+++ Zope3/lib/python/Zope/App/OFS/Content/Image/Views/Browser/ImageUpload.py Tue Dec 3 08:56:05 2002
@@ -16,6 +16,8 @@
$Id$
"""
from Zope.App.OFS.Content.File.Views.Browser.FileUpload import FileUpload
+from Zope.Event import publish
+from Zope.Event.ObjectEvent import ObjectModifiedEvent
class ImageUpload(FileUpload):
"""Image edit view mix-in that provides access to image size info"""
@@ -47,5 +49,9 @@
if 'data' in data:
self.context.data = data['data']
unchanged = False
+
+ if not unchanged:
+ import pdb; pdb.set_trace()
+ publish(self.context, ObjectModifiedEvent(self.context))
return unchanged