[Zope3-checkins] CVS: Zope3/src/zope/app/browser/skins/rotterdam - editingwidgets.py:1.4.34.1

Garrett Smith garrett at mojave-corp.com
Thu Feb 26 00:11:23 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/browser/skins/rotterdam
In directory cvs.zope.org:/tmp/cvs-serv25181/src/zope/app/browser/skins/rotterdam

Modified Files:
      Tag: garrett-widgets2-branch
	editingwidgets.py 
Log Message:
Yet another branch for widgets refactoring (YABFWR).


=== Zope3/src/zope/app/browser/skins/rotterdam/editingwidgets.py 1.4 => 1.4.34.1 ===
--- Zope3/src/zope/app/browser/skins/rotterdam/editingwidgets.py:1.4	Thu Aug 21 10:19:22 2003
+++ Zope3/src/zope/app/browser/skins/rotterdam/editingwidgets.py	Thu Feb 26 00:10:52 2004
@@ -16,12 +16,15 @@
 """
 __metaclass__ = type
 
+from zope.interface import implements
+from zope.app.interfaces.form import IEditWidget
 from zope.app.browser.form.widget import BrowserWidget, renderElement
 from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
 
 class SimpleEditingWidget(BrowserWidget):
     """Improved textarea editing, with async saving using JavaScript."""
-    propertyNames = BrowserWidget.propertyNames + ['width', 'height', 'extra']
+
+    implements(IEditWidget)
 
     default = ""
     width = 60
@@ -40,12 +43,12 @@
         return renderElement("textarea",
                              name = self.name,
                              id = self.name,
-                             cssClass = self.getValue('cssClass'),
-                             rows = self.getValue('height'),
-                             cols = self.getValue('width'),
+                             cssClass=self.cssClass,
+                             rows=self.height,
+                             cols=self.width,
                              style = self.style,
                              contents = self._showData(),
-                             extra = self.getValue('extra'))
+                             extra=self.extra)
 
     def contents(self):
         """Make the contents available to the template"""




More information about the Zope3-Checkins mailing list