Added a new control for rendering the notes to be used by different

tools/utitilities dialog.

Modified a little bit by Ashesh Vashi.
This commit is contained in:
Murtuza Zabuawala
2016-04-28 11:52:04 +05:30
committed by Ashesh Vashi
parent 970e0c3540
commit dac514a4ae
3 changed files with 37 additions and 2 deletions

View File

@@ -67,7 +67,8 @@
'collection': ['sub-node-collection', 'sub-node-collection', 'string'],
'uniqueColCollection': ['unique-col-collection', 'unique-col-collection', 'string'],
'switch' : 'switch',
'select2': 'select2'
'select2': 'select2',
'note': 'note'
};
var getMappedControl = Backform.getMappedControl = function(type, mode) {
@@ -2015,5 +2016,20 @@
}
});
// We will use this control just as a annotate in Backform
var NoteControl = Backform.NoteControl = Backform.Control.extend({
defaults: {
label: window.pgAdmin.Browser.messages.NOTE_CTRL_LABEL,
text: '',
extraClasses: [],
noteClass: 'backform_control_notes'
},
template: _.template([
'<div class="<%=noteClass%> col-xs-12 <%=extraClasses.join(\' \')%>">',
'<label class="control-label"><%=label%>:</label>',
'<span><%=text%></span></div>'
].join("\n"))
});
return Backform;
}));