Fixed an issue where Debugger and ERD tool panel give a blank white panel, missing from the last patch.

refs #6398
This commit is contained in:
Pradip Parkale
2021-06-25 11:38:02 +05:30
committed by Akshay Joshi
parent 462b86df8d
commit 5581f0909a
6 changed files with 41 additions and 58 deletions

View File

@@ -14,7 +14,7 @@ import { io } from 'socketio';
import Alertify from 'pgadmin.alertifyjs';
import {enable} from 'pgadmin.browser.toolbar';
import 'wcdocker';
import {getRandomInt, hasBinariesConfiguration} from 'sources/utils';
import {getRandomInt, hasBinariesConfiguration, registerDetachEvent} from 'sources/utils';
import {retrieveAncestorOfTypeServer} from 'sources/tree/tree_utils';
import pgWindow from 'sources/window';
@@ -180,19 +180,7 @@ export function initialize(gettext, url_for, $, _, pgAdmin, csrfToken, Browser)
var propertiesPanel = pgBrowser.docker.findPanels('properties');
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);
registerDetachEvent(psqlToolPanel);
// Set panel title and icon
setPanelTitle(psqlToolPanel, panelTitle);
@@ -230,18 +218,6 @@ 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) {
let openUrl = url_for('psql.panel', {
trans_id: transId,