Commit 6af3109f authored by 's avatar

Updated copy support in leverish things

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