Fix disconnection of new databases. Fixes #2594

This commit is contained in:
Murtuza Zabuawala
2017-07-21 11:11:03 +01:00
committed by Dave Page
parent b313cbce0d
commit acaa79cf6b
@@ -173,7 +173,7 @@ define('pgadmin.node.database', [
},
/* Disconnect the database */
disconnect_database: function(args) {
var input = args || {};
var input = args || {},
obj = this,
t = pgBrowser.tree,
i = input.item || t.selected(),
@@ -192,8 +192,8 @@ define('pgadmin.node.database', [
type:'DELETE',
success: function(res) {
if (res.success == 1) {
var prv_i = t.parent(i);
var alertifyWrapper = new AlertifyWrapper();
var prv_i = t.parent(i),
alertifyWrapper = new AlertifyWrapper();
alertifyWrapper.success(res.info);
t.removeIcon(i);
data.connected = false;