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
cab094bb
Commit
cab094bb
authored
Aug 28, 2016
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ZMI copy/cut/paste and re-ordering features.
parent
670a68ea
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
36 additions
and
269 deletions
+36
-269
CHANGES.rst
CHANGES.rst
+2
-0
src/App/FactoryDispatcher.py
src/App/FactoryDispatcher.py
+1
-2
src/App/dtml/manage.dtml
src/App/dtml/manage.dtml
+0
-7
src/OFS/CopySupport.py
src/OFS/CopySupport.py
+14
-62
src/OFS/Folder.py
src/OFS/Folder.py
+1
-1
src/OFS/ObjectManager.py
src/OFS/ObjectManager.py
+1
-1
src/OFS/OrderSupport.py
src/OFS/OrderSupport.py
+9
-9
src/OFS/OrderedFolder.py
src/OFS/OrderedFolder.py
+1
-1
src/OFS/dtml/cmassoc.dtml
src/OFS/dtml/cmassoc.dtml
+0
-33
src/OFS/dtml/main.dtml
src/OFS/dtml/main.dtml
+7
-145
src/OFS/interfaces.py
src/OFS/interfaces.py
+0
-8
No files found.
CHANGES.rst
View file @
cab094bb
...
@@ -30,6 +30,8 @@ Features Added
...
@@ -30,6 +30,8 @@ Features Added
Restructuring
Restructuring
+++++++++++++
+++++++++++++
- Remove ZMI copy/cut/paste and re-ordering features.
- Drop `OFS.History` functionality.
- Drop `OFS.History` functionality.
- Removed ZMI export/import feature.
- Removed ZMI export/import feature.
...
...
src/App/FactoryDispatcher.py
View file @
cab094bb
...
@@ -159,7 +159,6 @@ class FactoryDispatcher(Implicit):
...
@@ -159,7 +159,6 @@ class FactoryDispatcher(Implicit):
def
manage_main
(
trueself
,
self
,
REQUEST
,
update_menu
=
0
):
def
manage_main
(
trueself
,
self
,
REQUEST
,
update_menu
=
0
):
"""Implement a contents view by redirecting to the true view
"""Implement a contents view by redirecting to the true view
"""
"""
d
=
update_menu
and
'/manage_main?update_menu=1'
or
'/manage_main'
REQUEST
[
'RESPONSE'
].
redirect
(
self
.
DestinationURL
()
+
'/manage_main'
)
REQUEST
[
'RESPONSE'
].
redirect
(
self
.
DestinationURL
()
+
d
)
InitializeClass
(
FactoryDispatcher
)
InitializeClass
(
FactoryDispatcher
)
src/App/dtml/manage.dtml
View file @
cab094bb
...
@@ -2,13 +2,6 @@
...
@@ -2,13 +2,6 @@
<html>
<html>
<head>
<head>
<title>
Zope on
&dtml-BASE0;
</title>
<title>
Zope on
&dtml-BASE0;
</title>
<script
type=
"text/javascript"
>
<!--
function
update_menu
()
{
window
.
manage_menu
.
location
.
href
=
window
.
manage_menu
.
location
.
href
;
}
//-->
</script>
</head>
</head>
<frameset
cols=
"250, *"
>
<frameset
cols=
"250, *"
>
...
...
src/OFS/CopySupport.py
View file @
cab094bb
...
@@ -117,9 +117,6 @@ class CopyContainer(Base):
...
@@ -117,9 +117,6 @@ class CopyContainer(Base):
cp
=
(
1
,
oblist
)
cp
=
(
1
,
oblist
)
cp
=
_cb_encode
(
cp
)
cp
=
_cb_encode
(
cp
)
if
REQUEST
is
not
None
:
if
REQUEST
is
not
None
:
resp
=
REQUEST
[
'RESPONSE'
]
resp
.
setCookie
(
'__cp'
,
cp
,
path
=
'%s'
%
cookie_path
(
REQUEST
))
REQUEST
[
'__cp'
]
=
cp
return
self
.
manage_main
(
self
,
REQUEST
)
return
self
.
manage_main
(
self
,
REQUEST
)
return
cp
return
cp
...
@@ -143,9 +140,6 @@ class CopyContainer(Base):
...
@@ -143,9 +140,6 @@ class CopyContainer(Base):
cp
=
(
0
,
oblist
)
cp
=
(
0
,
oblist
)
cp
=
_cb_encode
(
cp
)
cp
=
_cb_encode
(
cp
)
if
REQUEST
is
not
None
:
if
REQUEST
is
not
None
:
resp
=
REQUEST
[
'RESPONSE'
]
resp
.
setCookie
(
'__cp'
,
cp
,
path
=
'%s'
%
cookie_path
(
REQUEST
))
REQUEST
[
'__cp'
]
=
cp
return
self
.
manage_main
(
self
,
REQUEST
)
return
self
.
manage_main
(
self
,
REQUEST
)
return
cp
return
cp
...
@@ -177,18 +171,13 @@ class CopyContainer(Base):
...
@@ -177,18 +171,13 @@ class CopyContainer(Base):
Also sends IObjectCopiedEvent and IObjectClonedEvent
Also sends IObjectCopiedEvent and IObjectClonedEvent
or IObjectWillBeMovedEvent and IObjectMovedEvent.
or IObjectWillBeMovedEvent and IObjectMovedEvent.
"""
"""
if
cb_copy_data
is
not
None
:
cp
=
cb_copy_data
cp
=
cb_copy_data
elif
REQUEST
is
not
None
and
'__cp'
in
REQUEST
:
cp
=
REQUEST
[
'__cp'
]
else
:
cp
=
None
if
cp
is
None
:
if
cp
is
None
:
raise
CopyError
(
eNoData
)
raise
CopyError
(
eNoData
)
try
:
try
:
op
,
mdatas
=
_cb_decode
(
cp
)
op
,
mdatas
=
_cb_decode
(
cp
)
except
:
except
Exception
:
raise
CopyError
(
eInvalid
)
raise
CopyError
(
eInvalid
)
oblist
=
[]
oblist
=
[]
...
@@ -199,7 +188,7 @@ class CopyContainer(Base):
...
@@ -199,7 +188,7 @@ class CopyContainer(Base):
ob
=
m
.
bind
(
app
)
ob
=
m
.
bind
(
app
)
except
ConflictError
:
except
ConflictError
:
raise
raise
except
:
except
Exception
:
raise
CopyError
(
eNotFound
)
raise
CopyError
(
eNotFound
)
self
.
_verifyObjectPaste
(
ob
,
validate_src
=
op
+
1
)
self
.
_verifyObjectPaste
(
ob
,
validate_src
=
op
+
1
)
oblist
.
append
(
ob
)
oblist
.
append
(
ob
)
...
@@ -216,7 +205,7 @@ class CopyContainer(Base):
...
@@ -216,7 +205,7 @@ class CopyContainer(Base):
ob
.
_notifyOfCopyTo
(
self
,
op
=
0
)
ob
.
_notifyOfCopyTo
(
self
,
op
=
0
)
except
ConflictError
:
except
ConflictError
:
raise
raise
except
:
except
Exception
:
raise
CopyError
(
MessageDialog
(
raise
CopyError
(
MessageDialog
(
title
=
"Copy Error"
,
title
=
"Copy Error"
,
message
=
sys
.
exc_info
()[
1
],
message
=
sys
.
exc_info
()[
1
],
...
@@ -241,8 +230,7 @@ class CopyContainer(Base):
...
@@ -241,8 +230,7 @@ class CopyContainer(Base):
notify
(
ObjectClonedEvent
(
ob
))
notify
(
ObjectClonedEvent
(
ob
))
if
REQUEST
is
not
None
:
if
REQUEST
is
not
None
:
return
self
.
manage_main
(
self
,
REQUEST
,
update_menu
=
1
,
return
self
.
manage_main
(
self
,
REQUEST
)
cb_dataValid
=
1
)
elif
op
==
1
:
elif
op
==
1
:
# Move operation
# Move operation
...
@@ -255,7 +243,7 @@ class CopyContainer(Base):
...
@@ -255,7 +243,7 @@ class CopyContainer(Base):
ob
.
_notifyOfCopyTo
(
self
,
op
=
1
)
ob
.
_notifyOfCopyTo
(
self
,
op
=
1
)
except
ConflictError
:
except
ConflictError
:
raise
raise
except
:
except
Exception
:
raise
CopyError
(
MessageDialog
(
raise
CopyError
(
MessageDialog
(
title
=
"Move Error"
,
title
=
"Move Error"
,
message
=
sys
.
exc_info
()[
1
],
message
=
sys
.
exc_info
()[
1
],
...
@@ -308,13 +296,7 @@ class CopyContainer(Base):
...
@@ -308,13 +296,7 @@ class CopyContainer(Base):
ob
.
manage_changeOwnershipType
(
explicit
=
0
)
ob
.
manage_changeOwnershipType
(
explicit
=
0
)
if
REQUEST
is
not
None
:
if
REQUEST
is
not
None
:
REQUEST
[
'RESPONSE'
].
setCookie
(
return
self
.
manage_main
(
self
,
REQUEST
)
'__cp'
,
'deleted'
,
path
=
'%s'
%
cookie_path
(
REQUEST
),
expires
=
'Wed, 31-Dec-97 23:59:59 GMT'
)
REQUEST
[
'__cp'
]
=
None
return
self
.
manage_main
(
self
,
REQUEST
,
update_menu
=
1
,
cb_dataValid
=
0
)
return
result
return
result
...
@@ -330,7 +312,7 @@ class CopyContainer(Base):
...
@@ -330,7 +312,7 @@ class CopyContainer(Base):
if
ids
[
i
]
!=
new_ids
[
i
]:
if
ids
[
i
]
!=
new_ids
[
i
]:
self
.
manage_renameObject
(
ids
[
i
],
new_ids
[
i
],
REQUEST
)
self
.
manage_renameObject
(
ids
[
i
],
new_ids
[
i
],
REQUEST
)
if
REQUEST
is
not
None
:
if
REQUEST
is
not
None
:
return
self
.
manage_main
(
self
,
REQUEST
,
update_menu
=
1
)
return
self
.
manage_main
(
self
,
REQUEST
)
return
None
return
None
security
.
declareProtected
(
view_management_screens
,
'manage_renameObject'
)
security
.
declareProtected
(
view_management_screens
,
'manage_renameObject'
)
...
@@ -339,7 +321,7 @@ class CopyContainer(Base):
...
@@ -339,7 +321,7 @@ class CopyContainer(Base):
"""
"""
try
:
try
:
self
.
_checkId
(
new_id
)
self
.
_checkId
(
new_id
)
except
:
except
Exception
:
raise
CopyError
(
MessageDialog
(
raise
CopyError
(
MessageDialog
(
title
=
'Invalid Id'
,
title
=
'Invalid Id'
,
message
=
sys
.
exc_info
()[
1
],
message
=
sys
.
exc_info
()[
1
],
...
@@ -357,7 +339,7 @@ class CopyContainer(Base):
...
@@ -357,7 +339,7 @@ class CopyContainer(Base):
ob
.
_notifyOfCopyTo
(
self
,
op
=
1
)
ob
.
_notifyOfCopyTo
(
self
,
op
=
1
)
except
ConflictError
:
except
ConflictError
:
raise
raise
except
:
except
Exception
:
raise
CopyError
(
MessageDialog
(
raise
CopyError
(
MessageDialog
(
title
=
"Rename Error"
,
title
=
"Rename Error"
,
message
=
sys
.
exc_info
()[
1
],
message
=
sys
.
exc_info
()[
1
],
...
@@ -392,7 +374,7 @@ class CopyContainer(Base):
...
@@ -392,7 +374,7 @@ class CopyContainer(Base):
ob
.
_postCopy
(
self
,
op
=
1
)
ob
.
_postCopy
(
self
,
op
=
1
)
if
REQUEST
is
not
None
:
if
REQUEST
is
not
None
:
return
self
.
manage_main
(
self
,
REQUEST
,
update_menu
=
1
)
return
self
.
manage_main
(
self
,
REQUEST
)
return
None
return
None
# Why did we give this a manage_ prefix if its really
# Why did we give this a manage_ prefix if its really
...
@@ -408,7 +390,7 @@ class CopyContainer(Base):
...
@@ -408,7 +390,7 @@ class CopyContainer(Base):
raise
CopyError
(
eNotSupported
%
escape
(
ob
.
getId
()))
raise
CopyError
(
eNotSupported
%
escape
(
ob
.
getId
()))
try
:
try
:
self
.
_checkId
(
id
)
self
.
_checkId
(
id
)
except
:
except
Exception
:
raise
CopyError
(
MessageDialog
(
raise
CopyError
(
MessageDialog
(
title
=
'Invalid Id'
,
title
=
'Invalid Id'
,
message
=
sys
.
exc_info
()[
1
],
message
=
sys
.
exc_info
()[
1
],
...
@@ -420,7 +402,7 @@ class CopyContainer(Base):
...
@@ -420,7 +402,7 @@ class CopyContainer(Base):
ob
.
_notifyOfCopyTo
(
self
,
op
=
0
)
ob
.
_notifyOfCopyTo
(
self
,
op
=
0
)
except
ConflictError
:
except
ConflictError
:
raise
raise
except
:
except
Exception
:
raise
CopyError
(
MessageDialog
(
raise
CopyError
(
MessageDialog
(
title
=
"Clone Error"
,
title
=
"Clone Error"
,
message
=
sys
.
exc_info
()[
1
],
message
=
sys
.
exc_info
()[
1
],
...
@@ -442,30 +424,6 @@ class CopyContainer(Base):
...
@@ -442,30 +424,6 @@ class CopyContainer(Base):
return
ob
return
ob
def
cb_dataValid
(
self
):
# Return true if clipboard data seems valid.
try
:
_cb_decode
(
self
.
REQUEST
[
'__cp'
])
except
Exception
:
return
0
return
1
def
cb_dataItems
(
self
):
# List of objects in the clip board
try
:
cp
=
_cb_decode
(
self
.
REQUEST
[
'__cp'
])
except
Exception
:
return
[]
oblist
=
[]
app
=
self
.
getPhysicalRoot
()
for
mdata
in
cp
[
1
]:
m
=
loadMoniker
(
mdata
)
oblist
.
append
(
m
.
bind
(
app
))
return
oblist
validClipData
=
cb_dataValid
def
_verifyObjectPaste
(
self
,
object
,
validate_src
=
1
):
def
_verifyObjectPaste
(
self
,
object
,
validate_src
=
1
):
# Verify whether the current user is allowed to paste the
# Verify whether the current user is allowed to paste the
# passed object into self. This is determined by checking
# passed object into self. This is determined by checking
...
@@ -511,7 +469,7 @@ class CopyContainer(Base):
...
@@ -511,7 +469,7 @@ class CopyContainer(Base):
# clipboard.
# clipboard.
try
:
try
:
parent
=
aq_parent
(
aq_inner
(
object
))
parent
=
aq_parent
(
aq_inner
(
object
))
except
:
except
Exception
:
parent
=
None
parent
=
None
if
not
sm
.
validate
(
None
,
parent
,
None
,
object
):
if
not
sm
.
validate
(
None
,
parent
,
None
,
object
):
...
@@ -658,12 +616,6 @@ def _cb_decode(s, maxsize=8192):
...
@@ -658,12 +616,6 @@ def _cb_decode(s, maxsize=8192):
return
loads
(
data
)
return
loads
(
data
)
def
cookie_path
(
request
):
# Return a "path" value for use in a cookie that refers
# to the root of the Zope object space.
return
request
[
'BASEPATH1'
]
or
"/"
fMessageDialog
=
HTML
(
"""
fMessageDialog
=
HTML
(
"""
<HTML>
<HTML>
<HEAD>
<HEAD>
...
...
src/OFS/Folder.py
View file @
cab094bb
...
@@ -47,7 +47,7 @@ def manage_addFolder(self, id, title='',
...
@@ -47,7 +47,7 @@ def manage_addFolder(self, id, title='',
self
.
_setObject
(
id
,
ob
)
self
.
_setObject
(
id
,
ob
)
ob
=
self
.
_getOb
(
id
)
ob
=
self
.
_getOb
(
id
)
if
REQUEST
is
not
None
:
if
REQUEST
is
not
None
:
return
self
.
manage_main
(
self
,
REQUEST
,
update_menu
=
1
)
return
self
.
manage_main
(
self
,
REQUEST
)
class
Folder
(
class
Folder
(
...
...
src/OFS/ObjectManager.py
View file @
cab094bb
...
@@ -549,7 +549,7 @@ class ObjectManager(CopyContainer,
...
@@ -549,7 +549,7 @@ class ObjectManager(CopyContainer,
self
.
_delObject
(
id
)
self
.
_delObject
(
id
)
del
ids
[
-
1
]
del
ids
[
-
1
]
if
REQUEST
is
not
None
:
if
REQUEST
is
not
None
:
return
self
.
manage_main
(
self
,
REQUEST
,
update_menu
=
1
)
return
self
.
manage_main
(
self
,
REQUEST
)
security
.
declareProtected
(
access_contents_information
,
'tpValues'
)
security
.
declareProtected
(
access_contents_information
,
'tpValues'
)
def
tpValues
(
self
):
def
tpValues
(
self
):
...
...
src/OFS/OrderSupport.py
View file @
cab094bb
...
@@ -65,8 +65,8 @@ class OrderSupport(object):
...
@@ -65,8 +65,8 @@ class OrderSupport(object):
message
=
'Error: %s'
%
(
errmsg
)
message
=
'Error: %s'
%
(
errmsg
)
else
:
else
:
message
=
'Error: No items were specified!'
message
=
'Error: No items were specified!'
return
self
.
manage_main
(
self
,
REQUEST
,
skey
=
'position'
,
return
self
.
manage_main
(
self
,
REQUEST
,
manage_tabs_message
=
message
,
update_menu
=
1
)
manage_tabs_message
=
message
)
security
.
declareProtected
(
manage_properties
,
'manage_move_objects_down'
)
security
.
declareProtected
(
manage_properties
,
'manage_move_objects_down'
)
def
manage_move_objects_down
(
self
,
REQUEST
,
ids
=
None
,
delta
=
1
):
def
manage_move_objects_down
(
self
,
REQUEST
,
ids
=
None
,
delta
=
1
):
...
@@ -81,8 +81,8 @@ class OrderSupport(object):
...
@@ -81,8 +81,8 @@ class OrderSupport(object):
message
=
'Error: %s'
%
(
errmsg
)
message
=
'Error: %s'
%
(
errmsg
)
else
:
else
:
message
=
'Error: No items were specified!'
message
=
'Error: No items were specified!'
return
self
.
manage_main
(
self
,
REQUEST
,
skey
=
'position'
,
return
self
.
manage_main
(
self
,
REQUEST
,
manage_tabs_message
=
message
,
update_menu
=
1
)
manage_tabs_message
=
message
)
security
.
declareProtected
(
manage_properties
,
'manage_move_objects_to_top'
)
security
.
declareProtected
(
manage_properties
,
'manage_move_objects_to_top'
)
def
manage_move_objects_to_top
(
self
,
REQUEST
,
ids
=
None
):
def
manage_move_objects_to_top
(
self
,
REQUEST
,
ids
=
None
):
...
@@ -97,8 +97,8 @@ class OrderSupport(object):
...
@@ -97,8 +97,8 @@ class OrderSupport(object):
message
=
'Error: %s'
%
(
errmsg
)
message
=
'Error: %s'
%
(
errmsg
)
else
:
else
:
message
=
'Error: No items were specified!'
message
=
'Error: No items were specified!'
return
self
.
manage_main
(
self
,
REQUEST
,
skey
=
'position'
,
return
self
.
manage_main
(
self
,
REQUEST
,
manage_tabs_message
=
message
,
update_menu
=
1
)
manage_tabs_message
=
message
)
security
.
declareProtected
(
security
.
declareProtected
(
manage_properties
,
'manage_move_objects_to_bottom'
)
manage_properties
,
'manage_move_objects_to_bottom'
)
...
@@ -114,15 +114,15 @@ class OrderSupport(object):
...
@@ -114,15 +114,15 @@ class OrderSupport(object):
message
=
'Error: %s'
%
(
errmsg
)
message
=
'Error: %s'
%
(
errmsg
)
else
:
else
:
message
=
'Error: No items were specified!'
message
=
'Error: No items were specified!'
return
self
.
manage_main
(
self
,
REQUEST
,
skey
=
'position'
,
return
self
.
manage_main
(
self
,
REQUEST
,
manage_tabs_message
=
message
,
update_menu
=
1
)
manage_tabs_message
=
message
)
security
.
declareProtected
(
manage_properties
,
'manage_set_default_sorting'
)
security
.
declareProtected
(
manage_properties
,
'manage_set_default_sorting'
)
def
manage_set_default_sorting
(
self
,
REQUEST
,
key
,
reverse
):
def
manage_set_default_sorting
(
self
,
REQUEST
,
key
,
reverse
):
""" Set default sorting key and direction.
""" Set default sorting key and direction.
"""
"""
self
.
setDefaultSorting
(
key
,
reverse
)
self
.
setDefaultSorting
(
key
,
reverse
)
return
self
.
manage_main
(
self
,
REQUEST
,
update_menu
=
1
)
return
self
.
manage_main
(
self
,
REQUEST
)
security
.
declareProtected
(
manage_properties
,
'moveObjectsByDelta'
)
security
.
declareProtected
(
manage_properties
,
'moveObjectsByDelta'
)
def
moveObjectsByDelta
(
self
,
ids
,
delta
,
subset_ids
=
None
,
def
moveObjectsByDelta
(
self
,
ids
,
delta
,
subset_ids
=
None
,
...
...
src/OFS/OrderedFolder.py
View file @
cab094bb
...
@@ -32,7 +32,7 @@ def manage_addOrderedFolder(self, id, title='', createPublic=0, createUserF=0,
...
@@ -32,7 +32,7 @@ def manage_addOrderedFolder(self, id, title='', createPublic=0, createUserF=0,
self
.
_setObject
(
id
,
ob
)
self
.
_setObject
(
id
,
ob
)
ob
=
self
.
_getOb
(
id
)
ob
=
self
.
_getOb
(
id
)
if
REQUEST
:
if
REQUEST
:
return
self
.
manage_main
(
self
,
REQUEST
,
update_menu
=
1
)
return
self
.
manage_main
(
self
,
REQUEST
)
class
OrderedFolder
(
OrderSupport
,
Folder
):
class
OrderedFolder
(
OrderSupport
,
Folder
):
...
...
src/OFS/dtml/cmassoc.dtml
View file @
cab094bb
<dtml-var manage_page_header>
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<dtml-var manage_tabs>
<script type="text/javascript">
<!--
isSelected = false;
function toggleSelect() {
if (isSelected == false) {
for (i = 0; i < document.objectItems.length; i++)
document.objectItems.elements[i].checked = true ;
isSelected = true;
document.objectItems.selectButton.value = "Deselect All";
return isSelected;
}
else {
for (i = 0; i < document.objectItems.length; i++)
document.objectItems.elements[i].checked = false ;
isSelected = false;
document.objectItems.selectButton.value = "Select All";
return isSelected;
}
}
//-->
</script>
<form action="&dtml-URL1;" name="objectItems" method="POST">
<form action="&dtml-URL1;" name="objectItems" method="POST">
<dtml-if show_results>
<dtml-if show_results>
...
@@ -62,13 +37,6 @@ are shown.
...
@@ -62,13 +37,6 @@ are shown.
<div class="form-element">
<div class="form-element">
<input type="submit" name="ZCacheManager_setAssociations:method"
<input type="submit" name="ZCacheManager_setAssociations:method"
value="Save Changes">
value="Save Changes">
<script type="text/javascript">
<!--
if (document.forms[0]) {
document.write('<input class="form-element" type="submit" name="selectButton" value="Select All" onClick="toggleSelect(); return false">')
}
//-->
</script>
</div>
</div>
</td>
</td>
</tr>
</tr>
...
@@ -142,4 +110,3 @@ Search subfolders
...
@@ -142,4 +110,3 @@ Search subfolders
</form>
</form>
<dtml-var manage_page_footer>
<dtml-var manage_page_footer>
src/OFS/dtml/main.dtml
View file @
cab094bb
<dtml-var manage_page_header>
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<dtml-var manage_tabs>
<script type="text/javascript">
<!--
isSelected = false;
function toggleSelect() {
if (isSelected == false) {
for (i = 0; i < document.objectItems.length; i++)
document.objectItems.elements[i].checked = true ;
isSelected = true;
document.objectItems.selectButton.value = "Deselect All";
return isSelected;
}
else {
for (i = 0; i < document.objectItems.length; i++)
document.objectItems.elements[i].checked = false ;
isSelected = false;
document.objectItems.selectButton.value = "Select All";
return isSelected;
}
}
//-->
</script>
<!-- Add object widget -->
<!-- Add object widget -->
<br />
<br />
<dtml-if filtered_meta_types>
<dtml-if filtered_meta_types>
...
@@ -61,47 +36,21 @@ function toggleSelect() {
...
@@ -61,47 +36,21 @@ function toggleSelect() {
<form action="<dtml-var "REQUEST.URL1" html_quote>/" name="objectItems" method="post">
<form action="<dtml-var "REQUEST.URL1" html_quote>/" name="objectItems" method="post">
<dtml-if objectItems>
<dtml-if objectItems>
<dtml-let hasOrderSupport="_.getattr(this().aq_explicit, 'has_order_support', 0)">
<dtml-unless skey>
<dtml-if hasOrderSupport>
<dtml-call expr="REQUEST.set('skey', getDefaultSorting()[0])">
<dtml-call expr="REQUEST.set('rkey', getDefaultSorting()[1])">
<dtml-else>
<dtml-call expr="REQUEST.set('skey', 'id')">
</dtml-if>
</dtml-unless>
<dtml-unless rkey><dtml-call expr="REQUEST.set('rkey', '')"></dtml-unless>
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr class="list-header">
<tr class="list-header">
<td width="5%" align="right" colspan="2"><div
<td width="5%" align="right" colspan="2">
class="list-item"><a href="./manage_main?skey=meta_type<dtml-if
<div class="list-item">Type</div>
"skey == 'meta_type' and not rkey">&rkey=meta_type</dtml-if>"><dtml-if
"skey == 'meta_type' or rkey == 'meta_type'"
><strong>Type</strong><dtml-else>Type</dtml-if></a></div>
</td>
<td width="50%" align="left"><div class="list-item"><a
href="./manage_main?skey=id<dtml-if
"skey == 'id' and not rkey">&rkey=id</dtml-if>"><dtml-if
"skey == 'id' or rkey == 'id'"
><strong>Name</strong><dtml-else>Name</dtml-if></a></div>
</td>
</td>
<td width="15%" align="left"><div class="list-item"><a
<td width="50%" align="left">
href="./manage_main?skey=get_size<dtml-if
<div class="list-item">Name</div>
"skey == 'get_size' and not rkey">&rkey=get_size</dtml-if>"><dtml-if
"skey == 'get_size' or rkey == 'get_size'"
><strong>Size</strong><dtml-else>Size</dtml-if></a></div>
</td>
</td>
<dtml-if hasOrderSupport>
<td width="15%" align="left">
<td width="10%" align="left"><div class="list-item"><a
<div class="list-item">Size</div>
href="./manage_main?skey=position"><dtml-if
"skey == 'position'"
><strong>Position</strong><dtml-else>Position</dtml-if></a></div>
</td>
</td>
</dtml-if>
</tr>
</tr>
<dtml-in objectItems
sort_expr="skey+'/cmp/asc'" reverse_expr="rkey"
>
<dtml-in objectItems>
<dtml-if sequence-odd>
<dtml-if sequence-odd>
<tr class="row-normal">
<tr class="row-normal">
<dtml-else>
<dtml-else>
...
@@ -151,18 +100,6 @@ function toggleSelect() {
...
@@ -151,18 +100,6 @@ function toggleSelect() {
</div>
</div>
</td>
</td>
</dtml-with>
</dtml-with>
<dtml-if hasOrderSupport>
<td>
<div class="list-item">
<dtml-if "skey == 'position'">
<dtml-var sequence-number>
<dtml-else>
...
</dtml-if>
</div>
</td>
</dtml-if>
</tr>
</tr>
</dtml-in>
</dtml-in>
</table>
</table>
...
@@ -172,74 +109,15 @@ function toggleSelect() {
...
@@ -172,74 +109,15 @@ function toggleSelect() {
<td align="left" valign="top" width="16"></td>
<td align="left" valign="top" width="16"></td>
<td align="left" valign="top">
<td align="left" valign="top">
<div class="form-element">
<div class="form-element">
<dtml-unless dontAllowCopyAndPaste>
<input class="form-element" type="submit" name="manage_renameForm:method"
value="Rename" />
<dtml-if "_.SecurityCheckPermission('Delete objects',this())">
<input class="form-element" type="submit" name="manage_cutObjects:method"
value="Cut" />
</dtml-if>
<input class="form-element" type="submit" name="manage_copyObjects:method"
value="Copy" />
<dtml-if cb_dataValid>
<input class="form-element" type="submit" name="manage_pasteObjects:method"
value="Paste" />
</dtml-if>
</dtml-unless>
<dtml-if "_.SecurityCheckPermission('Delete objects',this())">
<dtml-if "_.SecurityCheckPermission('Delete objects',this())">
<input class="form-element" type="submit" name="manage_delObjects:method"
<input class="form-element" type="submit" name="manage_delObjects:method"
value="Delete" />
value="Delete" />
</dtml-if>
</dtml-if>
<script type="text/javascript">
<!--
if (document.forms[0]) {
document.write('<input class="form-element" type="submit" name="selectButton" value="Select All" onclick="toggleSelect(); return false">')
}
//-->
</script>
</div>
</td>
</tr>
<dtml-if "hasOrderSupport and
_.SecurityCheckPermission( 'Manage properties', this() )">
<tr>
<td align="left" valign="top" width="16"></td>
<td align="left" valign="top">
<div class="form-element">
<dtml-if expr="skey == 'position' and _.len(objectItems) > 1">
<input class="form-element" type="submit"
name="manage_move_objects_up:method" value="Up" />
/
<input class="form-element" type="submit"
name="manage_move_objects_down:method" value="Down" />
by
<select name="delta:int">
<dtml-in "_.range(1,_.min(5,_.len(objectIds())))">
<option>&dtml-sequence-item;</option>
</dtml-in>
<dtml-in "_.range(5,_.len(objectIds()),5)">
<option>&dtml-sequence-item;</option>
</dtml-in>
</select>
<input class="form-element" type="submit"
name="manage_move_objects_to_top:method" value="Top" />
<input class="form-element" type="submit"
name="manage_move_objects_to_bottom:method" value="Bottom" />
</dtml-if>
<dtml-unless expr="(skey, rkey and 1 or 0) == getDefaultSorting()">
<input type="hidden" name="key" value="&dtml-skey;">
<input type="hidden" name="reverse" value="&dtml-rkey;">
<input class="form-element" type="submit"
name="manage_set_default_sorting:method"
value="Set View as Default" />
</dtml-unless>
</div>
</div>
</td>
</td>
</tr>
</tr>
</dtml-if>
</table>
</table>
</dtml-let>
<dtml-else>
<dtml-else>
<table cellspacing="0" cellpadding="2" border="0">
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<tr>
...
@@ -248,26 +126,10 @@ if (document.forms[0]) {
...
@@ -248,26 +126,10 @@ if (document.forms[0]) {
There are currently no items in <em>&dtml-title_or_id;</em>
There are currently no items in <em>&dtml-title_or_id;</em>
<br /><br />
<br /><br />
</div>
</div>
<dtml-unless dontAllowCopyAndPaste>
<dtml-if cb_dataValid>
<div class="form-element">
<input class="form-element" type="submit" name="manage_pasteObjects:method"
value="Paste" />
</div>
</dtml-if>
</dtml-unless>
</td>
</td>
</tr>
</tr>
</table>
</table>
</dtml-if>
</dtml-if>
</form>
</form>
<dtml-if update_menu>
<script type="text/javascript">
<!--
window.parent.update_menu();
//-->
</script>
</dtml-if>
<dtml-var manage_page_footer>
<dtml-var manage_page_footer>
src/OFS/interfaces.py
View file @
cab094bb
...
@@ -609,14 +609,6 @@ class ICopyContainer(Interface):
...
@@ -609,14 +609,6 @@ class ICopyContainer(Interface):
"""Clone an object, creating a new object with the given id.
"""Clone an object, creating a new object with the given id.
"""
"""
def
cb_dataValid
():
"""Return true if clipboard data seems valid.
"""
def
cb_dataItems
():
"""List of objects in the clip board.
"""
def
_verifyObjectPaste
(
object
,
validate_src
=
1
):
def
_verifyObjectPaste
(
object
,
validate_src
=
1
):
"""Verify whether the current user is allowed to paste the passed
"""Verify whether the current user is allowed to paste the passed
object into self. This is determined by checking to see if the
object into self. This is determined by checking to see if the
...
...
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