Commit 9ebe0542 authored by Jim Fulton's avatar Jim Fulton

Got rid of some message dialogs.

parent 5d23aa4c
__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
# #
......
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