mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-07-07 04:53:25 -05:00
Ensure that the rename panel should be disabled when the SQL file opened in the query tool. Fixes #6058
This commit is contained in:
parent
c7ae5024d5
commit
c79614786f
|
@ -11,6 +11,7 @@ notes for it.
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
|
release_notes_4_30
|
||||||
release_notes_4_29
|
release_notes_4_29
|
||||||
release_notes_4_28
|
release_notes_4_28
|
||||||
release_notes_4_27
|
release_notes_4_27
|
||||||
|
|
|
@ -16,7 +16,6 @@ Housekeeping
|
||||||
| `Issue #5328 <https://redmine.postgresql.org/issues/5328>`_ - Improve code coverage and API test cases for Foreign Tables.
|
| `Issue #5328 <https://redmine.postgresql.org/issues/5328>`_ - Improve code coverage and API test cases for Foreign Tables.
|
||||||
| `Issue #5337 <https://redmine.postgresql.org/issues/5337>`_ - Improve code coverage and API test cases for Views and Materialized Views.
|
| `Issue #5337 <https://redmine.postgresql.org/issues/5337>`_ - Improve code coverage and API test cases for Views and Materialized Views.
|
||||||
| `Issue #5343 <https://redmine.postgresql.org/issues/5343>`_ - Improve code coverage and API test cases for Debugger.
|
| `Issue #5343 <https://redmine.postgresql.org/issues/5343>`_ - Improve code coverage and API test cases for Debugger.
|
||||||
| `Issue #6033 <https://redmine.postgresql.org/issues/6033>`_ - Update the cryptography python package for Python 3.5 and above.
|
|
||||||
| `Issue #6062 <https://redmine.postgresql.org/issues/6062>`_ - Ensure that code coverage should cover class and function declarations.
|
| `Issue #6062 <https://redmine.postgresql.org/issues/6062>`_ - Ensure that code coverage should cover class and function declarations.
|
||||||
|
|
||||||
Bug fixes
|
Bug fixes
|
||||||
|
|
20
docs/en_US/release_notes_4_30.rst
Normal file
20
docs/en_US/release_notes_4_30.rst
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
************
|
||||||
|
Version 4.30
|
||||||
|
************
|
||||||
|
|
||||||
|
Release date: 2021-01-07
|
||||||
|
|
||||||
|
This release contains a number of bug fixes and new features since the release of pgAdmin4 4.29.
|
||||||
|
|
||||||
|
New features
|
||||||
|
************
|
||||||
|
|
||||||
|
|
||||||
|
Housekeeping
|
||||||
|
************
|
||||||
|
|
||||||
|
|
||||||
|
Bug fixes
|
||||||
|
*********
|
||||||
|
|
||||||
|
| `Issue #6058 <https://redmine.postgresql.org/issues/6058>`_ - Ensure that the rename panel should be disabled when the SQL file opened in the query tool.
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
import {getTreeNodeHierarchyFromIdentifier} from '../../../../static/js/tree/pgadmin_tree_node';
|
import {getTreeNodeHierarchyFromIdentifier} from '../../../../static/js/tree/pgadmin_tree_node';
|
||||||
import gettext from 'sources/gettext';
|
import gettext from 'sources/gettext';
|
||||||
|
import $ from 'jquery';
|
||||||
|
|
||||||
export function getDatabaseLabel(parentData) {
|
export function getDatabaseLabel(parentData) {
|
||||||
return parentData.database ? parentData.database.label
|
return parentData.database ? parentData.database.label
|
||||||
|
@ -52,6 +53,8 @@ export function getPanelTitle(pgBrowser, selected_item=null, custom_title=null)
|
||||||
|
|
||||||
export function setQueryToolDockerTitle(panel, is_query_tool, panel_title, is_file) {
|
export function setQueryToolDockerTitle(panel, is_query_tool, panel_title, is_file) {
|
||||||
let panel_icon = '', panel_tooltip = '';
|
let panel_icon = '', panel_tooltip = '';
|
||||||
|
// Enable/ Disabled the rename panel option if file is open.
|
||||||
|
set_renamable_option(panel, is_file);
|
||||||
|
|
||||||
if(is_file || is_file == 'true'){
|
if(is_file || is_file == 'true'){
|
||||||
panel_tooltip = gettext('File - ') + panel_title;
|
panel_tooltip = gettext('File - ') + panel_title;
|
||||||
|
@ -69,6 +72,17 @@ export function setQueryToolDockerTitle(panel, is_query_tool, panel_title, is_fi
|
||||||
|
|
||||||
panel.title('<span title="'+ _.escape(panel_tooltip) +'">'+ _.escape(panel_title) +'</span>');
|
panel.title('<span title="'+ _.escape(panel_tooltip) +'">'+ _.escape(panel_title) +'</span>');
|
||||||
panel.icon(panel_icon);
|
panel.icon(panel_icon);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export function set_renamable_option(panel, is_file) {
|
||||||
|
if(is_file || is_file == 'true') {
|
||||||
|
panel._isRenamable = false;
|
||||||
|
$('.conn-info-dd').hide();
|
||||||
|
$('.connection-data').css({pointerEvents: 'none', cursor: 'arrow'});
|
||||||
|
} else {
|
||||||
|
panel._isRenamable = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function generateTitle(title_placeholder, title_data) {
|
export function generateTitle(title_placeholder, title_data) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user