public inbox for [email protected]
help / color / mirror / Atom feedFrom: Pradip Parkale <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin][RM6399]: Add panel option allows to add duplicate tabs.
Date: Tue, 11 May 2021 23:05:54 +0530
Message-ID: <CAJ9T6Svy3jw86r6PfJNnUwmD0fPRHBU21WHe5h=BZ9x-b1iS+Q@mail.gmail.com> (raw)
Hi Hackers,
Please find the attached patch for #6399. I have partially fixed the issue.
I have set the limit of 1 so that user won't be able to add any duplicate
panel.
--
Thanks & Regards,
Pradip Parkale
Software Engineer | EnterpriseDB Corporation
Attachments:
[application/octet-stream] RM6399.patch (3.4K, 3-RM6399.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/static/js/browser.js b/web/pgadmin/browser/static/js/browser.js
index bf44aa6f4..46dfb4f15 100644
--- a/web/pgadmin/browser/static/js/browser.js
+++ b/web/pgadmin/browser/static/js/browser.js
@@ -230,6 +230,7 @@ define('pgadmin.browser', [
isCloseable: false,
isPrivate: true,
icon: '',
+ limit: 1,
content: '<div id="tree" class="aciTree"></div>',
onCreate: function(panel) {
toolBar.initializeToolbar(panel, wcDocker);
@@ -244,6 +245,7 @@ define('pgadmin.browser', [
isCloseable: false,
isPrivate: true,
elContainer: true,
+ limit: 1,
content: '<div class="obj_properties container-fluid"><div role="status" class="pg-panel-message">' + select_object_msg + '</div></div>',
events: panelEvents,
onCreate: function(myPanel, $container) {
@@ -258,6 +260,7 @@ define('pgadmin.browser', [
width: 500,
isCloseable: true,
isPrivate: false,
+ limit : 1,
canHide: true,
content: '<div class="negative-space p-2"><div role="status" class="pg-panel-message pg-panel-statistics-message">' + select_object_msg + '</div><div class="pg-panel-statistics-container d-none"></div></div>',
events: panelEvents,
@@ -270,6 +273,7 @@ define('pgadmin.browser', [
width: 500,
isCloseable: false,
isPrivate: true,
+ limit: 1,
content: '<label for="sql-textarea" class="sr-only">' + gettext('SQL Code') + '</label><div class="sql_textarea"><textarea id="sql-textarea" name="sql-textarea" title="' + gettext('SQL Code') + '"></textarea></div>',
}),
// Dependencies of the object
@@ -281,6 +285,7 @@ define('pgadmin.browser', [
isCloseable: true,
isPrivate: false,
canHide: true,
+ limit: 1,
content: '<div class="negative-space p-2"><div role="status" class="pg-panel-message pg-panel-depends-message">' + select_object_msg + '</div><div class="pg-panel-dependencies-container d-none"></div></div>',
events: panelEvents,
}),
@@ -292,6 +297,7 @@ define('pgadmin.browser', [
width: 500,
isCloseable: true,
isPrivate: false,
+ limit: 1,
canHide: true,
content: '<div class="negative-space p-2"><div role="status" class="pg-panel-message pg-panel-depends-message">' + select_object_msg + '</div><div class="pg-panel-dependents-container d-none"></div></div>',
events: panelEvents,
@@ -345,6 +351,7 @@ define('pgadmin.browser', [
showTitle: panel.showTitle,
isCloseable: panel.isCloseable,
isPrivate: panel.isPrivate,
+ limit: (panel.limit) ? panel.limit : null,
content: (panel.content) ? panel.content : '',
events: (panel.events) ? panel.events : '',
canHide: (panel.canHide) ? panel.canHide : '',
diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
index a169a98c2..169adc929 100644
--- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
@@ -351,6 +351,7 @@ define('tools.querytool', [
height: '33%',
isCloseable: true,
isPrivate: false,
+ limit: 1,
content: '<div class="sql-scratch"><textarea wrap="off" tabindex="0"></textarea></div>',
});
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][RM6399]: Add panel option allows to add duplicate tabs.
In-Reply-To: <CAJ9T6Svy3jw86r6PfJNnUwmD0fPRHBU21WHe5h=BZ9x-b1iS+Q@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