[Zope3-checkins] CVS: Zope3/src/zope/app/file/browser - configure.zcml:1.6 file.py:1.7

Stephan Richter srichter at cosmos.phy.tufts.edu
Sun Apr 25 12:19:56 EDT 2004


Update of /cvs-repository/Zope3/src/zope/app/file/browser
In directory cvs.zope.org:/tmp/cvs-serv20077/src/zope/app/file/browser

Modified Files:
	configure.zcml file.py 
Log Message:


Remove Python code creating custom widgets and replace it with its ZCML
equivalent.


=== Zope3/src/zope/app/file/browser/configure.zcml 1.5 => 1.6 ===
--- Zope3/src/zope/app/file/browser/configure.zcml:1.5	Tue Mar 23 17:08:05 2004
+++ Zope3/src/zope/app/file/browser/configure.zcml	Sun Apr 25 12:19:26 2004
@@ -19,8 +19,13 @@
       schema="zope.app.file.interfaces.IFile"
       label="Change a file"
       permission="zope.ManageContent" 
-      class=".file.FileTextEdit" 
-      />
+      >
+
+    <widget
+        field="data"
+        class="zope.app.form.browser.BytesAreaWidget" />
+
+  </browser:editform>
 
   <browser:menuItem
       menu="zmi_views" title="Edit"


=== Zope3/src/zope/app/file/browser/file.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/file/browser/file.py:1.6	Thu Mar 18 22:17:39 2004
+++ Zope3/src/zope/app/file/browser/file.py	Sun Apr 25 12:19:26 2004
@@ -15,9 +15,6 @@
 
 $Id$
 """
-from zope.app.form.browser import BytesAreaWidget
-from zope.app.form import CustomWidgetFactory
-
 class FileView(object):
 
     def show(self):
@@ -30,10 +27,3 @@
                                        self.context.getSize())
 
         return self.context.data
-
-
-class FileTextEdit(object):
-    """File editing mix-in that uses a file-upload widget.
-    """
-
-    data_widget = CustomWidgetFactory(BytesAreaWidget)




More information about the Zope3-Checkins mailing list