Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aRcPH-0008EZ-SQ for pgadmin-hackers@arkaria.postgresql.org; Fri, 05 Feb 2016 09:10:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aRcPH-0006dl-FR for pgadmin-hackers@arkaria.postgresql.org; Fri, 05 Feb 2016 09:10:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aRcPH-0006da-1b for pgadmin-hackers@postgresql.org; Fri, 05 Feb 2016 09:10:23 +0000 Received: from mail-ig0-x230.google.com ([2607:f8b0:4001:c05::230]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aRcPD-0007s3-CT for pgadmin-hackers@postgresql.org; Fri, 05 Feb 2016 09:10:22 +0000 Received: by mail-ig0-x230.google.com with SMTP id ik10so35820544igb.1 for ; Fri, 05 Feb 2016 01:10:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=mHVEfpwHw1gMbbFEAFHKvuWMfUky70h+IyFuTd1W0xQ=; b=K/OXoCFAOtSFNgKYkOt4WBZAtDAiE5NyWqnrctfMK6pB4wzZPSxE+hL48x9ZT82VNv JKQwZvmRi6go0j/BL5C2z74wRTJPl6GtthK9+E6tiLvSbd7h7Z+vSueVUZ8w2nFw+hdS MwbXB4bEy02p1vO25fqGV8J2BNVGSDNomOuSFr5naXN5YUT0fK9LFstYF+dMzMlthD5W gPDNwZsud3iwaHkpbwSLc98c3itvPBcMffRL20vJ3g6M1KbLqEMRDjji/RUvW7sjRJsg IoJSC5NyLR8FGbZsBtRpH5pA7zAtqSU2awrlemLJCHsPjk1TMXmas7k4+7UGqIl7mDCT BF8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=mHVEfpwHw1gMbbFEAFHKvuWMfUky70h+IyFuTd1W0xQ=; b=djsIdVE2bHmHJDd8znPgvb0eJvs6DI8Ap/T7tvIOwvOHa/XMzOyH8D9xu4E6D8UYLL jvuNQYPeEJnd5mk2inNiR1i83Vt1HD/hyT+G/cCTPcYmPAOd5qgN0kHc4J+ywDlh2VJD ll2m/I0vZ6aPQS+wfo6R8zBRfc/BwXaE1+MVTrs09xAQQO1uGyNYcudbXoXCvgK/dBH3 hpcVENgALPXm/aw74aVi5eshMd4GwreoMRrFa2HMioDwaTWcekVX+gT+eqovpfncet8c 4o37F5gmhaGuBCTaq9jfaJv2EJ0XbhCWhBDWfv0Jnx0myfXjoIXGJ2HcijvFMxVg85uh Tkiw== X-Gm-Message-State: AG10YORctVgAZhAkcSxvGz+ET2HzfET7nB2PR4EpvTGcQtGV5dkcGKm2ZKqIdIcl+Y56NHu+qB/ndnySV3YBOYFg X-Received: by 10.50.36.35 with SMTP id n3mr8417106igj.73.1454663417686; Fri, 05 Feb 2016 01:10:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.26.138 with HTTP; Fri, 5 Feb 2016 01:09:58 -0800 (PST) In-Reply-To: References: From: Ashesh Vashi Date: Fri, 5 Feb 2016 14:39:58 +0530 Message-ID: Subject: Re: New mechanism in backgrid to render different types of cells in same column [pgAdmin4] To: Harshal Dhumal Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary=089e011609744788ee052b023873 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --089e011609744788ee052b023873 Content-Type: text/plain; charset=UTF-8 On Fri, Feb 5, 2016 at 2:16 PM, Harshal Dhumal < harshal.dhumal@enterprisedb.com> wrote: > Hi, Ashesh, > Hi Harshal, [ Please do not forget to reply to All next time.. :-) ] > > Same patch which I send on 19 Jan with very minor change. i.e. properly > initialize bool cell for dynamic variable cell. > Thanks - I've committed the patch. -- Thanks & Regards, Ashesh Vashi EnterpriseDB INDIA: Enterprise PostgreSQL Company *http://www.linkedin.com/in/asheshvashi* > > > > -- > *Harshal Dhumal* > *Software Engineer * > > > > EenterpriseDB > > On Tue, Jan 19, 2016 at 12:42 AM, Harshal Dhumal < > harshal.dhumal@enterprisedb.com> wrote: > >> + >> Also fixed some minor issues related to Unique column functionality in >> Variable control in same patch. >> >> -- >> *Harshal Dhumal* >> *Software Engineer * >> >> >> >> EenterpriseDB >> >> On Tue, Jan 19, 2016 at 12:37 AM, Harshal Dhumal < >> harshal.dhumal@enterprisedb.com> wrote: >> >>> Hi, >>> >>> This patch is replacement for our developed DynamicVariablecell. >>> >>> Now we can pass cellFunction in column schema to get appropriate cell >>> class. >>> User provided cellFunction must return valid cell class. >>> cellFunction will be called with context (this) as column and model as >>> argument. >>> >>> eg.: >>> >>> schema: [ >>> {id: 'name', label:'Name', type:'text', editable: false, cell: 'string'}, >>> { >>> id: 'value', label:'Value', type: 'text', editable: true, >>> cellFunction: function(model){ >>> >>> if (isNaN(model.get(this.get('name')))) { >>> return "string"; >>> } else { >>> return Backgrid.NumberCell; >>> } >>> } >>> }, >>> {id: 'database', label:'Database', type: 'text', editable: false}, >>> . >>> . >>> . >>> >>> >>> >>> >>> -- >>> *Harshal Dhumal* >>> *Software Engineer * >>> >>> >>> >>> EenterpriseDB >>> >> >> > --089e011609744788ee052b023873 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Fri, Feb 5, 2016 at 2:16 PM, Harshal Dhumal <harshal.dhumal@enterprisedb.com> wrote:
Hi, Ashesh,
Hi Harshal,
=
[ Please do not forget to reply to All next time.. :-) ]

