Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1azf7k-0002Cb-Dh for pgadmin-hackers@arkaria.postgresql.org; Mon, 09 May 2016 06:57:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1azf7j-0007ed-Fj for pgadmin-hackers@arkaria.postgresql.org; Mon, 09 May 2016 06:56:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1azf7h-0007e6-PL for pgadmin-hackers@postgresql.org; Mon, 09 May 2016 06:56:58 +0000 Received: from mail-lf0-x22d.google.com ([2a00:1450:4010:c07::22d]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1azf7d-0000yL-9U for pgadmin-hackers@postgresql.org; Mon, 09 May 2016 06:56:55 +0000 Received: by mail-lf0-x22d.google.com with SMTP id m64so189250246lfd.1 for ; Sun, 08 May 2016 23:56:53 -0700 (PDT) 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:date:message-id:subject:from:to :cc; bh=1ZYep+uDfXBgfT+8BnNrbxK/gP0TPjn3UbaWVapghe4=; b=0QBwFDW8eGQGmTTshr0sN1IJuVo75A2DESvQR7+4gWfUvvaXBgDgAdkBhFwTVwAInb ni+JJ1GB4RzFjAietWrTchbDoo9qdJUl/8PNxbg1T6C2EDl1EIHQ2vKisauMAwCiidcR p3UQ8hY7TWGPHefqnnW6tulSqjz+pQ3pPRY5Xfy56GPQl0R8owcMuIYCGaM72b8r1iMq CI31IPvfm0Kv4mTSAPORyrf9iSumUiFYrX4xhviPyKPdEh/SFrcsd6L9vgWOXtxeDa9e yg5QecnnC+ESoULQTQhdMHtv1D72uJDAqM6aQeNlt2A3RSRaDMu3yfEuWPM85XLYk9T9 E9ug== 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:date :message-id:subject:from:to:cc; bh=1ZYep+uDfXBgfT+8BnNrbxK/gP0TPjn3UbaWVapghe4=; b=IQZaBSb/ll6KhXE9sKtK5onLliQ4CmXQYwOpIoQ8NJNWnra20h3zdEP7ItmAErsE5m B0GYsdI7QGC9P95W15BIGRUysO1CY1Q0Sbo5ZB4VmQuaqZoWsSkRCefpR5pqNv+v/7Yw 2OTbPQ8bCyKpYWoAPWe1Oq8HE+Yg7+dm+23UIzggX5T17kLsUVQZYRd8Xhq4eXOD+H+H 4U7LuoscpyUGuEJ5csKawO/JClKIuSnDBVx85WrEvmuKJ7r/x+/xNTvxEvpSRZmFZB0t RbX45BXktZzJU41a0CTlvfe4KSprAw4wBGFuXJovFy2On56nIclWhqX7tvGU5cWkQGZn RZGQ== X-Gm-Message-State: AOPr4FV5aJbluIXEYxQAqVuRMgILTtdPL0JhN8o+mH3x7Bz/zNY0n540IMgpj/obpy2D/kdZRu8YXDIk1PPIxFrf MIME-Version: 1.0 X-Received: by 10.112.125.9 with SMTP id mm9mr14100982lbb.45.1462777011289; Sun, 08 May 2016 23:56:51 -0700 (PDT) Received: by 10.25.144.81 with HTTP; Sun, 8 May 2016 23:56:51 -0700 (PDT) In-Reply-To: References: Date: Mon, 9 May 2016 12:26:51 +0530 Message-ID: Subject: Re: [pgAdmin4][Patch]: Backgrid StringDepsCell From: Khushboo Vashi To: Ashesh Vashi Cc: pgadmin-hackers Content-Type: multipart/mixed; boundary=089e0112c02225355f0532635071 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 --089e0112c02225355f0532635071 Content-Type: multipart/alternative; boundary=089e0112c022253559053263506f --089e0112c022253559053263506f Content-Type: text/plain; charset=UTF-8 Hi, Please find the attached re-based patch. Thanks, Khushboo On Wed, Apr 6, 2016 at 2:38 PM, Ashesh Vashi wrote: > Hi Khushboo, > > > On Tue, Apr 5, 2016 at 10:59 AM, Khushboo Vashi < > khushboo.vashi@enterprisedb.com> wrote: > >> Hi Ashesh, >> >> I have changed the function name (from *render_deps* to *updateUIDeps*), >> which will be called on the dependent field change, as per your suggestion. >> > I've updated the patch. > Please try this. > I think - 'updateUIDeps' is not the write name. > A Cell can do anything, when dependent changed, hence - I renamed it with > 'dependentChanged'. > > Also, The user is not going to extend existing cell from the > DependendsCell, but - only going to use the functions. > Hence - I have created a separate class for it instead of extend it from > Backgrid.Cell. > > -- > > Thanks & Regards, > > Ashesh Vashi > EnterpriseDB INDIA: Enterprise PostgreSQL Company > > > > *http://www.linkedin.com/in/asheshvashi* > > >> >> Please find attached patch for the same. >> >> Thanks, >> Khushboo >> >> On Fri, Apr 1, 2016 at 3:56 PM, Khushboo Vashi < >> khushboo.vashi@enterprisedb.com> wrote: >> >>> Hi Ashesh, >>> >>> Yes, agreed. This implementation limits us to use only String Cell. >>> So, I have modified the patch as you suggested. >>> >>> Please find the attachment for the same. >>> >>> Thanks, >>> Khushboo >>> >>> On Fri, Apr 1, 2016 at 2:59 PM, Ashesh Vashi < >>> ashesh.vashi@enterprisedb.com> wrote: >>> >>>> Hi Khushboo, >>>> >>>> I am reluctant to use this code as it is. >>>> I would prefer you create just helper functions (i.e. initialize, >>>> remove) for the dependents in Backgrid.Cell, and then use them directly >>>> from the different cell itself. >>>> Because - this functionality limits us to us only with the string type. >>>> >>>> Anyway - we will be using the dependent functionality for very >>>> attributes. >>>> >>>> >>>> You can extend them directly in the Node's model (schema). >>>> >>>> -- >>>> >>>> Thanks & Regards, >>>> >>>> Ashesh Vashi >>>> EnterpriseDB INDIA: Enterprise PostgreSQL Company >>>> >>>> >>>> >>>> *http://www.linkedin.com/in/asheshvashi* >>>> >>>> >>>> On Wed, Mar 30, 2016 at 6:39 PM, Khushboo Vashi < >>>> khushboo.vashi@enterprisedb.com> wrote: >>>> >>>>> Hi, >>>>> >>>>> Please find the attached patch for the Backgrid *StringDepsCell.* >>>>> >>>>> The *StringDepsCell* displays HTML escaped strings and accepts anything typed in. >>>>> Also, Listen to the dependent fields. >>>>> >>>>> >>>>> Usage of the Backgrid Cell: >>>>> >>>>> If the Precision cell is dependent on the Datatype then: >>>>> >>>>> { >>>>> id: 'precision', label:'{{ _('Precision') }}', type: 'test' >>>>> cell: *Backgrid.Extension.StringDepsCell*, deps: ['datatype'] >>>>> >>>>> } >>>>> >>>>> >>>>> Thanks, >>>>> Khushboo >>>>> >>>>> >>>>> >>>>> -- >>>>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) >>>>> To make changes to your subscription: >>>>> http://www.postgresql.org/mailpref/pgadmin-hackers >>>>> >>>>> >>>> >>> >> > --089e0112c022253559053263506f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

Please find the attached re-based p= atch.

Thanks,
Khushboo

On Wed, Apr 6, 2016 at = 2:38 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
Hi Khushboo= ,


On Tue, Apr 5, 201= 6 at 10:59 AM, Khushboo Vashi <khushboo.vashi@enterprisedb.c= om> wrote:
Hi As= hesh,

I have changed the function name = (from render_deps to updateUIDeps), which will be called on t= he dependent field change, as per your suggestion.
I've updated the patch.
Please try this.
I think - 'updateUIDeps' is not the write name.
A Cell = can do anything, when dependent changed, hence - I renamed it with 'dep= endentChanged'.

Also, The user is not going to= extend existing cell from the DependendsCell, but - only going to use the = functions.
Hence - I have created a separate class for it instead= of extend it from Backgrid.Cell.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA:=C2=A0Enterprise PostgreSQL Company



Please find attached patch for the same.
=

Thanks,
Khushboo

On Fri, Apr 1, 2016 at 3= :56 PM, Khushboo Vashi <khushboo.vashi@enterprisedb.com&= gt; wrote:
Hi Ashesh,

<= /div>
Yes, agreed. This implementation limits us to use only String Cel= l.
So, I have modified the patch as you suggested.

=
Please find the attachment for the same.

Thanks,
Khushboo

On Fri, Apr 1, 2016 at 2:59 PM, Ashesh Vash= i <ashesh.vashi@enterprisedb.com> wrote:
Hi Khushboo,

I am reluctan= t to use this code as it is.
I would prefer you create just helpe= r functions (i.e. initialize, remove) for the dependents in Backgrid.Cell, = and then use them directly from the different cell itself.
Because - thi= s functionality limits us to us only with the string type.

Anyway - we will be using the dependent functionality for very att= ributes.


You can extend them direct= ly in the Node's model (schema). =C2=A0=C2=A0

--=

Thanks &= amp; Regards,

Ashesh Vashi
EnterpriseDB IN= DIA: Enter= prise PostgreSQL Company


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


On Wed, Mar 30, 2016 at 6:39 PM, K= hushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:
Hi,

Please find the attached patch for the Backgrid StringDepsCe= ll.
The StringDepsCell displays HTML escaped strings an=
d accepts anything typed in.
Also, Listen to the dependent fields.


If the Precision cell is dependent on the Data= type then:
{
id: 'precision', label:'{{ _(= 9;Precision') }}', type: 'test'
cell: Backgrid.Exte= nsion.StringDepsCell, deps: ['data= type']
}

