Added tab navigation for tabs under explain panel in query tool. Fixes #5047.

This commit is contained in:
Ganesh Jaybhay 2020-01-01 10:51:45 +05:30 committed by Akshay Joshi
parent 8c4dff057f
commit fc5287bd9f
3 changed files with 10 additions and 3 deletions

View File

@ -27,4 +27,5 @@ Bug fixes
| `Issue #4999 <https://redmine.postgresql.org/issues/4999>`_ - Rename some internal environment variables that could conflict with Kubernetes.
| `Issue #5004 <https://redmine.postgresql.org/issues/5004>`_ - Fix vulnerability issues reported by 'yarn audit'. Replace the deprecated uglifyjs-webpack-plugin with a terser-webpack-plugin.
| `Issue #5008 <https://redmine.postgresql.org/issues/5008>`_ - Ensure that the error message should not be displayed if Tablespace is not selected while creating the index.
| `Issue #5009 <https://redmine.postgresql.org/issues/5009>`_ - Fix an issue where operator, access method and operator class is not visible for exclusion constraints.
| `Issue #5009 <https://redmine.postgresql.org/issues/5009>`_ - Fix an issue where operator, access method and operator class is not visible for exclusion constraints.
| `Issue #5047 <https://redmine.postgresql.org/issues/5047>`_ - Added tab navigation for tabs under explain panel in query tool.

View File

@ -1187,7 +1187,7 @@ define('pgadmin.misc.explain', [
return [
' <li class="nav-item" role="presentation">',
' <a class="nav-link ', _active ? 'active' : '', '"',
' data-toggle="tab" tabindex="-1"',
' data-toggle="tab" tabindex="0"',
` data-tab-index="${_idx}"`,
' aria-selected="', _active ? 'true' : 'false', '"',
` role="tab" data-explain-role="${_type}"`,
@ -1199,7 +1199,7 @@ define('pgadmin.misc.explain', [
},
createTabPanel = (_type, _active, _extraClasses) => {
return [
' <div role="tabpanel" tabindex="-1" class="tab-pane pg-el-sm-12',
' <div role="tabpanel" tabindex="0" class="tab-pane pg-el-sm-12',
' pg-el-md-12 pg-el-lg-12 pg-el-12 fade collapse',
_active ? ' active show' : '', ` ${_extraClasses}"`,
` data-explain-tabpanel="${_type}"`,

View File

@ -404,6 +404,12 @@ define('tools.querytool', [
self.query_tool_obj.focus();
});
pgBrowser.Events.on('pgadmin:query_tool:explain:focus', ()=>{
setTimeout(function () {
$('.sql-editor-explain .backform-tab .nav-link.active').focus();
}, 200);
});
if (!self.preferences.new_browser_tab) {
// Listen on the panel closed event and notify user to save modifications.
_.each(pgWindow.default.pgAdmin.Browser.docker.findPanels('frm_datagrid'), function(p) {