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
dc03a0be
Commit
dc03a0be
authored
Dec 04, 2010
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Forward ported c118710 from 2.13 branch
parent
e125691f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
doc/CHANGES.rst
doc/CHANGES.rst
+5
-3
src/OFS/OrderSupport.py
src/OFS/OrderSupport.py
+11
-3
No files found.
doc/CHANGES.rst
View file @
dc03a0be
...
...
@@ -16,14 +16,16 @@ Bugs Fixed
since Python 2.5. This breaks Python 2.4 compatibility when the
publisher-profile-file configuration option is set.
- Use cProfile where possible for the
Control_Panel/DebugInfo/manage_profile ZMI view.
Features Added
++++++++++++++
- Moved subset id calculation in `OFS.OrderSupport.moveObjectsByDelta` to a
new helper method, patch by Tom Gross.
- Updated to Zope Toolkit 1.0.1.
- Use cProfile where possible for the
Control_Panel/DebugInfo/manage_profile ZMI view.
Restructuring
+++++++++++++
...
...
src/OFS/OrderSupport.py
View file @
dc03a0be
...
...
@@ -134,12 +134,12 @@ class OrderSupport(object):
suppress_events
=
False
):
""" Move specified sub-objects by delta.
"""
if
type
(
ids
)
is
str
:
if
isinstance
(
ids
,
basestring
)
:
ids
=
(
ids
,)
min_position
=
0
objects
=
list
(
self
.
_objects
)
if
subset_ids
==
None
:
subset_ids
=
[
obj
[
'id'
]
for
obj
in
objects
]
if
subset_ids
is
None
:
subset_ids
=
self
.
getIdsSubset
(
objects
)
else
:
subset_ids
=
list
(
subset_ids
)
# unify moving direction
...
...
@@ -283,4 +283,12 @@ class OrderSupport(object):
r
.
reverse
()
return
r
#
# Helper methods
#
def
getIdsSubset
(
self
,
objects
):
return
[
obj
[
'id'
]
for
obj
in
objects
]
InitializeClass
(
OrderSupport
)
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