Fixes #1150 - Disconnecting a database action should followed by

updating the menu state according to its current state.
pull/3/head
Murtuza Zabuawala 2016-05-25 17:44:16 +05:30 committed by Ashesh Vashi
parent 4741992ad7
commit db79f3ff3d
1 changed files with 5 additions and 0 deletions

View File

@ -144,6 +144,7 @@ function($, _, S, pgAdmin, pgBrowser, Alertify) {
type:'DELETE',
success: function(res) {
if (res.success == 1) {
var prv_i = t.parent(i);
Alertify.success("{{ _('" + res.info + "') }}");
t.removeIcon(i);
data.connected = false;
@ -151,6 +152,10 @@ function($, _, S, pgAdmin, pgBrowser, Alertify) {
t.addIcon(i, {icon: data.icon});
t.unload(i);
t.setInode(i);
setTimeout(function() {
t.select(prv_i);
}, 10);
}
else {
try {