public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ashesh Vashi <[email protected]>
To: Murtuza Zabuawala <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: PATCH: Added Note Backform control (pgAdmin4).
Date: Thu, 28 Apr 2016 11:31:58 +0530
Message-ID: <CAG7mmowD2AK+d5XvFCLiUsCn1pni1HY5wehE_Fx0g2ePqy6vXg@mail.gmail.com> (raw)
In-Reply-To: <CAKKotZTMhxP=V06JJ2kgQ9qHaZkJzFptmGp-8Mrda+SdDccATg@mail.gmail.com>
References: <CAKKotZTMhxP=V06JJ2kgQ9qHaZkJzFptmGp-8Mrda+SdDccATg@mail.gmail.com>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgadmin-hackers>
I've update the patch a little bit.
Please test it at your end.
--
Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com;
*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi;
On Wed, Apr 27, 2016 at 6:19 PM, Murtuza Zabuawala <
[email protected]> wrote:
> Hi,
>
> This patch will allow us to provide annotate(s) on Form/Dialog.
>
> Use in schema:
>
> id: 'server_note', label: '{{ _('Note') }}',
> text: '{{ _('The backup format will be PLAIN') }}',
> type: 'note'
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>
--
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] note_conrol_v2.patch (2.6K, 3-note_conrol_v2.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/templates/browser/js/messages.js b/web/pgadmin/browser/templates/browser/js/messages.js
index d7b97bc..01a23d0 100644
--- a/web/pgadmin/browser/templates/browser/js/messages.js
+++ b/web/pgadmin/browser/templates/browser/js/messages.js
@@ -22,7 +22,8 @@ function(_, S, pgAdmin) {
'NODE_HAS_NO_SQL': "{{ _("No SQL could be generated for the selected object.") }}",
'NODE_HAS_NO_STATISTICS': "{{ _("No statistics are available for the selected object!") }}",
'TRUE': "{{ _("True") }}",
- 'FALSE': "{{ _("False") }}"
+ 'FALSE': "{{ _("False") }}",
+ 'NOTE_CTRL_LABEL': "{{ _("Note") }}",
};
return pgBrowser.messages;
diff --git a/web/pgadmin/static/css/overrides.css b/web/pgadmin/static/css/overrides.css
index 2e91ae7..495bb76 100755
--- a/web/pgadmin/static/css/overrides.css
+++ b/web/pgadmin/static/css/overrides.css
@@ -1094,3 +1094,21 @@ button.pg-alertify-button {
font: normal normal normal 18px/1 FontAwesome;
margin-right: 5px;
}
+.backform_control_notes {
+ background-color: #f5f5f5;
+ border: 1px solid #ccc;
+ border-radius: 3px;
+ color: #333;
+ display: block;
+ font-family: Menlo,Monaco,Consolas,"Courier New",monospace;
+ font-size: 12px;
+ line-height: 1.42857;
+ margin: 0 0 10px;
+ overflow: auto;
+ padding: 5px 10px;
+ word-break: break-all;
+ word-wrap: break-word;}
+}
+.backform_control_notes .control-label {
+ min-width: 0px;
+}
diff --git a/web/pgadmin/static/js/backform.pgadmin.js b/web/pgadmin/static/js/backform.pgadmin.js
index 544d574..5972978 100644
--- a/web/pgadmin/static/js/backform.pgadmin.js
+++ b/web/pgadmin/static/js/backform.pgadmin.js
@@ -67,7 +67,8 @@
'collection': ['sub-node-collection', 'sub-node-collection', 'string'],
'uniqueColCollection': ['unique-col-collection', 'unique-col-collection', 'string'],
'switch' : 'switch',
- 'select2': 'select2'
+ 'select2': 'select2',
+ 'note': 'note'
};
var getMappedControl = Backform.getMappedControl = function(type, mode) {
@@ -2015,5 +2016,20 @@
}
});
+ // We will use this control just as a annotate in Backform
+ var NoteControl = Backform.NoteControl = Backform.Control.extend({
+ defaults: {
+ label: window.pgAdmin.Browser.messages.NOTE_CTRL_LABEL,
+ text: '',
+ extraClasses: [],
+ noteClass: 'backform_control_notes'
+ },
+ template: _.template([
+ '<div class="<%=noteClass%> col-xs-12 <%=extraClasses.join(\' \')%>">',
+ '<label class="control-label"><%=label%>:</label>',
+ '<span><%=text%></span></div>'
+ ].join("\n"))
+ });
+
return Backform;
}));
view thread (3+ 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: PATCH: Added Note Backform control (pgAdmin4).
In-Reply-To: <CAG7mmowD2AK+d5XvFCLiUsCn1pni1HY5wehE_Fx0g2ePqy6vXg@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