Commit 4fedae1e authored by Yoshinori Okuji's avatar Yoshinori Okuji

Change wrong names (i.e. selection_*), and add a workaround for a fixed bug in Selection.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1371 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1cb6b0d5
......@@ -508,12 +508,12 @@ class ListBoxWidget(Widget.Widget):
# Filter non searchable items
sort_list = []
fix_sort = 0
for (k , v) in selection.selection_sort_on:
for (k , v) in selection.sort_on:
if k in sort_columns_id_list:
sort_list.append((k,v))
else:
fix_sort = 1
if fix_sort: selection.selection_sort_on = sort_list
if fix_sort: selection.sort_on = sort_list
if not hasattr(selection, 'flat_list_mode'):
selection.edit(flat_list_mode=(not (domain_tree or
......@@ -525,7 +525,7 @@ class ListBoxWidget(Widget.Widget):
# Display choosen by the user
if selection.selection_flat_list_mode is not None:
if selection.flat_list_mode is not None:
if selection.flat_list_mode == 1:
domain_tree = 0
report_tree = 0
......@@ -702,6 +702,7 @@ class ListBoxWidget(Widget.Widget):
if len(selection_domain_current) > 0:
root_dict = {}
for domain in selection_domain_current:
if type(domain) != type(''): continue # XXX workaround for a past bug in Selection
root = None
base_category = domain.split('/')[0]
if portal_categories is not None:
......@@ -715,9 +716,9 @@ class ListBoxWidget(Widget.Widget):
root_dict[None] = portal_object.restrictedTraverse(domain)
except KeyError:
root = None
LOG('domain_tree root aq_parent', 0, str(root_dict[base_category].aq_parent))
#LOG('domain_tree root aq_parent', 0, str(root_dict[base_category].aq_parent))
selection.edit(domain = DomainSelection(domain_dict = root_dict))
LOG('selection.domain', 0, str(selection.domain.__dict__))
#LOG('selection.domain', 0, str(selection.domain.__dict__))
else:
selection.edit(domain = None)
......
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