mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-19 01:15:04 -05:00
Fixed following issues found while testing v9.6 candidate build:
1. Migration failed on Debian 11. 2. Menu shortcuts should not for opening search object and query tool when not in default workspace. Co-authored-by: Yogesh Mahajan <yogesh.mahajan@enterprisedb.com> Co-authored-by: Pravesh Sharma <pravesh.sharma@enterprisedb.com>
This commit is contained in:
co-authored by
Yogesh Mahajan
Pravesh Sharma
parent
fdc38f75f8
commit
c4f7a18ec5
@@ -129,7 +129,7 @@ export default class MainMenuFactory {
|
||||
}
|
||||
|
||||
static enableDisableMenus(item) {
|
||||
let itemData = item ? pgAdmin.Browser.tree.itemData(item) : undefined;
|
||||
let itemData = item ? pgAdmin.Browser.tree.itemData(item) : pgAdmin.Browser.tree?.selected();
|
||||
|
||||
const checkForItems = (items)=>{
|
||||
items.forEach((mitem) => {
|
||||
|
||||
@@ -212,8 +212,10 @@ _.extend(pgBrowser.keyboardNavigation, {
|
||||
if (!tree.d)
|
||||
return;
|
||||
|
||||
// Check if the query tool is enabled for the current node
|
||||
let disabled = pgBrowser.MainMenus.find((m)=>(m.name=='tools'))?.menuItems?.find((m)=>(m.name=='query_tool'))?.isDisabled;
|
||||
// Call data grid method to render query tool
|
||||
pgAdmin.Tools.SQLEditor.showQueryTool('', tree.i);
|
||||
!disabled && pgAdmin.Tools.SQLEditor.showQueryTool('', tree.i);
|
||||
},
|
||||
bindSubMenuViewData: function() {
|
||||
const tree = this.getTreeDetails();
|
||||
@@ -230,8 +232,10 @@ _.extend(pgBrowser.keyboardNavigation, {
|
||||
if (!tree.d)
|
||||
return;
|
||||
|
||||
// Check if the search objects is enabled for the current node
|
||||
let disabled = pgBrowser.MainMenus.find((m)=>(m.name=='tools'))?.menuItems?.find((m)=>(m.name=='search_objects'))?.isDisabled;
|
||||
// Call show search object to open the search object dialog.
|
||||
pgAdmin.Tools.SearchObjects.show_search_objects('', tree.i);
|
||||
!disabled && pgAdmin.Tools.SearchObjects.show_search_objects('', tree.i);
|
||||
},
|
||||
bindSubMenuProperties: function() {
|
||||
const tree = this.getTreeDetails();
|
||||
|
||||
Reference in New Issue
Block a user