From 9bbc05051cc852e558ebcdf5a83644b97f09a82a Mon Sep 17 00:00:00 2001 From: Surinder Kumar Date: Wed, 12 Apr 2017 15:46:31 +0100 Subject: [PATCH] Remove some unused events. --- .../servers/templates/servers/servers.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/web/pgadmin/browser/server_groups/servers/templates/servers/servers.js b/web/pgadmin/browser/server_groups/servers/templates/servers/servers.js index 0b7415a93..9eb82b820 100644 --- a/web/pgadmin/browser/server_groups/servers/templates/servers/servers.js +++ b/web/pgadmin/browser/server_groups/servers/templates/servers/servers.js @@ -106,13 +106,6 @@ function($, _, S, pgAdmin, pgBrowser, alertify) { pgBrowser.messages['NO_PRIV_SELECTED'] = '{{ _('At least one privilege should be selected.') }}'; - pgBrowser.Events.on( - 'pgadmin:server:disconnect', this.callbacks.disconnect_server - ); - pgBrowser.Events.on( - 'pgadmin:server:connect', this.callbacks.connect_server - ); - _.bindAll(this, 'connection_lost'); pgBrowser.Events.on( 'pgadmin:server:connection:lost', this.connection_lost @@ -206,7 +199,11 @@ function($, _, S, pgAdmin, pgBrowser, alertify) { delete pgBrowser.serverInfo[d._id] } pgBrowser.enable_disable_menus(i); - obj.trigger('server-disconnected', obj, i, d); + // Trigger server disconnect event + pgBrowser.Events.trigger( + 'pgadmin:server:disconnect', + {item: i, data: d}, false + ); } else { try {