Tha= nks,
Khushboo=C2=A0



--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers=






--089e0112c022253559053263506f-- --089e0112c02225355f0532635071 Content-Type: text/x-patch; charset=US-ASCII; name="depends_v3.patch" Content-Disposition: attachment; filename="depends_v3.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_inznnpz61 ZGlmZiAtLWdpdCBhL3dlYi9wZ2FkbWluL3N0YXRpYy9qcy9iYWNrZ3JpZC9i YWNrZ3JpZC5wZ2FkbWluLmpzIGIvd2ViL3BnYWRtaW4vc3RhdGljL2pzL2Jh Y2tncmlkL2JhY2tncm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nZGVwcycpOworCisgICAg ICAgIGlmIChkZXBzICYmIF8uaXNBcnJheShkZXBzKSkgeworICAgICAgICAg IF8uZWFjaChkZXBzLCBmdW5jdGlvbihkKSB7CisgICAgICAgICAgICBhdHRy QXJyID0gZC5zcGxpdCgnLicpOworICAgICAgICAgICAgbmFtZSA9IGF0dHJB cnIuc2hpZnQoKTsKKworICAgICAgICAgICAgc2VsZi5zdG9wTGlzdGVuaW5n KHNlbGYubW9kZWwsICJjaGFuZ2U6IiArIG5hbWUsIHNlbGYuZGVwZW5kZW50 Q2hhbmdlZCk7CisgICAgICAgICAgfSk7CisgICAgICAgIH0KKyAgICAgIH0K KyAgICB9KTsKKwogICByZXR1cm4gQmFja2dyaWQ7CiAKIH0pKTsK --089e0112c02225355f0532635071 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers --089e0112c02225355f0532635071--