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
9ebe0542
Commit
9ebe0542
authored
Jul 28, 1997
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Got rid of some message dialogs.
parent
5d23aa4c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
22 deletions
+9
-22
lib/python/OFS/ObjectManager.py
lib/python/OFS/ObjectManager.py
+9
-22
No files found.
lib/python/OFS/ObjectManager.py
View file @
9ebe0542
__doc__
=
"""Object Manager
__doc__
=
"""Object Manager
$Id: ObjectManager.py,v 1.
1 1997/07/25 20:03:24
jim Exp $"""
$Id: ObjectManager.py,v 1.
2 1997/07/28 21:36:08
jim Exp $"""
__version__
=
'$Revision: 1.
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
2
$'
[
11
:
-
2
]
from
SingleThreadedTransaction
import
Persistent
from
SingleThreadedTransaction
import
Persistent
...
@@ -122,11 +122,7 @@ class ObjectManager(Acquirer,Management,Persistent):
...
@@ -122,11 +122,7 @@ class ObjectManager(Acquirer,Management,Persistent):
try
:
self
.
_delObject
(
names
[
-
1
])
try
:
self
.
_delObject
(
names
[
-
1
])
except
:
raise
'BadRequest'
,
(
'%s does not exist'
%
names
[
-
1
])
except
:
raise
'BadRequest'
,
(
'%s does not exist'
%
names
[
-
1
])
del
names
[
-
1
]
del
names
[
-
1
]
return
MessageDialog
(
return
self
.
manage_main
(
self
,
REQUEST
)
title
=
'Items Removed'
,
message
=
'The items were removed successfully'
,
action
=
REQUEST
[
'PARENT_URL'
]
+
'/manage_main'
,
target
=
'manage_main'
)
def
_setProperty
(
self
,
name
,
value
,
type
=
'string'
):
def
_setProperty
(
self
,
name
,
value
,
type
=
'string'
):
self
.
_checkName
(
name
)
self
.
_checkName
(
name
)
...
@@ -157,11 +153,7 @@ class ObjectManager(Acquirer,Management,Persistent):
...
@@ -157,11 +153,7 @@ class ObjectManager(Acquirer,Management,Persistent):
def
manage_addProperty
(
self
,
name
,
value
,
type
,
REQUEST
):
def
manage_addProperty
(
self
,
name
,
value
,
type
,
REQUEST
):
"""Add a new property (www)"""
"""Add a new property (www)"""
self
.
_setProperty
(
name
,
value
,
type
)
self
.
_setProperty
(
name
,
value
,
type
)
return
MessageDialog
(
return
self
.
manage_propertiesForm
(
self
,
REQUEST
)
title
=
'Property Added'
,
message
=
'The property was added successfully'
,
action
=
REQUEST
[
'PARENT_URL'
]
+
'/manage_propertiesForm'
,
target
=
'manage_main'
)
def
manage_editProperties
(
self
,
REQUEST
):
def
manage_editProperties
(
self
,
REQUEST
):
"""Edit object properties"""
"""Edit object properties"""
...
@@ -169,11 +161,7 @@ class ObjectManager(Acquirer,Management,Persistent):
...
@@ -169,11 +161,7 @@ class ObjectManager(Acquirer,Management,Persistent):
n
=
p
[
'name'
]
n
=
p
[
'name'
]
try
:
setattr
(
self
,
n
,
REQUEST
[
n
])
try
:
setattr
(
self
,
n
,
REQUEST
[
n
])
except
:
pass
except
:
pass
return
MessageDialog
(
return
self
.
manage_propertiesForm
(
self
,
REQUEST
)
title
=
'Properties changed'
,
message
=
'Properties were changed successfully'
,
action
=
REQUEST
[
'PARENT_URL'
]
+
'/manage_propertiesForm'
,
target
=
'manage_main'
)
def
manage_delProperties
(
self
,
names
,
REQUEST
):
def
manage_delProperties
(
self
,
names
,
REQUEST
):
"""Delete one or more properties"""
"""Delete one or more properties"""
...
@@ -191,11 +179,7 @@ class ObjectManager(Acquirer,Management,Persistent):
...
@@ -191,11 +179,7 @@ class ObjectManager(Acquirer,Management,Persistent):
except
:
raise
'BadRequest'
,
(
except
:
raise
'BadRequest'
,
(
'The property <I>%s</I> does not exist'
%
n
)
'The property <I>%s</I> does not exist'
%
n
)
return
MessageDialog
(
return
self
.
manage_propertiesForm
(
self
,
REQUEST
)
title
=
'Properties Removed'
,
message
=
'The properties were removed successfully'
,
action
=
REQUEST
[
'PARENT_URL'
]
+
'/manage_propertiesForm'
,
target
=
'manage_main'
)
def
_defaultInput
(
self
,
n
,
t
,
v
):
def
_defaultInput
(
self
,
n
,
t
,
v
):
return
'<INPUT NAME="%s:%s" SIZE="50" VALUE="%s"></TD>'
%
(
n
,
t
,
v
)
return
'<INPUT NAME="%s:%s" SIZE="50" VALUE="%s"></TD>'
%
(
n
,
t
,
v
)
...
@@ -236,6 +220,9 @@ class ObjectManager(Acquirer,Management,Persistent):
...
@@ -236,6 +220,9 @@ class ObjectManager(Acquirer,Management,Persistent):
##############################################################################
##############################################################################
#
#
# $Log: ObjectManager.py,v $
# $Log: ObjectManager.py,v $
# Revision 1.2 1997/07/28 21:36:08 jim
# Got rid of some message dialogs.
#
# Revision 1.1 1997/07/25 20:03:24 jim
# Revision 1.1 1997/07/25 20:03:24 jim
# initial
# initial
#
#
...
...
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