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"""
__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
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
...
...
lib/python/App/Factory.py
View file @
6af3109f
...
@@ -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
#
#
...
...
lib/python/App/Product.py
View file @
6af3109f
...
@@ -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
()
...
...
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