[Zope3-checkins] CVS: zopeproducts/photo/browser - photo.py:1.2
Philipp von Weitershausen
philikon at philikon.de
Thu Feb 19 04:45:59 EST 2004
Update of /cvs-repository/zopeproducts/photo/browser
In directory cvs.zope.org:/tmp/cvs-serv17185/browser
Modified Files:
photo.py
Log Message:
CustomWidget -> CustomWidgetFactory
=== zopeproducts/photo/browser/photo.py 1.1 => 1.2 ===
--- zopeproducts/photo/browser/photo.py:1.1 Fri Aug 15 08:10:48 2003
+++ zopeproducts/photo/browser/photo.py Thu Feb 19 04:45:58 2004
@@ -16,7 +16,12 @@
$Id$
"""
+from zope.publisher.browser import BrowserView
from zope.app.browser.content.image import ImageData
+from zope.app.browser.form.widget import FileWidget, ListWidget
+from zope.app.form.widget import CustomWidgetFactory
+
+from zopeproducts.photo import Photo
class PhotoData(ImageData):
@@ -43,36 +48,26 @@
return super(PhotoData, self).tag(height, width, alt, scale,
xscale, yscale, css_class, **args)
-
-from zope.app.browser.form.widget import FileWidget, ListWidget
-from zope.app.form.widget import CustomWidget
-from zope.publisher.browser import BrowserView
-
-from zopeproducts.photo import Photo
-
class CurrentDisplayIdFix:
"""Changes the currentIdDisplay widget to be a ListWidget.
This way we don't get the values sorted and can specify a
text which represents each value.
"""
- currentDisplayId_widget = CustomWidget(ListWidget, size=1)
+ currentDisplayId_widget = CustomWidgetFactory(ListWidget, size=1)
class PhotoAdd(CurrentDisplayIdFix):
"""Class to change some of the widgets om the add page for
the Photo class.
"""
- data_widget = CustomWidget(FileWidget)
+ data_widget = CustomWidgetFactory(FileWidget)
class PhotoEdit(CurrentDisplayIdFix):
"""Class to change som of the widgets on the edit page for
the Photo class.
"""
-
- data_widget = CustomWidget(FileWidget)
+ data_widget = CustomWidgetFactory(FileWidget)
class PhotoUpload(PhotoEdit):
"""The same as PhotoEdit but we can now upload a file as well"""
- data_widget = CustomWidget(FileWidget)
-
-
+ data_widget = CustomWidgetFactory(FileWidget)
More information about the Zope3-Checkins
mailing list