Introduced new controls to show the list of a node type (by name and id) as properties of other node.

Resolved a typo in privileges control.
Removed duplicate lines in backform.pgadmin.js
This commit is contained in:
Ashesh Vashi
2015-12-28 01:00:20 +05:30
parent d56ddb9fa4
commit eb83d57c5a
8 changed files with 183 additions and 33 deletions

View File

@@ -130,33 +130,6 @@
' </span>',
'</div>'
].join("\n"));
Backform.Control.prototype.clearInvalid = function() {
this.$el.removeClass(Backform.errorClassName);
this.$el.find(".pgadmin-control-error-message").remove();
return this;
};
Backform.Control.prototype.updateInvalid = function() {
var self = this;
var errorModel = this.model.errorModel;
if (!(errorModel instanceof Backbone.Model)) return this;
this.clearInvalid();
this.$el.find(':input').not('button').each(function(ix, el) {
var attrArr = $(el).attr('name').split('.'),
name = attrArr.shift(),
path = attrArr.join('.'),
error = self.keyPathAccessor(errorModel.toJSON(), $(el).attr('name'));
if (_.isEmpty(error)) return;
self.$el.addClass(Backform.errorClassName).append(
$("<div></div>").addClass('pgadmin-control-error-message col-xs-12 help-block').text(error)
);
});
};
Backform.Control.prototype.clearInvalid = function() {
this.$el.removeClass(Backform.errorClassName);
this.$el.find(".pgadmin-control-error-message").remove();