Fix disconnection of new databases. Fixes #2594
parent
b313cbce0d
commit
acaa79cf6b
|
@ -173,11 +173,11 @@ define('pgadmin.node.database', [
|
||||||
},
|
},
|
||||||
/* Disconnect the database */
|
/* Disconnect the database */
|
||||||
disconnect_database: function(args) {
|
disconnect_database: function(args) {
|
||||||
var input = args || {};
|
var input = args || {},
|
||||||
obj = this,
|
obj = this,
|
||||||
t = pgBrowser.tree,
|
t = pgBrowser.tree,
|
||||||
i = input.item || t.selected(),
|
i = input.item || t.selected(),
|
||||||
d = i && i.length == 1 ? t.itemData(i) : undefined;
|
d = i && i.length == 1 ? t.itemData(i) : undefined;
|
||||||
|
|
||||||
if (!d)
|
if (!d)
|
||||||
return false;
|
return false;
|
||||||
|
@ -192,8 +192,8 @@ define('pgadmin.node.database', [
|
||||||
type:'DELETE',
|
type:'DELETE',
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
if (res.success == 1) {
|
if (res.success == 1) {
|
||||||
var prv_i = t.parent(i);
|
var prv_i = t.parent(i),
|
||||||
var alertifyWrapper = new AlertifyWrapper();
|
alertifyWrapper = new AlertifyWrapper();
|
||||||
alertifyWrapper.success(res.info);
|
alertifyWrapper.success(res.info);
|
||||||
t.removeIcon(i);
|
t.removeIcon(i);
|
||||||
data.connected = false;
|
data.connected = false;
|
||||||
|
|
Loading…
Reference in New Issue