Ensure create new object dialog should be opened when alt+shift+n key is pressed on the collection node. Fixes #3130

This commit is contained in:
Aditya Toshniwal 2019-11-05 11:20:03 +05:30 committed by Akshay Joshi
parent 080ccdda5b
commit e10b58e4ca
2 changed files with 11 additions and 3 deletions

View File

@ -20,6 +20,7 @@ Housekeeping
Bug fixes
*********
| `Issue #3130 <https://redmine.postgresql.org/issues/3130>`_ - Ensure create new object dialog should be opened when alt+shift+n key is pressed on the collection node.
| `Issue #3789 <https://redmine.postgresql.org/issues/3789>`_ - Ensure context menus never get hidden below the menu bar.
| `Issue #3913 <https://redmine.postgresql.org/issues/3913>`_ - Ensure the correct "running at" agent is shown when a pgAgent job is executing.
| `Issue #3915 <https://redmine.postgresql.org/issues/3915>`_ - Fix an issue in the Query Tool where shortcut keys could be ignored following a query error.

View File

@ -273,13 +273,20 @@ _.extend(pgBrowser.keyboardNavigation, {
},
bindSubMenuCreate: function() {
const tree = this.getTreeDetails();
if (!tree.d || pgAdmin.Browser.Nodes[tree.t.itemData(tree.i)._type].collection_node === true)
let node_obj = pgAdmin.Browser.Nodes[tree.t.itemData(tree.i)._type];
if (!tree.d){
return;
} else if(node_obj.collection_node === true) {
if(node_obj.node) {
node_obj = pgAdmin.Browser.Nodes[node_obj.node];
} else {
return;
}
}
// Open properties dialog in edit mode
pgAdmin.Browser.Node.callbacks.show_obj_properties.call(
pgAdmin.Browser.Nodes[tree.t.itemData(tree.i)._type], {action: 'create'}
node_obj, {action: 'create', item: tree.i}
);
},
bindSubMenuDelete: function() {