Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
8a06860b
Commit
8a06860b
authored
Jan 27, 1999
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added DTML Methods/Docs with properties
parent
b2d051e8
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
69 additions
and
347 deletions
+69
-347
lib/python/OFS/Application.py
lib/python/OFS/Application.py
+5
-3
lib/python/OFS/Document.py
lib/python/OFS/Document.py
+5
-305
lib/python/OFS/Folder.py
lib/python/OFS/Folder.py
+7
-13
lib/python/OFS/PropertyManager.py
lib/python/OFS/PropertyManager.py
+8
-20
lib/python/OFS/documentAdd.dtml
lib/python/OFS/documentAdd.dtml
+6
-6
lib/python/OFS/methodAdd.dtml
lib/python/OFS/methodAdd.dtml
+38
-0
No files found.
lib/python/OFS/Application.py
View file @
8a06860b
...
...
@@ -85,8 +85,8 @@
__doc__
=
'''Application support
$Id: Application.py,v 1.8
4 1999/01/21 22:48:18 jim
Exp $'''
__version__
=
'$Revision: 1.8
4
$'
[
11
:
-
2
]
$Id: Application.py,v 1.8
5 1999/01/27 20:30:28 brian
Exp $'''
__version__
=
'$Revision: 1.8
5
$'
[
11
:
-
2
]
import
Globals
,
Folder
,
os
,
regex
,
sys
,
App
.
Product
,
App
.
ProductRegistry
...
...
@@ -157,7 +157,9 @@ class Application(Globals.ApplicationDefaultPermissions, Folder.Folder,
folder
=
ImageFile
(
'www/Folder_icon.gif'
,
globals
())
image
=
ImageFile
(
'www/Image_icon.gif'
,
globals
())
file
=
ImageFile
(
'www/File_icon.gif'
,
globals
())
doc
=
ImageFile
(
'www/Document_icon.gif'
,
globals
())
dtmldoc
=
doc
=
ImageFile
(
'www/dtmldoc.gif'
,
globals
())
dtmlmethod
=
ImageFile
(
'www/dtmlmethod.gif'
,
globals
())
broken
=
ImageFile
(
'www/broken.gif'
,
globals
())
UserFolder
=
ImageFile
(
'AccessControl/www/UserFolder_icon.gif'
)
...
...
lib/python/OFS/Document.py
View file @
8a06860b
This diff is collapsed.
Click to expand it.
lib/python/OFS/Folder.py
View file @
8a06860b
...
...
@@ -105,9 +105,9 @@
Folders are the basic container objects and are analogous to directories.
$Id: Folder.py,v 1.5
7 1999/01/19 23:59:09 amos
Exp $"""
$Id: Folder.py,v 1.5
8 1999/01/27 20:30:28 brian
Exp $"""
__version__
=
'$Revision: 1.5
7
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.5
8
$'
[
11
:
-
2
]
from
Globals
import
HTMLFile
...
...
@@ -116,7 +116,6 @@ from PropertyManager import PropertyManager
from
CopySupport
import
CopyContainer
from
FindSupport
import
FindSupport
from
Image
import
Image
,
File
from
Document
import
DocumentHandler
from
AccessControl.Role
import
RoleManager
import
SimpleItem
from
string
import
rfind
,
lower
...
...
@@ -139,16 +138,11 @@ def manage_addFolder(self,id,title='',createPublic=0,createUserF=0,
i
.
title
=
title
self
.
_setObject
(
id
,
i
)
if
createUserF
:
i
.
manage_addUserFolder
()
if
createPublic
:
i
.
manage_addDocument
(
id
=
'index_html'
,
title
=
''
)
if
createPublic
:
i
.
manage_addD
TMLD
ocument
(
id
=
'index_html'
,
title
=
''
)
if
REQUEST
is
not
None
:
return
self
.
manage_main
(
self
,
REQUEST
,
update_menu
=
1
)
class
Folder
(
ObjectManager
,
PropertyManager
,
RoleManager
,
DocumentHandler
,
SimpleItem
.
Item
,
CopyContainer
,
FindSupport
):
class
Folder
(
ObjectManager
,
PropertyManager
,
RoleManager
,
SimpleItem
.
Item
,
CopyContainer
,
FindSupport
):
"""
The basic container object in Principia. Folders can hold almost all
other Principia objects.
...
...
@@ -292,8 +286,8 @@ class PUTer(Acquisition.Explicit):
else
:
type
=
text_type
(
BODY
)
__traceback_info__
=
suf
,
dot
,
name
,
type
if
lower
(
type
)[:
5
]
==
'text/'
:
return
self
.
_parent
.
manage_addDocument
(
name
,
''
,
BODY
,
REQUEST
=
REQUEST
)
return
self
.
_parent
.
manage_addD
TMLD
ocument
(
name
,
''
,
BODY
,
REQUEST
=
REQUEST
)
if
lower
(
type
)[:
6
]
==
'image/'
:
self
.
_parent
.
_setObject
(
name
,
Image
(
name
,
''
,
BODY
,
content_type
=
type
))
...
...
lib/python/OFS/PropertyManager.py
View file @
8a06860b
...
...
@@ -83,22 +83,10 @@
#
##############################################################################
"""Property management"""
__version__
=
'$Revision: 1.
2
$'
[
11
:
-
2
]
"""Property management
.
"""
__version__
=
'$Revision: 1.
3
$'
[
11
:
-
2
]
## from ObjectManager import ObjectManager
## from CopySupport import CopyContainer
## from FindSupport import FindSupport
## from Image import Image, File
## from Document import DocumentHandler
## from AccessControl.Role import RoleManager
## import SimpleItem
## from string import rfind, lower
## from content_types import content_type, find_binary, text_type
## import Globals
from
ZPublisher.Converters
import
type_converters
from
Globals
import
HTMLFile
,
MessageDialog
from
string
import
find
,
join
,
lower
,
split
...
...
@@ -107,12 +95,6 @@ from DateTime import DateTime
def
aq_base
(
ob
):
if
hasattr
(
ob
,
'aq_base'
):
return
ob
.
aq_base
return
ob
class
PropertyManager
:
"""
The PropertyManager mixin class provides an object with
...
...
@@ -328,3 +310,9 @@ class PropertyManager:
v
=
getattr
(
self
,
n
)
r
.
append
({
'id'
:
n
,
'input'
:
imap
[
t
](
None
,
n
,
t
,
v
)})
return
r
def
aq_base
(
ob
):
if
hasattr
(
ob
,
'aq_base'
):
return
ob
.
aq_base
return
ob
lib/python/OFS/documentAdd.dtml
View file @
8a06860b
<HTML>
<HEAD>
<TITLE>Add Document</TITLE>
<TITLE>Add D
TML D
ocument</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<H2>Add Document</H2>
<H2>Add D
TML D
ocument</H2>
<P>
You may create a new html d
ocument using the form below.
Also, you may
choose to upload an existing html file from your
local computer by clicking the <I>Browse</I> button.
You may create a new DTML D
ocument using the form below.
You may also
choose to upload an existing html file from your
local computer by clicking the <I>Browse</I> button.
<FORM ACTION="manage_addDocument" METHOD="POST"
<FORM ACTION="manage_addD
TMLD
ocument" METHOD="POST"
ENCTYPE="multipart/form-data" TARGET="manage_main">
<TABLE CELLSPACING="2">
<TR>
...
...
lib/python/OFS/methodAdd.dtml
0 → 100644
View file @
8a06860b
<HTML>
<HEAD>
<TITLE>Add DTML Method</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<H2>Add DTML Method</H2>
<P>
You may create a new DTML Method object using the form below.
You may also choose to upload an existing html file from your
local computer by clicking the <I>Browse</I> button.
<FORM ACTION="manage_addDTMLMethod" METHOD="POST"
ENCTYPE="multipart/form-data" TARGET="manage_main">
<TABLE CELLSPACING="2">
<TR>
<TH ALIGN="LEFT" VALIGN="TOP">Id</TH>
<TD ALIGN="LEFT" VALIGN="TOP"><INPUT TYPE="TEXT" NAME="id" SIZE="40"></TD>
</TR>
<TR>
<TH ALIGN="LEFT" VALIGN="TOP"><EM>Title</EM></TH>
<TD ALIGN="LEFT" VALIGN="TOP"><INPUT TYPE="TEXT" NAME="title" SIZE="40"></TD>
</TR>
<TR>
<TH ALIGN="LEFT" VALIGN="TOP"><EM><STRONG>File</STRONG></EM></TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="file" NAME="file:string" SIZE="25" VALUE="">
</TD>
</TR>
<TR><TH></TH>
<TD>
<INPUT TYPE="SUBMIT" VALUE=" Add ">
<INPUT TYPE="SUBMIT" VALUE=" Add and Edit " NAME="submit">
</TD>
</TR>
</TABLE>
</FORM>
</BODY></HTML>
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