mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Added missing dependent javascript 'jquery.aciFragment' required by the
aciTree. Also - fixed few CSS specifically for the preferences dialog. Returning the sorted preferences from the server, so that - it lists down in correct order.
This commit is contained in:
parent
37699a9820
commit
ef7737c709
@ -114,7 +114,18 @@ class BrowserModule(PgAdminModule):
|
|||||||
filename='js/aciTree/jquery.aciSortable.min'
|
filename='js/aciTree/jquery.aciSortable.min'
|
||||||
),
|
),
|
||||||
'deps': ['jquery', 'jquery.aciplugin'],
|
'deps': ['jquery', 'jquery.aciplugin'],
|
||||||
'exports': 'aciPluginClass.plugins.aciTree',
|
'exports': 'aciPluginClass.plugins.aciSortable',
|
||||||
|
'when': None,
|
||||||
|
'preloaded': True
|
||||||
|
})
|
||||||
|
scripts.append({
|
||||||
|
'name': 'jquery.acifragment',
|
||||||
|
'path': url_for(
|
||||||
|
'browser.static',
|
||||||
|
filename='js/aciTree/jquery.aciFragment.min'
|
||||||
|
),
|
||||||
|
'deps': ['jquery', 'jquery.aciplugin'],
|
||||||
|
'exports': 'aciPluginClass.plugins.aciFragment',
|
||||||
'when': None,
|
'when': None,
|
||||||
'preloaded': True
|
'preloaded': True
|
||||||
})
|
})
|
||||||
|
@ -91,6 +91,9 @@ def preferences():
|
|||||||
preferences = Preferences.preferences()
|
preferences = Preferences.preferences()
|
||||||
res = []
|
res = []
|
||||||
|
|
||||||
|
def label(p):
|
||||||
|
return p['label']
|
||||||
|
|
||||||
for m in preferences:
|
for m in preferences:
|
||||||
if len(m['categories']):
|
if len(m['categories']):
|
||||||
om = {
|
om = {
|
||||||
@ -108,15 +111,16 @@ def preferences():
|
|||||||
"label": c['label'],
|
"label": c['label'],
|
||||||
"inode": False,
|
"inode": False,
|
||||||
"open": False,
|
"open": False,
|
||||||
"preferences": c['preferences']
|
"preferences": sorted(c['preferences'], key=label)
|
||||||
}
|
}
|
||||||
|
|
||||||
(om['branch']).append(oc)
|
(om['branch']).append(oc)
|
||||||
|
om['branch'] = sorted(om['branch'], key=label)
|
||||||
|
|
||||||
res.append(om)
|
res.append(om)
|
||||||
|
|
||||||
return ajax_response(
|
return ajax_response(
|
||||||
response=res,
|
response=sorted(res, key=label),
|
||||||
status=200
|
status=200
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
.preferences_dialog {
|
.preferences_dialog {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: absolute;
|
width: 100%;
|
||||||
top: 5px;
|
padding-top: 34px;
|
||||||
left: 0px;
|
padding-bottom: 39px;
|
||||||
bottom: 0px;
|
|
||||||
right: 0px;
|
|
||||||
padding-bottom: 30px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.preferences_tree{
|
.preferences_tree{
|
||||||
@ -23,6 +20,11 @@
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.pgadmin-preference-body div.ajs-content {
|
||||||
|
top: 0px !important;
|
||||||
|
bottom: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
.preferences_content .control-label, .preferences_content .pgadmin-controls {
|
.preferences_content .control-label, .preferences_content .pgadmin-controls {
|
||||||
min-width: 100px !important;
|
min-width: 100px !important;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user