1) Added tooltip & keyboard shortcut for the query tool button.

2) Fixed TypeError issue.

refs #4059
This commit is contained in:
Rahul Shirsat
2020-09-09 19:32:33 +05:30
committed by Akshay Joshi
parent 1bc1ef7f17
commit 62e6848dc8
6 changed files with 42 additions and 5 deletions

View File

@@ -161,6 +161,14 @@ let queryToolActions = {
sqlEditorController.close_on_save = false;
sqlEditorController.save_data();
},
openQueryTool: function (sqlEditorController) {
sqlEditorController.gridView.handler.trigger(
'pgadmin-sqleditor:button:show_query_tool',
sqlEditorController.gridView,
sqlEditorController.gridView.handler
);
},
};
module.exports = queryToolActions;

View File

@@ -136,6 +136,12 @@ function updateUIPreferences(sqlEditor) {
.attr('aria-label',
shortcut_title(gettext('Rollback'),preferences.rollback_transaction));
$el.find('#btn-show-query-tool')
.attr('title',
shortcut_title(gettext('Query tool'),preferences.show_query_tool))
.attr('aria-label',
shortcut_title(gettext('Query tool'),preferences.show_query_tool));
/* Set explain options on query editor */
if (preferences.explain_verbose){
$el.find('.explain-verbose').removeClass('visibility-hidden');