public inbox for [email protected]
help / color / mirror / Atom feedFrom: Akshay Joshi <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [patch] update table name in confirmation dialog for 'Reset Statistics' and 'Truncate Table'
Date: Thu, 18 May 2017 14:47:31 +0530
Message-ID: <CANxoLDczJ5ckfbMGM8i3MxNp+VB0D5ABrH1s7D_xGUJxZLD_4Q@mail.gmail.com> (raw)
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgadmin-hackers>
Hi All
I have found one issue where table name is not displaying in the confirmation
dialog when user click on "Reset Statistics" and "Truncate/Truncate
cascade". Confirmation dialog shows below message:
- Are you sure you want to truncate table {}?
- Are you sure you want to reset the statistics for table {}?
Also header is missing for "Truncate/Truncate cascade" confirmation dialog.
Attached is the patch file to fix that above. Please review it.
--
*Akshay Joshi*
*Principal Software Engineer *
*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachments:
[application/octet-stream] Truncate.patch (1.6K, 3-Truncate.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/js/table.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/js/table.js
index bf6b76f..62e31c7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/js/table.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/js/table.js
@@ -165,7 +165,8 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
return false;
alertify.confirm(
- S('{{ _('Are you sure you want to truncate table %s?') }}').sprintf(d.label).value(),
+ '{{ _('Truncate Table') }}',
+ S('{{ _('Are you sure you want to truncate table "%%s"?') }}').sprintf(d.label).value(),
function (e) {
if (e) {
var data = d;
@@ -200,8 +201,9 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
t.unload(i);
}
});
- }
- });
+ }},
+ function() {}
+ );
},
reset_table_stats: function(args) {
var input = args || {},
@@ -215,7 +217,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
alertify.confirm(
'{{ _('Reset statistics') }}',
- S('{{ _('Are you sure you want to reset the statistics for table %s?') }}').sprintf(d._label).value(),
+ S('{{ _('Are you sure you want to reset the statistics for table "%%s"?') }}').sprintf(d._label).value(),
function (e) {
if (e) {
var data = d;
view thread (6+ 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: [patch] update table name in confirmation dialog for 'Reset Statistics' and 'Truncate Table'
In-Reply-To: <CANxoLDczJ5ckfbMGM8i3MxNp+VB0D5ABrH1s7D_xGUJxZLD_4Q@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