Commit 6773f409 authored by Casey Duncan's avatar Casey Duncan

Fix for Bug#96: Narrower/Wider buttons now work in CSS browsers. This is only

in affect for DTML thus far.
parent e3627b79
......@@ -74,6 +74,10 @@ Zope Changes
- New implementation of ZODB object cache.
Bugs:
- Fixed bug #96: Narrower/Wider buttons now work on both CSS and non-CSS
compliant browsers. This allows better control for browsers that have a
hard time knowing what 100% means.
- Fix for Collector #319: filtered_manage_options didn't
correctly filter tabs based on permission.
......
......@@ -12,7 +12,7 @@
##############################################################################
"""DTML Method objects."""
__version__='$Revision: 1.75 $'[11:-2]
__version__='$Revision: 1.76 $'[11:-2]
import History
from Globals import HTML, DTMLFile, MessageDialog
......@@ -222,7 +222,7 @@ class DTMLMethod(RestrictedDTML, HTML, Acquisition.Implicit, RoleManager,
dr,dc = self._size_changes[SUBMIT]
rows=max(1,int(dtpref_rows)+dr)
cols=max(40,int(dtpref_cols)+dc)
cols=max(35,int(dtpref_cols)+dc)
e=(DateTime('GMT') + 365).rfc822()
resp=REQUEST['RESPONSE']
resp.setCookie('dtpref_rows',str(rows),path='/',expires=e)
......@@ -231,7 +231,7 @@ class DTMLMethod(RestrictedDTML, HTML, Acquisition.Implicit, RoleManager,
self,REQUEST,title=title,__str__=self.quotedHTML(data),
dtpref_cols=cols,dtpref_rows=rows)
def manage_edit(self,data,title,SUBMIT='Change',dtpref_cols='50',
def manage_edit(self,data,title,SUBMIT='Change',dtpref_cols='70',
dtpref_rows='20',REQUEST=None):
"""
Replaces a Documents contents with Data, Title with Title.
......
......@@ -25,13 +25,12 @@ the <em>browse</em> button to select a local file to upload.
<tr>
<td align="left" valign="top" colspan="2">
<div style="width: 100%;">
<textarea name="data:text" wrap="off" style="width: 100%;"<dtml-if
dtpref_cols> cols="<dtml-var dtpref_cols>"<dtml-else
> cols="50"</dtml-if><dtml-if dtpref_rows> rows="<dtml-var
dtpref_rows>"<dtml-else> rows="20"</dtml-if>><dtml-var
__str__></textarea>
</div>
<dtml-let cols="_.int(REQUEST.get('dtpref_cols',70))"
width="_.min(_.int(_.float(dtpref_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>
</td>
</tr>
</dtml-with>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment