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 ...@@ -74,6 +74,10 @@ Zope Changes
- New implementation of ZODB object cache. - New implementation of ZODB object cache.
Bugs: 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 - Fix for Collector #319: filtered_manage_options didn't
correctly filter tabs based on permission. correctly filter tabs based on permission.
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
############################################################################## ##############################################################################
"""DTML Method objects.""" """DTML Method objects."""
__version__='$Revision: 1.75 $'[11:-2] __version__='$Revision: 1.76 $'[11:-2]
import History import History
from Globals import HTML, DTMLFile, MessageDialog from Globals import HTML, DTMLFile, MessageDialog
...@@ -222,7 +222,7 @@ class DTMLMethod(RestrictedDTML, HTML, Acquisition.Implicit, RoleManager, ...@@ -222,7 +222,7 @@ class DTMLMethod(RestrictedDTML, HTML, Acquisition.Implicit, RoleManager,
dr,dc = self._size_changes[SUBMIT] dr,dc = self._size_changes[SUBMIT]
rows=max(1,int(dtpref_rows)+dr) 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() e=(DateTime('GMT') + 365).rfc822()
resp=REQUEST['RESPONSE'] resp=REQUEST['RESPONSE']
resp.setCookie('dtpref_rows',str(rows),path='/',expires=e) resp.setCookie('dtpref_rows',str(rows),path='/',expires=e)
...@@ -231,7 +231,7 @@ class DTMLMethod(RestrictedDTML, HTML, Acquisition.Implicit, RoleManager, ...@@ -231,7 +231,7 @@ class DTMLMethod(RestrictedDTML, HTML, Acquisition.Implicit, RoleManager,
self,REQUEST,title=title,__str__=self.quotedHTML(data), self,REQUEST,title=title,__str__=self.quotedHTML(data),
dtpref_cols=cols,dtpref_rows=rows) 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): dtpref_rows='20',REQUEST=None):
""" """
Replaces a Documents contents with Data, Title with Title. 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. ...@@ -25,13 +25,12 @@ the <em>browse</em> button to select a local file to upload.
<tr> <tr>
<td align="left" valign="top" colspan="2"> <td align="left" valign="top" colspan="2">
<div style="width: 100%;"> <dtml-let cols="_.int(REQUEST.get('dtpref_cols',70))"
<textarea name="data:text" wrap="off" style="width: 100%;"<dtml-if width="_.min(_.int(_.float(dtpref_cols)/70.0 * 100.0),100)">
dtpref_cols> cols="<dtml-var dtpref_cols>"<dtml-else <textarea name="data:text" wrap="off" style="width:&dtml-width;%"
> cols="50"</dtml-if><dtml-if dtpref_rows> rows="<dtml-var cols="&dtml-cols;" rows="<dtml-var dtpref_rows missing="20">"
dtpref_rows>"<dtml-else> rows="20"</dtml-if>><dtml-var ><dtml-var __str__></textarea>
__str__></textarea> </dtml-let>
</div>
</td> </td>
</tr> </tr>
</dtml-with> </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