Remove Query tool from object menu. It is already shown under tools menu, so no need to show under object menu.

This commit is contained in:
Surinder Kumar 2016-06-20 14:17:10 +01:00 committed by Dave Page
parent 40b075389f
commit 3f25e9331f
2 changed files with 4 additions and 4 deletions

View File

@ -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'
}]);

View File

@ -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'
}]);