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): ...@@ -108,55 +108,55 @@ class SelectorUi(object):
items = [ items = [
{ {
"title": T("Period"), "title": T("Period"),
"items": ["SelectorYear_start", "collapsible": True,
"SelectorYear_end"] "items": [mapfields["SelectorYear_start"],
mapfields["SelectorYear_end"]],
"xtype": "fieldset"
}, { }, {
"title": T("Metadata"), "title": T("Metadata"),
"items": ["SelectorId_domains", "collapsible": True,
"SelectorId_teams", "items": [mapfields["SelectorId_domains"],
"SelectorId_projects"] mapfields["SelectorId_teams"],
mapfields["SelectorId_projects"]],
"xtype": "fieldset"
}, { }, {
"title": T("People"), "title": T("People"),
"collapsible": True,
"collapsed": True, "collapsed": True,
"items": ["SelectorId_people", "items": [mapfields["SelectorId_people"],
"SelectorId_people_categories", mapfields["SelectorId_people_categories"],
"SelectorId_people_code"] mapfields["SelectorId_people_code"]],
"xtype": "fieldset"
}, { }, {
"title": T("Object"), "title": T("Object"),
"collapsible": True,
"collapsed": True, "collapsed": True,
"items": ["SelectorId_objects", "items": [mapfields["SelectorId_objects"],
"SelectorId_object_categories", mapfields["SelectorId_object_categories"],
"SelectorId_object_code"] mapfields["SelectorId_object_code"]],
"xtype": "fieldset"
}, { }, {
"title": T("Fundings"), "title": T("Fundings"),
"collapsible": True,
"collapsed": True, "collapsed": True,
"layout": "fit", "layout": "fit",
"items": ["SelectorId_fundings"] "items": [mapfields["SelectorId_fundings"]],
"xtype": "fieldset"
}, { }, {
"title": T("Query"), "title": T("Query"),
"collapsible": True,
"collapsed": False, "collapsed": False,
"layout": "fit", "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 # wrap fields within a FieldSet
fieldset1 = dbui.FieldSet( fieldset1 = dbui.FieldSet(
defaults=dict(frame=True), defaults=dict(frame=True),
items=items, items=items,
layout=accordion, layout="anchor",
plugins=["pFormToolTip"], plugins=["pFormToolTip"],
title=T("Select")) 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