mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure that the query tool context menu should work on the collection nodes. Fixes #5415
This commit is contained in:
committed by
Akshay Joshi
parent
dc4571a3c8
commit
05abb9e430
@@ -71,4 +71,5 @@ Bug fixes
|
||||
| `Issue #5400 <https://redmine.postgresql.org/issues/5400>`_ - Fixed internal server error when the database server is logged in with non-super user.
|
||||
| `Issue #5401 <https://redmine.postgresql.org/issues/5401>`_ - Fixed search object issue when the object name contains special characters.
|
||||
| `Issue #5409 <https://redmine.postgresql.org/issues/5409>`_ - Fixed validation issue in Synonyms node.
|
||||
| `Issue #5410 <https://redmine.postgresql.org/issues/5410>`_ - Fixed an issue while removing the package body showing wrong modified SQL.
|
||||
| `Issue #5410 <https://redmine.postgresql.org/issues/5410>`_ - Fixed an issue while removing the package body showing wrong modified SQL.
|
||||
| `Issue #5415 <https://redmine.postgresql.org/issues/5415>`_ - Ensure that the query tool context menu should work on the collection nodes.
|
@@ -51,11 +51,10 @@ define([
|
||||
}]);
|
||||
|
||||
// show query tool only in context menu of supported nodes.
|
||||
|
||||
if (pgAdmin.unsupported_nodes && _.indexOf(pgAdmin.unsupported_nodes, this.type) == -1) {
|
||||
if ((this.type == 'database' && this.allowConn) || this.type != 'database') {
|
||||
pgAdmin.Browser.add_menus([{
|
||||
name: 'show_query_tool', node: this.type, module: pgAdmin.DataGrid,
|
||||
name: 'show_query_tool', node: this.type, module: this,
|
||||
applies: ['context'], callback: 'show_query_tool',
|
||||
priority: 998, label: gettext('Query Tool...'),
|
||||
icon: 'pg-font-icon icon-query-tool',
|
||||
@@ -63,7 +62,7 @@ define([
|
||||
|
||||
// show search objects same as query tool
|
||||
pgAdmin.Browser.add_menus([{
|
||||
name: 'search_objects', node: this.type, module: pgAdmin.SearchObjects,
|
||||
name: 'search_objects', node: this.type, module: this,
|
||||
applies: ['context'], callback: 'show_search_objects',
|
||||
priority: 997, label: gettext('Search Objects...'),
|
||||
icon: 'fa fa-search',
|
||||
@@ -452,6 +451,16 @@ define([
|
||||
collectionPickFunction
|
||||
);
|
||||
},
|
||||
show_query_tool: function() {
|
||||
if(pgAdmin.DataGrid) {
|
||||
pgAdmin.DataGrid.show_query_tool('', pgAdmin.Browser.tree.selected());
|
||||
}
|
||||
},
|
||||
show_search_objects: function() {
|
||||
if(pgAdmin.SearchObjects) {
|
||||
pgAdmin.SearchObjects.show_search_objects('', pgAdmin.Browser.tree.selected());
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
return pgBrowser.Collection;
|
||||
|
Reference in New Issue
Block a user