[Zope3-checkins] CVS: Zope3/src/zope/app/wiki/browser -
configure.zcml:1.4 wikipage.py:1.10
Stephan Richter
srichter at cosmos.phy.tufts.edu
Sun Apr 25 12:19:27 EDT 2004
Update of /cvs-repository/Zope3/src/zope/app/wiki/browser
In directory cvs.zope.org:/tmp/cvs-serv20077/src/zope/app/wiki/browser
Modified Files:
configure.zcml wikipage.py
Log Message:
Remove Python code creating custom widgets and replace it with its ZCML
equivalent.
=== Zope3/src/zope/app/wiki/browser/configure.zcml 1.3 => 1.4 ===
--- Zope3/src/zope/app/wiki/browser/configure.zcml:1.3 Wed Mar 17 13:24:28 2004
+++ Zope3/src/zope/app/wiki/browser/configure.zcml Sun Apr 25 12:19:26 2004
@@ -64,7 +64,14 @@
content_factory="zope.app.wiki.wikipage.WikiPage"
permission="zope.app.wiki.AddWikiPage"
fields="source type"
- class=".wikipage.AddWikiPage" />
+ class=".wikipage.AddWikiPage">
+
+ <browser:widget
+ field="type"
+ class="zope.app.renderer.vocabulary.SourceTypeEditWidget" />
+
+ </browser:addform>
+
<browser:addMenuItem
class="zope.app.wiki.wikipage.WikiPage"
@@ -81,7 +88,13 @@
permission="zope.app.wiki.EditWikiPage"
fields="source type"
class=".wikipage.EditWikiPage"
- menu="zmi_views" title="Edit" />
+ menu="zmi_views" title="Edit" >
+
+ <browser:widget
+ field="type"
+ class="zope.app.renderer.vocabulary.SourceTypeEditWidget" />
+
+ </browser:editform>
<browser:pages
for="zope.app.wiki.interfaces.IWikiPage"
@@ -138,7 +151,14 @@
content_factory="zope.app.wiki.wikipage.Comment"
permission="zope.app.wiki.AddWikiPage"
fields="title source type"
- class=".wikipage.AddComment"/>
+ class=".wikipage.AddComment">
+
+ <browser:widget
+ field="type"
+ class="zope.app.renderer.vocabulary.SourceTypeEditWidget" />
+
+ </browser:addform>
+
<browser:addMenuItem
class="zope.app.wiki.wikipage.Comment"
=== Zope3/src/zope/app/wiki/browser/wikipage.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/wiki/browser/wikipage.py:1.9 Sat Apr 24 19:20:30 2004
+++ Zope3/src/zope/app/wiki/browser/wikipage.py Sun Apr 25 12:19:26 2004
@@ -24,9 +24,7 @@
from zope.app import zapi
from zope.app.form.browser.submit import Update
-from zope.app.form import CustomWidgetFactory
from zope.app.dublincore.interfaces import ICMFDublinCore
-from zope.app.renderer.vocabulary import SourceTypeEditWidget
from zope.app.traversing import getParent, getPath, getName
from zope.app.wiki.interfaces import IWikiPageHierarchy, IMailSubscriptions
@@ -97,16 +95,12 @@
class AddWikiPage(object):
- type_widget = CustomWidgetFactory(SourceTypeEditWidget)
-
def nextURL(self):
return '../'+self.context.contentName
class EditWikiPage(object):
- type_widget = CustomWidgetFactory(SourceTypeEditWidget)
-
def update(self):
status = super(EditWikiPage, self).update()
@@ -295,8 +289,6 @@
class AddComment(object):
-
- type_widget = CustomWidgetFactory(SourceTypeEditWidget)
def nextURL(self):
return '../'
More information about the Zope3-Checkins
mailing list