[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form - add.py:1.31 editview.py:1.37 vocabularywidget.py:1.57

Sidnei da Silva sidnei at x3ng.com.br
Thu Aug 28 19:40:26 EDT 2003


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

Modified Files:
	add.py editview.py vocabularywidget.py 
Log Message:
Protect publishTraverse as well, so it's actually possible to traverse from the add/edit view. Moved 'extra' for the vocabulary widget from the outer div to the inner <select>, so you can actually use stuff like 'onchange='somefunction()''. It was not really useful otherwise.

=== Zope3/src/zope/app/browser/form/add.py 1.30 => 1.31 ===
--- Zope3/src/zope/app/browser/form/add.py:1.30	Fri Aug 15 20:42:49 2003
+++ Zope3/src/zope/app/browser/form/add.py	Thu Aug 28 18:40:25 2003
@@ -155,7 +155,8 @@
 
     defineChecker(class_,
                   NamesChecker(
-                    ("__call__", "__getitem__", "browserDefault"),
+                    ("__call__", "__getitem__",
+                     "browserDefault", "publishTraverse"),
                     permission,
                     )
                   )


=== Zope3/src/zope/app/browser/form/editview.py 1.36 => 1.37 ===
--- Zope3/src/zope/app/browser/form/editview.py:1.36	Mon Aug 18 14:50:44 2003
+++ Zope3/src/zope/app/browser/form/editview.py	Thu Aug 28 18:40:25 2003
@@ -133,7 +133,8 @@
         menu and globalBrowserMenuService.getMenuUsage(menu))
 
     defineChecker(class_,
-                  NamesChecker(("__call__", "__getitem__", "browserDefault"),
+                  NamesChecker(("__call__", "__getitem__",
+                                "browserDefault", "publishTraverse"),
                                permission))
 
     provideView(for_, name, IBrowserPresentation, class_, layer)


=== Zope3/src/zope/app/browser/form/vocabularywidget.py 1.56 => 1.57 ===
--- Zope3/src/zope/app/browser/form/vocabularywidget.py:1.56	Mon Aug 25 10:30:27 2003
+++ Zope3/src/zope/app/browser/form/vocabularywidget.py	Thu Aug 28 18:40:25 2003
@@ -436,8 +436,7 @@
             if s:
                 contents.append(self._div('queryinput', s))
         return self._div(self.getValue('cssClass'), "\n".join(contents),
-                         id=self.name,
-                         extra=self.getValue('extra'))
+                         id=self.name)
 
     def _div(self, cssClass, contents, **kw):
         if contents:
@@ -508,7 +507,8 @@
         return widget.renderElement('select',
                                     name=self.name,
                                     contents=contents,
-                                    size=self.getValue('size'))
+                                    size=self.getValue('size'),
+                                    extra=self.getValue('extra'))
 
     def renderItems(self, value):
         vocabulary = self.context.vocabulary
@@ -555,7 +555,8 @@
                                     name=self.name + ':list',
                                     multiple=None,
                                     size=self.getValue('size'),
-                                    contents="\n".join(rendered_items))
+                                    contents="\n".join(rendered_items),
+                                    extra=self.getValue('extra'))
 
 
 class VocabularyQueryViewBase(ActionHelper, ViewSupport, BrowserView):




More information about the Zope3-Checkins mailing list