Commit 9336a571 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

prevent errors in changing pages when listbox is modified background.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24543 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent be20aea1
......@@ -632,7 +632,6 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
lastPage.
"""
if uids is None: uids = []
selection = self.getSelectionFor(list_selection_name, REQUEST)
REQUEST.form['list_start'] = 0
self.uncheckAll(list_selection_name, listbox_uid)
return self.checkAll(list_selection_name, uids, REQUEST=REQUEST)
......@@ -647,6 +646,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
"""
if uids is None: uids = []
selection = self.getSelectionFor(list_selection_name, REQUEST)
if selection is not None:
params = selection.getParams()
# XXX This will not work if the number of lines shown in the listbox is greater
# than the BIG_INT constan. Such a case has low probability but is not
......@@ -668,6 +668,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
"""
if uids is None: uids = []
selection = self.getSelectionFor(list_selection_name, REQUEST)
if selection is not None:
params = selection.getParams()
lines = params.get('list_lines', 0)
start = REQUEST.form.pop('list_start', 0)
......@@ -683,6 +684,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
"""
if uids is None: uids = []
selection = self.getSelectionFor(list_selection_name, REQUEST)
if selection is not None:
params = selection.getParams()
lines = params.get('list_lines', 0)
start = REQUEST.form.pop('list_start', 0)
......@@ -698,6 +700,7 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
"""
if uids is None: uids = []
selection = self.getSelectionFor(list_selection_name, REQUEST)
if selection is not None:
params = selection.getParams()
params['list_start'] = int(REQUEST.form.pop('list_start', 0))
selection.edit(params=params)
......
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