Commit 6d7825dc authored by 's avatar

*** empty log message ***

parent 80b1bb1a
"""Copy interface""" """Copy interface"""
__version__='$Revision: 1.13 $'[11:-2] __version__='$Revision: 1.14 $'[11:-2]
import Globals, Moniker, rPickle, tempfile import Globals, Moniker, rPickle, tempfile
from cPickle import loads, dumps from cPickle import loads, dumps
...@@ -65,6 +65,7 @@ class CopyContainer: ...@@ -65,6 +65,7 @@ class CopyContainer:
obj._setId(clip_id) obj._setId(clip_id)
self._setObject(clip_id, obj) self._setObject(clip_id, obj)
obj._postCopy(self) obj._postCopy(self)
if REQUEST is not None: if REQUEST is not None:
return self.manage_main(self, REQUEST, update_menu=1) return self.manage_main(self, REQUEST, update_menu=1)
return '' return ''
...@@ -74,10 +75,12 @@ class CopyContainer: ...@@ -74,10 +75,12 @@ class CopyContainer:
prev_id=Moniker.absattr(obj.id) prev_id=Moniker.absattr(obj.id)
obj.aq_parent._delObject(prev_id) obj.aq_parent._delObject(prev_id)
obj=obj.aq_base if hasattr(obj, 'aq_base'):
obj=obj.__of__(self) obj=obj.aq_base
self._setObject(clip_id, obj) self._setObject(clip_id, obj)
obj=obj.__of__(self)
obj._setId(clip_id)
obj._postMove(self)
if REQUEST is not None: if REQUEST is not None:
# Remove cookie after a move # Remove cookie after a move
REQUEST['RESPONSE'].setCookie('clip_data', 'deleted', REQUEST['RESPONSE'].setCookie('clip_data', 'deleted',
...@@ -111,6 +114,10 @@ class CopySource: ...@@ -111,6 +114,10 @@ class CopySource:
# Called after the copy is finished to accomodate special cases # Called after the copy is finished to accomodate special cases
pass pass
def _postMove(self, container):
# Called after a move is finished to accomodate special cases
pass
def _setId(self, id): def _setId(self, id):
# Called to set the new id of a copied object. # Called to set the new id of a copied object.
self.id=id self.id=id
......
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