Fixes #1150 - Disconnecting a database action should followed by
updating the menu state according to its current state.pull/3/head
parent
4741992ad7
commit
db79f3ff3d
|
@ -144,6 +144,7 @@ function($, _, S, pgAdmin, pgBrowser, Alertify) {
|
||||||
type:'DELETE',
|
type:'DELETE',
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
if (res.success == 1) {
|
if (res.success == 1) {
|
||||||
|
var prv_i = t.parent(i);
|
||||||
Alertify.success("{{ _('" + res.info + "') }}");
|
Alertify.success("{{ _('" + res.info + "') }}");
|
||||||
t.removeIcon(i);
|
t.removeIcon(i);
|
||||||
data.connected = false;
|
data.connected = false;
|
||||||
|
@ -151,6 +152,10 @@ function($, _, S, pgAdmin, pgBrowser, Alertify) {
|
||||||
t.addIcon(i, {icon: data.icon});
|
t.addIcon(i, {icon: data.icon});
|
||||||
t.unload(i);
|
t.unload(i);
|
||||||
t.setInode(i);
|
t.setInode(i);
|
||||||
|
setTimeout(function() {
|
||||||
|
t.select(prv_i);
|
||||||
|
}, 10);
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue