public inbox for [email protected]
help / color / mirror / Atom feedFrom: Pradip Parkale <[email protected]>
To: Akshay Joshi <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin][RM6398]: Detaching query editor panel gives a blank white panel.
Date: Thu, 24 Jun 2021 19:00:28 +0530
Message-ID: <CAJ9T6SsW9VB+J8UAbMXtpapuA_Dx8qX25BOdTLrkq=O+zCbVqw@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDe9U1a6oOxJ+xy6cBHyghmCKgMpv6X7fqj9knSUU4FjBw@mail.gmail.com>
References: <CAJ9T6St7o5QTO1R2KSsvZAviCw0jK0u6MWsgUAtRzpkDQQpA+A@mail.gmail.com>
<CANxoLDe9U1a6oOxJ+xy6cBHyghmCKgMpv6X7fqj9knSUU4FjBw@mail.gmail.com>
Hi Akshay,
Please find attached for debugger and ERD tool which was missing in
my previous patch.
On Wed, Jun 23, 2021 at 11:50 AM Akshay Joshi <[email protected]>
wrote:
> Thanks, the patch applied.
>
> On Wed, Jun 16, 2021 at 11:29 PM Pradip Parkale <
> [email protected]> wrote:
>
>> Hi Hackers,
>>
>> Please find the attached patch for #6398.Detaching query editor panel
>> gives a blank white panel.
>>
>>
>> --
>> Thanks & Regards,
>> Pradip Parkale
>> Software Engineer | EnterpriseDB Corporation
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
> *pgAdmin Hacker | Principal Software Architect*
> *EDB Postgres <http://edbpostgres.com>*
>
> *Mobile: +91 976-788-8246*
>
--
Thanks & Regards,
Pradip Parkale
Software Engineer | EnterpriseDB Corporation
Attachments:
[application/octet-stream] RM6398_v2.patch (8.7K, 3-RM6398_v2.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/static/js/frame.js b/web/pgadmin/browser/static/js/frame.js
index 0d3b91273..dc4ec5527 100644
--- a/web/pgadmin/browser/static/js/frame.js
+++ b/web/pgadmin/browser/static/js/frame.js
@@ -18,7 +18,7 @@ define([
pgAdmin.Browser.Frame = function(options) {
var defaults = [
'name', 'title', 'width', 'height', 'showTitle', 'isCloseable',
- 'isPrivate', 'url', 'icon', 'onCreate',
+ 'isPrivate', 'url', 'icon', 'onCreate', 'isLayoutMember',
];
_.extend(this, _.pick(options, defaults));
};
@@ -32,6 +32,7 @@ define([
isClosable: true,
isRenamable: false,
isPrivate: false,
+ isLayoutMember: false,
url: '',
icon: '',
panel: null,
@@ -43,6 +44,7 @@ define([
docker.registerPanelType(this.name, {
title: that.title,
isPrivate: that.isPrivate,
+ isLayoutMember: that.isLayoutMember,
onCreate: function(myPanel) {
$(myPanel).data('pgAdminName', that.name);
myPanel.initSize(that.width, that.height);
diff --git a/web/pgadmin/tools/datagrid/static/js/datagrid.js b/web/pgadmin/tools/datagrid/static/js/datagrid.js
index 80ce35680..f0d7cee6f 100644
--- a/web/pgadmin/tools/datagrid/static/js/datagrid.js
+++ b/web/pgadmin/tools/datagrid/static/js/datagrid.js
@@ -220,10 +220,10 @@ define('pgadmin.datagrid', [
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);
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('top', pos.top - dockerPos.top);
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('left', pos.left - dockerPos.left);
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('width', width);
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('height', height);
},
launch_grid: function(trans_id, panel_url, is_query_tool, panel_title, sURL=null, sql_filter=null) {
@@ -284,13 +284,13 @@ define('pgadmin.datagrid', [
});
queryToolPanel.on(wcDocker.EVENT.DETACHED, function() {
- $(wcDocker).find('.wcIFrameFloating').attr({
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').attr({
style: 'z-index: 1200'
});
});
queryToolPanel.on(wcDocker.EVENT.ORDER_CHANGED, function() {
- $(wcDocker).find('.wcIFrameFloating').attr({
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').attr({
style: 'z-index: 1200'
});
});
diff --git a/web/pgadmin/tools/debugger/static/js/debugger_ui.js b/web/pgadmin/tools/debugger/static/js/debugger_ui.js
index 5b6041d5b..4bbc3c509 100644
--- a/web/pgadmin/tools/debugger/static/js/debugger_ui.js
+++ b/web/pgadmin/tools/debugger/static/js/debugger_ui.js
@@ -796,6 +796,31 @@ define([
method: 'DELETE',
});
});
+ panel.on(wcDocker.EVENT.DETACHED, function() {
+
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').attr({
+ style: 'z-index: 1200'
+ });
+
+ });
+ panel.on(wcDocker.EVENT.ORDER_CHANGED, function() {
+
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').attr({
+ style: 'z-index: 1200'
+ });
+ });
+ panel.on(wcDocker.EVENT.ORDER_CHANGED, 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();
+
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('top', pos.top - dockerPos.top);
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('left', pos.left - dockerPos.left);
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('width', width);
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').find('.wcIFrameFloating').css('height', height);
+ });
// Panel Rename event
panel.on(wcDocker.EVENT.RENAME, function(panel_data) {
diff --git a/web/pgadmin/tools/erd/static/js/erd_module.js b/web/pgadmin/tools/erd/static/js/erd_module.js
index 1e414e43f..4aea010ca 100644
--- a/web/pgadmin/tools/erd/static/js/erd_module.js
+++ b/web/pgadmin/tools/erd/static/js/erd_module.js
@@ -166,6 +166,20 @@ export function initialize(gettext, url_for, $, _, pgAdmin, csrfToken, pgBrowser
});
});
+ erdToolPanel.on(wcDocker.EVENT.DETACHED, function() {
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').attr({
+ style: 'z-index: 1200'
+ });
+ });
+
+ erdToolPanel.on(wcDocker.EVENT.ORDER_CHANGED, function() {
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').attr({
+ style: 'z-index: 1200'
+ });
+ });
+
+ erdToolPanel.on(wcDocker.EVENT.ORDER_CHANGED, this.resize_the_erdtool);
+
var openErdToolURL = function(j) {
// add spinner element
let $spinner_el =
@@ -196,6 +210,19 @@ export function initialize(gettext, url_for, $, _, pgAdmin, csrfToken, pgBrowser
}
},
+ resize_the_erdtool: 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();
+
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('top', pos.top - dockerPos.top);
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('left', pos.left - dockerPos.left);
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('width', width);
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('height', height);
+ },
+
getPanelUrls: function(transId, panelTitle, parentData, gen) {
let openUrl = url_for('erd.panel', {
trans_id: transId,
diff --git a/web/pgadmin/tools/psql/static/js/psql_module.js b/web/pgadmin/tools/psql/static/js/psql_module.js
index 54b2d79c8..68a3836f3 100644
--- a/web/pgadmin/tools/psql/static/js/psql_module.js
+++ b/web/pgadmin/tools/psql/static/js/psql_module.js
@@ -182,13 +182,13 @@ export function initialize(gettext, url_for, $, _, pgAdmin, csrfToken, Browser)
var psqlToolPanel = pgBrowser.docker.addPanel('frm_psqltool', wcDocker.DOCK.STACKED, propertiesPanel[0]);
psqlToolPanel.on(wcDocker.EVENT.DETACHED, function() {
- $(wcDocker).find('.wcIFrameFloating').attr({
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').attr({
style: 'z-index: 1200'
});
});
psqlToolPanel.on(wcDocker.EVENT.ORDER_CHANGED, function() {
- $(wcDocker).find('.wcIFrameFloating').attr({
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').attr({
style: 'z-index: 1200'
});
});
@@ -238,10 +238,10 @@ export function initialize(gettext, url_for, $, _, pgAdmin, csrfToken, Browser)
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);
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('top', pos.top - dockerPos.top);
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('left', pos.left - dockerPos.left);
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('width', width);
+ $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('height', height);
},
getPanelUrls: function(transId, panelTitle, parentData) {
let openUrl = url_for('psql.panel', {
view thread (8+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: [pgAdmin][RM6398]: Detaching query editor panel gives a blank white panel.
In-Reply-To: <CAJ9T6SsW9VB+J8UAbMXtpapuA_Dx8qX25BOdTLrkq=O+zCbVqw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox