From 3f25e9331ffc5ed88591238ac8f68a1d5994e45f Mon Sep 17 00:00:00 2001 From: Surinder Kumar Date: Mon, 20 Jun 2016 14:17:10 +0100 Subject: [PATCH] Remove Query tool from object menu. It is already shown under tools menu, so no need to show under object menu. --- web/pgadmin/browser/templates/browser/js/collection.js | 4 ++-- web/pgadmin/browser/templates/browser/js/node.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/pgadmin/browser/templates/browser/js/collection.js b/web/pgadmin/browser/templates/browser/js/collection.js index 6575675ba..776ac4c41 100644 --- a/web/pgadmin/browser/templates/browser/js/collection.js +++ b/web/pgadmin/browser/templates/browser/js/collection.js @@ -37,12 +37,12 @@ function($, _, S, pgAdmin, Backbone, Alertify, Backform) { icon: 'fa fa-refresh' }]); - // show query tool in context & object menu of supported nodes. + // show query tool only in context menu of supported nodes. if (pgAdmin.DataGrid && pgAdmin.unsupported_nodes) { if (_.indexOf(pgAdmin.unsupported_nodes, this.type) == -1) { pgAdmin.Browser.add_menus([{ name: 'show_query_tool', node: this.type, module: this, - applies: ['object', 'context'], callback: 'show_query_tool', + applies: ['context'], callback: 'show_query_tool', priority: 998, label: '{{ _("Query Tool...") }}', icon: 'fa fa-bolt' }]); diff --git a/web/pgadmin/browser/templates/browser/js/node.js b/web/pgadmin/browser/templates/browser/js/node.js index e83981c47..247966e77 100644 --- a/web/pgadmin/browser/templates/browser/js/node.js +++ b/web/pgadmin/browser/templates/browser/js/node.js @@ -107,12 +107,12 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) { } } - // show query tool in context & object menu of supported nodes. + // show query tool only in context menu of supported nodes. if (pgAdmin.DataGrid && pgAdmin.unsupported_nodes) { if (_.indexOf(pgAdmin.unsupported_nodes, self.type) == -1) { pgAdmin.Browser.add_menus([{ name: 'show_query_tool', node: self.type, module: self, - applies: ['object', 'context'], callback: 'show_query_tool', + applies: ['context'], callback: 'show_query_tool', priority: 998, label: '{{ _("Query Tool...") }}', icon: 'fa fa-bolt' }]);