Commit 033092a5 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update ui_selector.py to replace the accordion layout by collapsible fieldset.

parent 8d4394e3
......@@ -108,55 +108,55 @@ class SelectorUi(object):
items = [
{
"title": T("Period"),
"items": ["SelectorYear_start",
"SelectorYear_end"]
"collapsible": True,
"items": [mapfields["SelectorYear_start"],
mapfields["SelectorYear_end"]],
"xtype": "fieldset"
}, {
"title": T("Metadata"),
"items": ["SelectorId_domains",
"SelectorId_teams",
"SelectorId_projects"]
"title": T("Metadata"),
"collapsible": True,
"items": [mapfields["SelectorId_domains"],
mapfields["SelectorId_teams"],
mapfields["SelectorId_projects"]],
"xtype": "fieldset"
}, {
"title": T("People"),
"collapsible": True,
"collapsed": True,
"items": ["SelectorId_people",
"SelectorId_people_categories",
"SelectorId_people_code"]
"items": [mapfields["SelectorId_people"],
mapfields["SelectorId_people_categories"],
mapfields["SelectorId_people_code"]],
"xtype": "fieldset"
}, {
"title": T("Object"),
"collapsible": True,
"collapsed": True,
"items": ["SelectorId_objects",
"SelectorId_object_categories",
"SelectorId_object_code"]
"items": [mapfields["SelectorId_objects"],
mapfields["SelectorId_object_categories"],
mapfields["SelectorId_object_code"]],
"xtype": "fieldset"
}, {
"title": T("Fundings"),
"collapsible": True,
"collapsed": True,
"layout": "fit",
"items": ["SelectorId_fundings"]
"items": [mapfields["SelectorId_fundings"]],
"xtype": "fieldset"
}, {
"title": T("Query"),
"collapsible": True,
"collapsed": False,
"layout": "fit",
"items": ["SelectorQuery"]
"items": [mapfields["SelectorQuery"]],
"xtype": "fieldset"
}
]
for panel in items:
panelitems = panel["items"]
for i, v in enumerate(panelitems):
panelitems[i] = mapfields[v]
# configure the accordion layout
# several panel can be open at the same time (multi)
accordion = dict(
multi=True,
titleCollapse=True,
type="accordion")
# wrap fields within a FieldSet
fieldset1 = dbui.FieldSet(
defaults=dict(frame=True),
items=items,
layout=accordion,
layout="anchor",
plugins=["pFormToolTip"],
title=T("Select"))
......
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