public inbox for [email protected]
help / color / mirror / Atom feedBackgrid Select2cell multiselect support [pgadmin4]
2+ messages / 2 participants
[nested] [flat]
* Backgrid Select2cell multiselect support [pgadmin4]
@ 2016-05-05 14:45 Harshal Dhumal <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Harshal Dhumal @ 2016-05-05 14:45 UTC (permalink / raw)
To: pgadmin-hackers
Hi,
PFA patch for backgrid Select2cell in which I have added multiselect
support which was missing.
--
*Harshal Dhumal*
*Software Engineer *
EenterpriseDB <http://www.enterprisedb.com;
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachments:
[text/x-patch] select2Cell_multiselect_support_5_May_v1.patch (1.5K, 3-select2Cell_multiselect_support_5_May_v1.patch)
download | inline diff:
diff --git a/web/pgadmin/static/js/backgrid/backgrid.pgadmin.js b/web/pgadmin/static/js/backgrid/backgrid.pgadmin.js
index 55ba7c0..d2d4486 100644
--- a/web/pgadmin/static/js/backgrid/backgrid.pgadmin.js
+++ b/web/pgadmin/static/js/backgrid/backgrid.pgadmin.js
@@ -396,7 +396,7 @@
editor: null,
defaults: _.defaults({
- select2: {},
+ select2: {multiple:false},
opt: {
label: null,
value: null,
@@ -471,11 +471,18 @@
var optionText = null,
optionValue = null,
model = this.model,
- selectedValues = model.get(this.column.get("name"));
+ selectedValues = model.get(this.column.get("name")),
+ self = this,
+ select2_opts = _.extend(
+ {openOnEnter: false},
+ col.select2, this.defaults.select2
+ ),
+ selectTpl = _.template('<select <%=multiple ? "multiple" : "" %>></select>');
delete this.$select;
- self = this,
- $select = self.$select = $('<select></select>').appendTo(this.$el);
+
+ $select = self.$select = $(selectTpl(
+ {multiple:select2_opts.multiple})).appendTo(this.$el);
for (var i = 0; i < optionValues.length; i++) {
var opt = optionValues[i];
@@ -501,11 +508,6 @@
}
}
- var select2_opts = _.extend(
- {openOnEnter: false},
- col.select2, this.defaults.select2
- );
-
if(col && _.has(col.disabled)) {
_.extend(select2_opts, {
disabled: evalF(col.disabled, col, model)
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Backgrid Select2cell multiselect support [pgadmin4]
@ 2016-05-10 08:20 Ashesh Vashi <[email protected]>
parent: Harshal Dhumal <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Ashesh Vashi @ 2016-05-10 08:20 UTC (permalink / raw)
To: Harshal Dhumal <[email protected]>; +Cc: pgadmin-hackers
Thanks - committed with some tweaks.
--
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 Thu, May 5, 2016 at 8:15 PM, Harshal Dhumal <
[email protected]> wrote:
> Hi,
>
> PFA patch for backgrid Select2cell in which I have added multiselect
> support which was missing.
>
> --
> *Harshal Dhumal*
> *Software Engineer *
>
>
>
> EenterpriseDB <http://www.enterprisedb.com;
>
>
> --
> Sent via pgadmin-hackers mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2016-05-10 08:20 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-05-05 14:45 Backgrid Select2cell multiselect support [pgadmin4] Harshal Dhumal <[email protected]>
2016-05-10 08:20 ` Ashesh Vashi <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox