[Zope3-checkins] CVS: Zope3/src/zope/app/browser/content -
configure.zcml:1.47 file.py:1.6 image.py:1.7
Jim Fulton
jim at zope.com
Wed Feb 4 14:17:16 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/browser/content
In directory cvs.zope.org:/tmp/cvs-serv25641/src/zope/app/browser/content
Modified Files:
configure.zcml file.py image.py
Log Message:
Updated the file and image editing views to reflect
recent changes in Bytes-feild widgets.
At the Bangalore sprint, we made a file-upload widget
the default widget for Bytes fields. This makes a lot
more sense than usssing a text area. Unfortunately, we
didn't adjust the file and image editing views accordingly.
=== Zope3/src/zope/app/browser/content/configure.zcml 1.46 => 1.47 ===
--- Zope3/src/zope/app/browser/content/configure.zcml:1.46 Fri Dec 19 11:53:14 2003
+++ Zope3/src/zope/app/browser/content/configure.zcml Wed Feb 4 14:17:16 2004
@@ -11,7 +11,9 @@
schema="zope.app.interfaces.content.file.IFile"
label="Change a file"
usage="objectview"
- permission="zope.ManageContent" />
+ permission="zope.ManageContent"
+ class=".file.FileTextEdit"
+ />
<menuItem
menu="zmi_views" title="Edit"
@@ -27,7 +29,7 @@
schema="zope.app.interfaces.content.file.IFile"
label="Upload a file"
permission="zope.ManageContent"
- class=".file.FileUpload" />
+ />
<page
for="zope.app.interfaces.content.file.IFile"
=== Zope3/src/zope/app/browser/content/file.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/browser/content/file.py:1.5 Fri Jan 16 08:09:06 2004
+++ Zope3/src/zope/app/browser/content/file.py Wed Feb 4 14:17:16 2004
@@ -15,7 +15,7 @@
$Id$
"""
-from zope.app.browser.form.widget import FileWidget
+from zope.app.browser.form.widget import BytesAreaWidget
from zope.app.form.widget import CustomWidgetFactory
__metaclass__ = type
@@ -34,7 +34,7 @@
return self.context.getData()
-class FileUpload:
+class FileTextEdit:
"""File editing mix-in that uses a file-upload widget."""
- data_widget = CustomWidgetFactory(FileWidget)
+ data_widget = CustomWidgetFactory(BytesAreaWidget)
=== Zope3/src/zope/app/browser/content/image.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/browser/content/image.py:1.6 Sun Sep 21 13:30:22 2003
+++ Zope3/src/zope/app/browser/content/image.py Wed Feb 4 14:17:16 2004
@@ -15,7 +15,6 @@
$Id$
"""
-from zope.app.browser.content.file import FileUpload
from zope.app.size import byteDisplay
from zope.app.event.objectevent import ObjectModifiedEvent
from zope.app.event import publish
@@ -86,7 +85,7 @@
return '%s />' % result
-class ImageUpload(FileUpload):
+class ImageUpload:
"""Image edit view mix-in that provides access to image size info"""
def size(self):
More information about the Zope3-Checkins
mailing list