Commit f8f20a40 authored by 's avatar

Added _postCopy

parent 3be8ce4e
"""Copy interface"""
__version__='$Revision: 1.1 $'[11:-2]
__version__='$Revision: 1.2 $'[11:-2]
import Globals, Moniker, rPickle
from cPickle import loads, dumps
......@@ -45,6 +45,7 @@ class CopyContainer:
obj=obj._getCopy(self)
obj._setId(clip_id)
self._setObject(clip_id, obj)
obj._postCopy(self)
return self.manage_main(self, REQUEST)
......@@ -62,6 +63,10 @@ class CopySource:
# Ask an object for a new copy of itself.
return loads(dumps(self))
def _postCopy(self, container):
# Called after the copy is finished to accomodate special cases
pass
def _setId(self, id):
# Called to set the new id of a copied object.
self.id=id
......
......@@ -6,16 +6,12 @@
<!--#if moniker-->
<!--#in moniker-->
<H2>Paste <!--#var sequence-var-mtype--></H2>
<!--#/in moniker-->
<!--#else moniker-->
<H2>Paste Item</H2>
<!--#/if moniker-->
<!--#if bad-->
<EM>An item with the specified id exists</EM>.
Please specify another id.
<!--#else bad-->
Please specify the id to use for this item.
Please specify the id to use for this <!--#var sequence-var-mtype-->.
<!--#/if bad-->
<FORM ACTION="pasteFromClipboard" METHOD="POST">
......@@ -26,11 +22,7 @@ Please specify the id to use for this item.
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="TEXT" NAME="clip_id" SIZE="40"
<!--#if moniker-->
<!--#in moniker-->
VALUE="<!--#var sequence-var-id-->"
<!--#/in moniker-->
<!--#/if moniker-->>
VALUE="<!--#var sequence-var-id-->">
</TD>
</TR>
<TR>
......@@ -41,6 +33,8 @@ Please specify the id to use for this item.
</TR>
</TABLE>
</FORM>
<!--#/in moniker-->
<!--#/if moniker-->
</BODY>
</HTML>
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