Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
6af3109f
Commit
6af3109f
authored
Aug 14, 1998
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated copy support in leverish things
parent
e15b6db9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
16 deletions
+15
-16
lib/python/App/ApplicationManager.py
lib/python/App/ApplicationManager.py
+3
-10
lib/python/App/Factory.py
lib/python/App/Factory.py
+7
-4
lib/python/App/Product.py
lib/python/App/Product.py
+5
-2
No files found.
lib/python/App/ApplicationManager.py
View file @
6af3109f
__doc__
=
"""System management components"""
__version__
=
'$Revision: 1.3
2
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.3
3
$'
[
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
...
...
lib/python/App/Factory.py
View file @
6af3109f
...
...
@@ -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
#
...
...
lib/python/App/Product.py
View file @
6af3109f
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment