[Zope-Checkins] CVS: Zope/lib/python/OFS/dtml - documentEdit.dtml:1.8
Casey Duncan
casey@zope.com
Fri, 12 Apr 2002 16:19:03 -0400
Update of /cvs-repository/Zope/lib/python/OFS/dtml
In directory cvs.zope.org:/tmp/cvs-serv32529/OFS/dtml
Modified Files:
documentEdit.dtml
Log Message:
New wider/narrower implementation. Allows you to alternately use percentages
or absolute column widths. You can set this in the standard prefs. Still only
works for editing DTML right now.
=== Zope/lib/python/OFS/dtml/documentEdit.dtml 1.7 => 1.8 ===
<tr>
<td align="left" valign="top" colspan="2">
- <dtml-let cols="_.int(REQUEST.get('dtpref_cols',70))"
- width="_.min(_.int(_.float(cols)/70.0 * 100.0),100)">
- <textarea name="data:text" wrap="off" style="width:&dtml-width;%"
- cols="&dtml-cols;" rows="<dtml-var dtpref_rows missing="20">"
- ><dtml-var __str__></textarea>
+ <dtml-let cols="REQUEST.get('dtpref_cols', '100%')">
+ <dtml-if expr="cols[-1]=='%'">
+ <textarea name="data:text" wrap="off" style="width:&dtml-cols;"
+ rows="<dtml-var dtpref_rows missing="20">"
+ ><dtml-var __str__></textarea>
+ <dtml-else>
+ <textarea name="data:text" wrap="off" cols="&dtml-cols;"
+ rows="<dtml-var dtpref_rows missing="20">"
+ ><dtml-var __str__></textarea>
+ </dtml-if>
</dtml-let>
</td>
</tr>