mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue where detaching the query editor panel gives a blank white panel. Fixes #6398
This commit is contained in:
parent
a533620684
commit
0b52ef6eb0
@ -17,4 +17,5 @@ Housekeeping
|
|||||||
Bug fixes
|
Bug fixes
|
||||||
*********
|
*********
|
||||||
|
|
||||||
|
| `Issue #6398 <https://redmine.postgresql.org/issues/6398>`_ - Fixed an issue where detaching the query editor panel gives a blank white panel.
|
||||||
| `Issue #6489 <https://redmine.postgresql.org/issues/6489>`_ - Fixed an issue where Execute/Refresh button should not be disabled when we run the empty query.
|
| `Issue #6489 <https://redmine.postgresql.org/issues/6489>`_ - Fixed an issue where Execute/Refresh button should not be disabled when we run the empty query.
|
||||||
|
@ -213,6 +213,19 @@ define('pgadmin.datagrid', [
|
|||||||
showQueryTool.showQueryTool(this, pgBrowser, alertify, url, aciTreeIdentifier, transId);
|
showQueryTool.showQueryTool(this, pgBrowser, alertify, url, aciTreeIdentifier, transId);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
resize_the_queryTool: function(){
|
||||||
|
var docker = this.docker(this._panel);
|
||||||
|
var dockerPos = docker.$container.offset();
|
||||||
|
var pos = this.$container.offset();
|
||||||
|
var width = this.$container.width();
|
||||||
|
var height = this.$container.height();
|
||||||
|
|
||||||
|
$(wcDocker).find('.wcIFrameFloating').css('top', pos.top - dockerPos.top);
|
||||||
|
$(wcDocker).find('.wcIFrameFloating').css('left', pos.left - dockerPos.left);
|
||||||
|
$(wcDocker).find('.wcIFrameFloating').css('width', width);
|
||||||
|
$(wcDocker).find('.wcIFrameFloating').css('height', height);
|
||||||
|
},
|
||||||
|
|
||||||
launch_grid: function(trans_id, panel_url, is_query_tool, panel_title, sURL=null, sql_filter=null) {
|
launch_grid: function(trans_id, panel_url, is_query_tool, panel_title, sURL=null, sql_filter=null) {
|
||||||
|
|
||||||
let queryToolForm = `
|
let queryToolForm = `
|
||||||
@ -270,6 +283,20 @@ define('pgadmin.datagrid', [
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
queryToolPanel.on(wcDocker.EVENT.DETACHED, function() {
|
||||||
|
$(wcDocker).find('.wcIFrameFloating').attr({
|
||||||
|
style: 'z-index: 1200'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
queryToolPanel.on(wcDocker.EVENT.ORDER_CHANGED, function() {
|
||||||
|
$(wcDocker).find('.wcIFrameFloating').attr({
|
||||||
|
style: 'z-index: 1200'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
queryToolPanel.on(wcDocker.EVENT.ORDER_CHANGED, this.resize_the_queryTool);
|
||||||
|
|
||||||
// Listen on the panelRename event.
|
// Listen on the panelRename event.
|
||||||
queryToolPanel.on(wcDocker.EVENT.RENAME, function(panel_data) {
|
queryToolPanel.on(wcDocker.EVENT.RENAME, function(panel_data) {
|
||||||
var temp_title = panel_data.$titleText[0].textContent;
|
var temp_title = panel_data.$titleText[0].textContent;
|
||||||
|
@ -181,6 +181,20 @@ export function initialize(gettext, url_for, $, _, pgAdmin, csrfToken, Browser)
|
|||||||
var propertiesPanel = pgBrowser.docker.findPanels('properties');
|
var propertiesPanel = pgBrowser.docker.findPanels('properties');
|
||||||
var psqlToolPanel = pgBrowser.docker.addPanel('frm_psqltool', wcDocker.DOCK.STACKED, propertiesPanel[0]);
|
var psqlToolPanel = pgBrowser.docker.addPanel('frm_psqltool', wcDocker.DOCK.STACKED, propertiesPanel[0]);
|
||||||
|
|
||||||
|
psqlToolPanel.on(wcDocker.EVENT.DETACHED, function() {
|
||||||
|
$(wcDocker).find('.wcIFrameFloating').attr({
|
||||||
|
style: 'z-index: 1200'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
psqlToolPanel.on(wcDocker.EVENT.ORDER_CHANGED, function() {
|
||||||
|
$(wcDocker).find('.wcIFrameFloating').attr({
|
||||||
|
style: 'z-index: 1200'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
psqlToolPanel.on(wcDocker.EVENT.ORDER_CHANGED, this.resize_the_psql);
|
||||||
|
|
||||||
// Set panel title and icon
|
// Set panel title and icon
|
||||||
setPanelTitle(psqlToolPanel, panelTitle);
|
setPanelTitle(psqlToolPanel, panelTitle);
|
||||||
psqlToolPanel.icon('fas fa-terminal psql-tab-style');
|
psqlToolPanel.icon('fas fa-terminal psql-tab-style');
|
||||||
@ -217,6 +231,18 @@ export function initialize(gettext, url_for, $, _, pgAdmin, csrfToken, Browser)
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
resize_the_psql: function(){
|
||||||
|
var docker = this.docker(this._panel);
|
||||||
|
var dockerPos = docker.$container.offset();
|
||||||
|
var pos = this.$container.offset();
|
||||||
|
var width = this.$container.width();
|
||||||
|
var height = this.$container.height();
|
||||||
|
|
||||||
|
$(wcDocker).find('.wcIFrameFloating').css('top', pos.top - dockerPos.top);
|
||||||
|
$(wcDocker).find('.wcIFrameFloating').css('left', pos.left - dockerPos.left);
|
||||||
|
$(wcDocker).find('.wcIFrameFloating').css('width', width);
|
||||||
|
$(wcDocker).find('.wcIFrameFloating').css('height', height);
|
||||||
|
},
|
||||||
getPanelUrls: function(transId, panelTitle, parentData) {
|
getPanelUrls: function(transId, panelTitle, parentData) {
|
||||||
let openUrl = url_for('psql.panel', {
|
let openUrl = url_for('psql.panel', {
|
||||||
trans_id: transId,
|
trans_id: transId,
|
||||||
|
Loading…
Reference in New Issue
Block a user