Clear the status-bar on the 'on-status-clear' event of the model

This commit is contained in:
Harshal Dhumal 2016-01-04 16:54:06 +05:30 committed by Ashesh Vashi
parent 7358549524
commit 9d9f17c163

View File

@ -118,9 +118,15 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, Backform) {
info = this.getTreeNodeHierarchy.apply(this, [item]),
groups = Backform.generateViewSchema(info, newModel, type, this, node);
if (type == 'create' || type == 'edit'){
newModel.on('on-status', function(e){
that.statusBar.html(e.msg);
if (type == 'create' || type == 'edit') {
newModel.on('on-status', function(e) {
if(!_.isUndefined(that.statusBar)) {
that.statusBar.html(e.msg);
}
}).on('on-status-clear', function(e) {
if(!_.isUndefined(that.statusBar)) {
that.statusBar.empty();
}
});
}
// 'schema' has the information about how to generate the form.