[Zope3-checkins] CVS: Zope3/src/zope/app/browser/skins/rotterdam -
editingwidgets.py:1.4
Stephan Richter
srichter at cosmos.phy.tufts.edu
Thu Aug 21 11:19:53 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/browser/skins/rotterdam
In directory cvs.zope.org:/tmp/cvs-serv8485/src/zope/app/browser/skins/rotterdam
Modified Files:
editingwidgets.py
Log Message:
Final HEAD checkin of "Inline Code Support in TAL". For detailed messages
during the development, see "srichter-inlinepython-branch". I tested the
code with both, Python 2.2.3 and Python 2.3 and all works fine.
Here an example of what you can do:
<script type="text/server-python">
print "Hello World!"
</script>
and
<p tal:script="text/server-python">
print "Hello World!"
</p>
A more elaborate example would be:
<html><body>
<script type="text/server-python">
global x
x = "Hello World!"
</script>
<b tal:content="x" />
</body></html>
This support is currently only available in "Templated Pages" after you
activate the hook using the "Inline Code" screen.
=== Zope3/src/zope/app/browser/skins/rotterdam/editingwidgets.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/browser/skins/rotterdam/editingwidgets.py:1.3 Wed Aug 13 17:28:25 2003
+++ Zope3/src/zope/app/browser/skins/rotterdam/editingwidgets.py Thu Aug 21 10:19:22 2003
@@ -14,12 +14,8 @@
"""
$Id$
"""
-
__metaclass__ = type
-from types import ListType, TupleType
-ListTypes = (ListType, TupleType)
-
from zope.app.browser.form.widget import BrowserWidget, renderElement
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
@@ -31,8 +27,7 @@
width = 60
height = 15
extra=""
- style="width:100%"
- style = ''
+ style="width: 98%; font-family: monospace;"
rowTemplate = ViewPageTemplateFile("simpleeditingrow.pt")
rowFragment = ViewPageTemplateFile("simpleeditingrowfragment.pt")
@@ -46,9 +41,9 @@
name = self.name,
id = self.name,
cssClass = self.getValue('cssClass'),
-# rows = self.getValue('height'),
-# cols = self.getValue('width'),
-# style = self.style,
+ rows = self.getValue('height'),
+ cols = self.getValue('width'),
+ style = self.style,
contents = self._showData(),
extra = self.getValue('extra'))
@@ -56,10 +51,11 @@
"""Make the contents available to the template"""
return self._showData()
- def row(self):
- # XXX This was originally set to make a colspan=2 table cell, and
- # have the label above the text area. Perhaps we should use
- # different div classes for this case?
- return self.rowTemplate()
- return '<h1>here</h1><div class="label">%s</div><div class="field">%s</div>' % (
- self.label(), self())
+ # XXX: This is ridiculous! This cannot work in any browser well!
+ #def row(self):
+ # # XXX This was originally set to make a colspan=2 table cell, and
+ # # have the label above the text area. Perhaps we should use
+ # # different div classes for this case?
+ # return self.rowTemplate()
+ # return '<h1>here</h1><div class="label">%s</div><div class="field">%s</div>' % (
+ # self.label(), self())
More information about the Zope3-Checkins
mailing list