[Zope-Checkins] CVS: Zope/lib/python/App/dtml - manage_zmi_prefs.dtml:1.4

Casey Duncan casey@zope.com
Fri, 12 Apr 2002 16:19:33 -0400


Update of /cvs-repository/Zope/lib/python/App/dtml
In directory cvs.zope.org:/tmp/cvs-serv32529/App/dtml

Modified Files:
	manage_zmi_prefs.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/App/dtml/manage_zmi_prefs.dtml 1.3 => 1.4 ===
 </tr>
 
+<dtml-let cols="REQUEST.get('dtpref_cols', '100%')"
+          rows="REQUEST.get('dtpref_rows', '20')">
 <tr>
   <td align="left" valign="top">
   <div class="form-label">
@@ -78,8 +80,7 @@
   </div>
   </td>
   <td align="left" valign="top">
-  <input type="text" name="dtpref_cols" value="<dtml-var
-    expr="REQUEST.get('dtpref_cols', '50')" html_quote>" size="6" />
+  <input type="text" name="dtpref_cols" value="&dtml-cols;" size="6" />
   </td>
 </tr>
 
@@ -90,8 +91,7 @@
   </div>
   </td>
   <td align="left" valign="top">
-  <input type="text" name="dtpref_rows" value="<dtml-var
-    expr="REQUEST.get('dtpref_rows', '20')" html_quote>" size="6" />
+  <input type="text" name="dtpref_rows" value="&dtml-rows;" size="6" />
   </td>
 </tr>
 </table>
@@ -100,14 +100,19 @@
 <input type="submit" name="submit" value="Change">
 </span>
 
-<p class="form-help">
+<div class="form-help">
+  <dtml-if expr="cols[-1]=='%'">
+    <textarea name="data:text" wrap="off" style="width:&dtml-cols;"
+              rows="&dtml-rows;"
+    >This is a sample edit textarea.</textarea>
+  <dtml-else>
+    <textarea name="data:text" wrap="off" cols="&dtml-cols;"
+              rows="&dtml-rows;"
+    >This is a sample edit textarea.</textarea>      
+  </dtml-if>
+</div>
 
-<textarea name="ignore" rows="<dtml-var
-  expr="REQUEST.get('dtpref_rows', '20')" html_quote>" cols="<dtml-var
-  expr="REQUEST.get('dtpref_cols', '50')" html_quote>"
-  >This is an example text area.</textarea>
-
-</p>
+</dtml-let>
 
 </form>