public inbox for [email protected]
help / color / mirror / Atom feedFrom: Rahul Shirsat <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin] [patch] RM6333 Help dialog issue if we set "Open in new browser tab" for Query tool & ERD.
Date: Tue, 6 Apr 2021 11:31:46 +0530
Message-ID: <CAKtn9dPOvPYuaWGx=Xm08Roio+Yvqy6p=3uwSJ5JXGk5Eo+8nw@mail.gmail.com> (raw)
Hi Hackers,
Please find the attached patch which resolves the issue of help dialogue
for Query tool & ERD tool on nwjs app.
Also in the flow, verified Schema diff & Debugger where no issues found as
these can be opened in the new tab.
--
*Rahul Shirsat*
Senior Software Engineer | EnterpriseDB Corporation.
Attachments:
[application/octet-stream] RM6333.patch (1.3K, 3-RM6333.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/static/js/browser.js b/web/pgadmin/browser/static/js/browser.js
index 67e977daf..4ffb5ee5a 100644
--- a/web/pgadmin/browser/static/js/browser.js
+++ b/web/pgadmin/browser/static/js/browser.js
@@ -907,7 +907,12 @@ define('pgadmin.browser', [
window.open(fullUrl, 'postgres_help');
} else if(type == 'dialog_help') {
- window.open(url, 'pgadmin_help');
+ if (pgWindow && pgWindow.default) {
+ pgWindow.default.open(url, 'pgadmin_help');
+ }
+ else {
+ window.open(url, 'pgadmin_help');
+ }
}
$('#live-search-field').focus();
},
diff --git a/web/pgadmin/tools/erd/static/js/erd_tool/ui_components/BodyWidget.jsx b/web/pgadmin/tools/erd/static/js/erd_tool/ui_components/BodyWidget.jsx
index ff8a9c798..b79252992 100644
--- a/web/pgadmin/tools/erd/static/js/erd_tool/ui_components/BodyWidget.jsx
+++ b/web/pgadmin/tools/erd/static/js/erd_tool/ui_components/BodyWidget.jsx
@@ -412,7 +412,12 @@ export default class BodyWidget extends React.Component {
onHelpClick() {
let url = url_for('help.static', {'filename': 'erd_tool.html'});
- window.open(url, 'pgadmin_help');
+ if (this.props.pgWindow) {
+ this.props.pgWindow.open(url, 'pgadmin_help');
+ }
+ else {
+ window.open(url, 'pgadmin_help');
+ }
}
onLoadDiagram() {
view thread (2+ 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]
Subject: Re: [pgAdmin] [patch] RM6333 Help dialog issue if we set "Open in new browser tab" for Query tool & ERD.
In-Reply-To: <CAKtn9dPOvPYuaWGx=Xm08Roio+Yvqy6p=3uwSJ5JXGk5Eo+8nw@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