Commit 6af3109f authored by 's avatar

Updated copy support in leverish things

parent e15b6db9
__doc__="""System management components"""
__version__='$Revision: 1.32 $'[11:-2]
__version__='$Revision: 1.33 $'[11:-2]
import sys,os,time,string,Globals, Acquisition
......@@ -75,15 +75,8 @@ class ApplicationManager(Folder,CacheManager):
if not hasattr(self, 'Products'):
self.Products=ProductFolder()
def copyToClipboard(self, REQUEST):
return Globals.MessageDialog(title='Not Supported',
message='This item cannot be copied',
action ='./manage_main',)
def cutToClipboard(self, REQUEST):
return Globals.MessageDialog(title='Not Supported',
message='This item cannot be cut',
action ='./manage_main',)
def _canCopy(self, op=0):
return 0
def _init(self):
pass
......
......@@ -10,8 +10,8 @@
##############################################################################
__doc__='''Principia Factories
$Id: Factory.py,v 1.1 1998/08/03 13:43:27 jim Exp $'''
__version__='$Revision: 1.1 $'[11:-2]
$Id: Factory.py,v 1.2 1998/08/14 16:48:52 brian Exp $'''
__version__='$Revision: 1.2 $'[11:-2]
import OFS.SimpleItem, Acquisition, Globals
......@@ -32,12 +32,12 @@ class Factory(OFS.SimpleItem.Item, Acquisition.Implicit):
self.initial=initial
self.__of__(product)._register()
def _notifyOfCopyTo(self, container):
def _notifyOfCopyTo(self, container, op=0):
if container.__class__ is not Product:
raise TypeError, (
'Factories can only be copied to <b>products</b>.')
def _postCopy(self, container):
def _postCopy(self, container, op=0):
self._register()
def _register(self):
......@@ -62,6 +62,9 @@ class Factory(OFS.SimpleItem.Item, Acquisition.Implicit):
##############################################################################
#
# $Log: Factory.py,v $
# Revision 1.2 1998/08/14 16:48:52 brian
# Updated copy support in leverish things
#
# Revision 1.1 1998/08/03 13:43:27 jim
# new folderish control panel and product management
#
......
......@@ -53,6 +53,9 @@ class ProductFolder(Folder):
for factory in getattr(self, id)._factories(): factory._unregister()
ProductFolder.inheritedAttribute('_delObject')(self, id)
def _canCopy(self, op=0):
return 0
class Product(Folder):
"""Model a product that can be created through the web.
"""
......@@ -107,12 +110,12 @@ class Product(Folder):
self.id=id
self.title=title
def _notifyOfCopyTo(self, container):
def _notifyOfCopyTo(self, container, op=0):
if container.__class__ is not ProductFolder:
raise TypeError, (
'Products can only be copied to <b>product folders</b>.')
def _postCopy(self, container):
def _postCopy(self, container, op=0):
for factory in self._factories():
factory._register()
......
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