Use the same schema parameter 'visible' instead of separate one (i.e.

show) for both control and cell, while generating the columns and field
Schema. And, it was resulting into wrong behaviour because of that.

Also - includes the server changes, which was using 'show' parameter
earlier for showing version, when server was connected.
pull/3/head
Murtuza Zabuawala 2016-01-15 19:25:45 +05:30 committed by Ashesh Vashi
parent 4e5e7755b5
commit 45240f3850
2 changed files with 4 additions and 7 deletions

View File

@ -158,7 +158,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
}
},{
id: 'version', label:'{{ _('Version') }}', type: 'text', group: null,
mode: ['properties'], show: 'isConnected'
mode: ['properties'], visible: 'isConnected'
},{
id: 'comment', label:'{{ _('Comments') }}', type: 'multiline', group: null,
mode: ['properties', 'edit', 'create']
@ -190,7 +190,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
]
},{
id: 'server_type', label: '{{ _('Server Type') }}', type: 'options',
mode: ['properties'], show: 'isConnected',
mode: ['properties'], visible: 'isConnected',
'options': [{% for st in server_types %}
{label: '{{ st.description }}', value: '{{ st.server_type }}'},{% endfor %}
{label: '{{ _('Unknown') }}', value: ''}

View File

@ -1269,8 +1269,6 @@
var o = _.extend(_.clone(s), {
name: s.id,
// Do we need to show this control in this mode?
visible: evalASFunc(s.show),
// This can be disabled in some cases (if not hidden)
disabled: (disabled ? true : evalASFunc(s.disabled)),
@ -1285,9 +1283,8 @@
cell: cell,
node_info: node_info,
schema_node: schema_node,
visible: (mode == 'properties'?
(ver_in_limit ?
(s.version || true) : false) : s.version || true),
// Do we need to show this control in this mode?
visible: evalASFunc(s.visible),
node: node,
node_data: treeData,
version_compitible: ver_in_limit