From 9d9f17c16360fa21ac7fcc25d4efa4d6356f0c63 Mon Sep 17 00:00:00 2001 From: Harshal Dhumal Date: Mon, 4 Jan 2016 16:54:06 +0530 Subject: [PATCH] Clear the status-bar on the 'on-status-clear' event of the model --- web/pgadmin/browser/templates/browser/js/node.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/web/pgadmin/browser/templates/browser/js/node.js b/web/pgadmin/browser/templates/browser/js/node.js index 43062553a..a101460d9 100644 --- a/web/pgadmin/browser/templates/browser/js/node.js +++ b/web/pgadmin/browser/templates/browser/js/node.js @@ -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.