Same patch which I send = on 19 Jan with very minor change. i.e. properly initialize bool cell for dy= namic variable cell.
Thanks - I've committed= the patch.

--

Thanks & Regards,

Ashesh Vashi
Enterpri= seDB INDIA:=C2=A0Enterprise PostgreSQL Company


http://www.linkedin.com/in/asheshvashi



=

--=C2=A0
Harshal Dhum= al
Software Engineer=C2=A0


=


On Tue, Jan 19= , 2016 at 12:42 AM, Harshal Dhumal <harshal.dhumal@enterpris= edb.com> wrote:
+
Als= o fixed some minor issues related to Unique column functionality in Variabl= e control in same patch.

--=C2=A0
Harshal Dhumal
Software Engineer=C2=A0




On Tue, Jan 19, 2016 at 12:= 37 AM, Harshal Dhumal <harshal.dhumal@enterprisedb.com&g= t; wrote:
Hi,
This patch is replacement for our developed DynamicVariablecell.=

Now we can pass cellFunction in column schema to get appropri= ate cell class.
User provided cellFunction must return valid cell class.=
cellFunction will be called with context (this) as column and model as = argument.

eg.:

schema: [
{id: 'name= ', label:'Name', type:'text', edi= table: false, cell: 'strin= g'},
{
id: 'value= ', label:'Value', type: 'text', e= ditable: true,
cellFunc= tion: function(model){

= if (isNaN(model.get(this.get('name')))) {<= br> return "string";
} else
{
return Backgrid.NumberCell;
} <= br> }
},
{id: 'database', label:'Database', type: &= #39;text', editable: false= },
.
.
.



--=C2=A0
Har= shal Dhumal
Software Engineer=C2=A0



--089e011609744788ee052b023873--