Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Paul Graydon
erp5
Commits
88786a70
Commit
88786a70
authored
Aug 06, 2015
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zope patches: display OFSFile content using full available height in zmi
parent
0e0bda0e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
148 additions
and
0 deletions
+148
-0
product/ERP5Type/ZopePatch.py
product/ERP5Type/ZopePatch.py
+1
-0
product/ERP5Type/dtml/fileEdit.dtml
product/ERP5Type/dtml/fileEdit.dtml
+134
-0
product/ERP5Type/patches/OFSFile.py
product/ERP5Type/patches/OFSFile.py
+13
-0
No files found.
product/ERP5Type/ZopePatch.py
View file @
88786a70
...
...
@@ -49,6 +49,7 @@ from Products.ERP5Type.patches import PropertySheets
from
Products.ERP5Type.patches
import
CMFCoreSkinnable
from
Products.ERP5Type.patches
import
CMFCoreSkinsTool
from
Products.ERP5Type.patches
import
CMFBTreeFolder
from
Products.ERP5Type.patches
import
OFSFile
from
Products.ERP5Type.patches
import
OFSFolder
from
Products.ERP5Type.patches
import
OFSUninstalled
from
Products.ERP5Type.patches
import
PersistentMapping
...
...
product/ERP5Type/dtml/fileEdit.dtml
0 → 100644
View file @
88786a70
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<p class="form-help">
You can update the data for this file object using the form below.
Select a data file from your local computer by clicking the <em>browse</em>
button and click <em>upload</em> to update the contents of the
file. You may also edit the file content directly if the content is a
text type and small enough to be edited in a text area.
</p>
<form action="<dtml-var "REQUEST.URL1" html_quote>" method="post" enctype="multipart/form-data">
<table cellpadding="2" cellspacing="0" width="100%" border="0" style="height: 80%;">
<tr>
<td align="left" valign="top">
<div class="form-optional">
Title
</div>
</td>
<td align="left" valign="top">
<input type="text" name="title" size="40" value="<dtml-if
title>&dtml-title;</dtml-if>">
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-label">
Content Type
</div>
</td>
<td align="left" valign="top">
<input type="text" name="content_type:required" size="40" value="<dtml-if
content_type>&dtml-content_type;</dtml-if>">
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-optional">
Precondition
</div>
</td>
<td align="left" valign="top">
<input type="text" name="precondition" size="40" value="<dtml-if
precondition>&dtml-precondition;</dtml-if>">
</td>
</tr>
<dtml-let ct=getContentType>
<dtml-if "(ct.startswith('text') or ct.endswith('javascript'))
and this().get_size() < 6553600">
<tr>
<td align="left" valign="top" colspan="2" style="height: 100%">
<div style="width: 100%; height: 100%">
<textarea name="filedata:text" wrap="off" style="height: 100%; width: 100%"><dtml-var __str__ html_quote></textarea>
</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>
<td align="left" valign="top">
<div class="form-element">
<dtml-if wl_isLocked>
<em>Locked by WebDAV</em>
<dtml-else>
<input class="form-element" type="submit" name="manage_edit:method"
value="Save Changes">
</dtml-if>
</div>
</td>
</tr>
<tr>
<td align="left" valign="top">
<br />
<div class="form-label">
File Data
</div>
</td>
<td align="left" valign="top">
<br />
<input type="file" name="file" size="25" />
</td>
</tr>
<tr>
<td></td>
<td align="left" valign="top">
<div class="form-element">
<dtml-if wl_isLocked>
<em>Locked by WebDAV</em>
<dtml-else>
<input class="form-element" type="submit" name="manage_upload:method"
value="Upload">
</dtml-if>
</div>
</td>
</tr>
</table>
</form>
<dtml-var manage_page_footer>
product/ERP5Type/patches/OFSFile.py
0 → 100644
View file @
88786a70
from
App.special_dtml
import
DTMLFile
from
OFS.Image
import
File
from
Products.ERP5Type
import
_dtmldir
# Patch for displaying textearea in full window instead of
# remembering a quantity of lines to display in a cookie
manage_editForm
=
DTMLFile
(
"fileEdit"
,
_dtmldir
)
manage_editForm
.
_setName
(
'manage_editForm'
)
File
.
manage_editForm
=
manage_editForm
File
.
manage
=
manage_editForm
File
.
manage_main
=
manage_editForm
File
.
manage_editDocument
=
manage_editForm
File
.
manage_editForm
=
manage_editForm
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment