Commit 9daeebe9 authored by Jens Vagelpohl's avatar Jens Vagelpohl

- Collector #1454/OFS.File: Accept content types ending with

  "javascript" as editable through the File edit form, just like
  text/<foo> types
parent ec9e4b1f
......@@ -35,6 +35,10 @@ Zope Changes
- RAMCacheManager: Allow invalidation of a cache entry from the
Statistics view in the ZMI
- Collector #1454/OFS.File: Accept content types ending with
"javascript" as editable through the File edit form, just like
text/<foo> types
Bugs fixed
- Collector #1127: strftime did not take timezone into account.
......
......@@ -48,48 +48,51 @@ text type and small enough to be edited in a text area.
</td>
</tr>
<dtml-if "this().getContentType()[:4] == 'text' and this().get_size() < 65536">
<tr>
<td align="left" valign="top" colspan="2">
<div style="width: 100%;">
<dtml-let cols="REQUEST.get('dtpref_cols', '100%')"
rows="REQUEST.get('dtpref_rows', '20')">
<dtml-if "cols[-1]=='%'">
<textarea name="filedata:text" wrap="off" style="width: &dtml-cols;;"
<dtml-let ct=getContentType>
<dtml-if "(ct.startswith('text') or ct.endswith('javascript'))
and this().get_size() < 65536">
<tr>
<td align="left" valign="top" colspan="2">
<div style="width: 100%;">
<dtml-let cols="REQUEST.get('dtpref_cols', '100%')"
rows="REQUEST.get('dtpref_rows', '20')">
<dtml-if "cols[-1]=='%'">
<textarea name="filedata:text" wrap="off" style="width: &dtml-cols;;"
<dtml-else>
<textarea name="filedata:text" wrap="off" cols="&dtml-cols;"
</dtml-if>
rows="&dtml-rows;"><dtml-var __str__ html_quote></textarea>
</dtml-let>
</div>
</td>
</tr>
<dtml-else>
<textarea name="filedata:text" wrap="off" cols="&dtml-cols;"
<tr>
<td align="left" valign="top">
<div class="form-label">
Last Modified
</div>
</td>
<td align="left" valign="top">
<div class="form-text">
<dtml-var bobobase_modification_time fmt="%Y-%m-%d %H:%M">
</div>
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-label">
File Size
</div>
</td>
<td align="left" valign="top">
<div class="form-text">
<dtml-var size thousands_commas> bytes
</div>
</td>
</tr>
</dtml-if>
rows="&dtml-rows;"><dtml-var __str__ html_quote></textarea>
</dtml-let>
</div>
</td>
</tr>
<dtml-else>
<tr>
<td align="left" valign="top">
<div class="form-label">
Last Modified
</div>
</td>
<td align="left" valign="top">
<div class="form-text">
<dtml-var bobobase_modification_time fmt="%Y-%m-%d %H:%M">
</div>
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-label">
File Size
</div>
</td>
<td align="left" valign="top">
<div class="form-text">
<dtml-var size thousands_commas> bytes
</div>
</td>
</tr>
</dtml-if>
</dtml-let>
<tr>
<td></td>
......
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