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 ...@@ -35,6 +35,10 @@ Zope Changes
- RAMCacheManager: Allow invalidation of a cache entry from the - RAMCacheManager: Allow invalidation of a cache entry from the
Statistics view in the ZMI 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 Bugs fixed
- Collector #1127: strftime did not take timezone into account. - 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. ...@@ -48,48 +48,51 @@ text type and small enough to be edited in a text area.
</td> </td>
</tr> </tr>
<dtml-if "this().getContentType()[:4] == 'text' and this().get_size() < 65536"> <dtml-let ct=getContentType>
<tr> <dtml-if "(ct.startswith('text') or ct.endswith('javascript'))
<td align="left" valign="top" colspan="2"> and this().get_size() < 65536">
<div style="width: 100%;"> <tr>
<dtml-let cols="REQUEST.get('dtpref_cols', '100%')" <td align="left" valign="top" colspan="2">
rows="REQUEST.get('dtpref_rows', '20')"> <div style="width: 100%;">
<dtml-if "cols[-1]=='%'"> <dtml-let cols="REQUEST.get('dtpref_cols', '100%')"
<textarea name="filedata:text" wrap="off" style="width: &dtml-cols;;" 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> <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> </dtml-if>
rows="&dtml-rows;"><dtml-var __str__ html_quote></textarea> </dtml-let>
</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>
<tr> <tr>
<td></td> <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