Using bootstrap-swtich for creating a custom backform control for

boolean values. (Modified quite a lot by Ashesh, before committing).

This patch also allow to set the header class in the backgrid through
setting  'cellHeaderClass' property of the schema object for any of the
node. It will allow us to set the different behaviour of the cell in the
list. One of the test case for it is: this will allow us to set the
different width of each column in the list using CSS class(es).
This commit is contained in:
Murtuza Zabuawala
2015-12-04 15:49:08 +05:30
committed by Ashesh Vashi
parent a04ef2de43
commit c3b517cb91
12 changed files with 1122 additions and 12 deletions

View File

@@ -90,8 +90,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
d.connected = false;
d.icon = 'icon-server-not-connected';
t.addIcon(i, {icon: d.icon});
t.unload(i);
t.setInode(i);
obj.callbacks.refresh.apply(obj, [i]);
if (pgBrowser.serverInfo && d._id in pgBrowser.serverInfo) {
delete pgBrowser.serverInfo[d._id]
}
@@ -152,13 +151,19 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
id: 'name', label:'{{ _('Name') }}', type: 'text', group: null,
mode: ['properties', 'edit', 'create']
},{
id: 'connected', label:'{{ _('Connected') }}', type: 'text', group: null,
mode: ['properties']
id: 'connected', label:'{{ _('Connected') }}', type: 'switch', group: null,
mode: ['properties'], 'options': {
'onText': 'True',
'offText': 'False',
'onColor': 'success',
'offColor': 'default',
'size': 'normal'
}
},{
id: 'version', label:'{{ _('Version') }}', type: 'text', group: null,
mode: ['properties'], show: 'isConnected'
},{
id: 'comment', label:'{{ _('Comments:') }}', type: 'multiline', group: null,
id: 'comment', label:'{{ _('Comments') }}', type: 'multiline', group: null,
mode: ['properties', 'edit', 'create'], disabled: 'notEditMode'
},{
id: 'host', label:'{{ _('Host Name/Address') }}', type: 'text', group: "Connection",