Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1alwIO-0001zw-T5 for pgadmin-hackers@arkaria.postgresql.org; Fri, 01 Apr 2016 10:27:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1alwIO-0007gF-Ej for pgadmin-hackers@arkaria.postgresql.org; Fri, 01 Apr 2016 10:27:16 +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 1alwIA-0007Ra-DT for pgadmin-hackers@postgresql.org; Fri, 01 Apr 2016 10:27:02 +0000 Received: from mail-lf0-x230.google.com ([2a00:1450:4010:c07::230]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1alwI7-0005rP-7V for pgadmin-hackers@postgresql.org; Fri, 01 Apr 2016 10:27:01 +0000 Received: by mail-lf0-x230.google.com with SMTP id k79so78636649lfb.2 for ; Fri, 01 Apr 2016 03:26:58 -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=xrZf5cf1a3VyyxSz0j/BW/U9Sin2xLP/bmYjMwxKz+U=; b=hgGOy6Gn6pH/63foAUFjO6+7n2+zEn/vuejd5/bb9sWZVIfMHKOXxZhZ1LrmZcWmvr 3iBY0SwA+ELGPl6aQLs4cQtFH9AudaVj04mOUGiYxXf84HUCvfxRvaIhtlxEYIUt+4en 3NW6IhsGIb6G4Od7XK1XRHhrLbrNWKmPcRYXsexLEEeTtpN3FfFKwZEhvFw9GL4j1gJG h004O8w6nP9gaIG+kIW1NAXF05mBq21UoCdRG9qp5omu7cuEVFMgQCRJE6yJtJtZ9EUX A5v7izDgPOVlPvox2U8R9GN5w0nIAcrDVfRFwZOOc7Jru5TDyVW9mikt1Sk6vhCQUc2a 6uRw== 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=xrZf5cf1a3VyyxSz0j/BW/U9Sin2xLP/bmYjMwxKz+U=; b=b7pCfAC2lvythEW6jVNzbJJoZ19gOi+8COUfII4aV/np853Hg0EAFkqDmaHbi4A4P0 nc6QWETUOD6DcT1HgvA4TESZbycagyX/oTcpGlgb9RLElbk6mYj+GDYEGyfoz2TH+2xd kT98vlxgZHMDwzZ+QHdDnGDWGYPdLbOwZ94YrhC77ElvCO7KBVT8N+QfGefryulH5UHd PTNDPOET4/ycs+NHZs2cV7VwKw7VktqZSLUP1j9voB5P6F9PuWZ0O0F9jlKNP9KgJB2B uripWCLZhTLWwg0Cs32mu0PY06ZB7+9uk9dk5JmyXO15p6q1ZdvsiylpWHsLwhN0dgn2 iN/Q== X-Gm-Message-State: AD7BkJKHTgrHMfG2s7sjXdIE6vd3aeTkgeUwbMaYCOS+Y8+JkcjqMPkQdVy1zpNW1/Ah3m3S4kj1OLIPEp4nGgON MIME-Version: 1.0 X-Received: by 10.25.88.85 with SMTP id m82mr1655662lfb.93.1459506417347; Fri, 01 Apr 2016 03:26:57 -0700 (PDT) Received: by 10.25.144.81 with HTTP; Fri, 1 Apr 2016 03:26:57 -0700 (PDT) In-Reply-To: References: Date: Fri, 1 Apr 2016 15:56:57 +0530 Message-ID: Subject: Re: [pgAdmin4][Patch]: Backgrid StringDepsCell From: Khushboo Vashi To: Ashesh Vashi Cc: pgadmin-hackers Content-Type: multipart/mixed; boundary=001a1141dace8ddd5a052f69d140 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 --001a1141dace8ddd5a052f69d140 Content-Type: multipart/alternative; boundary=001a1141dace8ddd57052f69d13e --001a1141dace8ddd57052f69d13e Content-Type: text/plain; charset=UTF-8 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 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 >> >> > --001a1141dace8ddd57052f69d13e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Ashesh,

Yes, agreed. This implementa= tion limits us to use only String Cell.
So, I have modified the p= atch as you suggested.

Please find the attachment = for the same.

Thanks,
Khushboo


--001a1141dace8ddd57052f69d13e-- --001a1141dace8ddd5a052f69d140 Content-Type: text/x-patch; charset=US-ASCII; name="pgAdmin4_Backgrid_Depscell.patch" Content-Disposition: attachment; filename="pgAdmin4_Backgrid_Depscell.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_imhkevir0 ZGlmZiAtLWdpdCBhL3dlYi9wZ2FkbWluL3N0YXRpYy9qcy9iYWNrZ3JpZC9i YWNrZ3JpZC5wZ2FkbWluLmpzIGIvd2ViL3BnYWRtaW4vc3RhdGljL2pzL2Jh Y2tncmlkL2JhY2tncmlkLnBnYWRtaW4uanMKaW5kZXggNGIyMzNkMi4uNmNj ZWE5YSAxMDA2NDQKLS0tIGEvd2ViL3BnYWRtaW4vc3RhdGljL2pzL2JhY2tn cmlkL2JhY2tncmlkLnBnYWRtaW4uanMKKysrIGIvd2ViL3BnYWRtaW4vc3Rh dGljL2pzL2JhY2tncmlkL2JhY2tncmlkLnBnYWRtaW4uanMKQEAgLTQ0Nyw2 ICs0NDcsNDggQEAKICAgICBlZGl0b3I6IFRleHRhcmVhQ2VsbEVkaXRvcgog ICB9KTsKIAorICAvKioKKyAgICBEZXBlbmRlbnRDZWxsIGNhbiBiZSB1c2Vk IGFzIGEgYmFzZSBjbGFzcyBmb3IgYW55IGJhY2tncmlkIGNlbGwgd2hpY2gg aXMKKyAgICBkZXBlbmRlbnQgb24gYW5vdGhlciBjZWxsLiBJdCB3aWxsIGxp c3RlbiB0byB0aGUgZGVwZW5kZW50IGZpZWxkcy9jZWxscy4KKworICAgIE5l ZWQgdG8gRXh0ZW5kIHRoaXMgY2VsbCB3aGVuZXZlciByZXF1aXJlZCBhbmQg aGFzIHRvIGltcGxlbWVudCByZW5kZXJfZGVwcworICAgIGZ1bmN0aW9uIHRv IGxpc3RlbiB0byB0aGUgZGVwZW5kZW50IGZpZWxkcyBjaGFuZ2UgZXZlbnQu CisKKyAgICBAY2xhc3MgQmFja2dyaWQuRXh0ZW5zaW9uLkRlcGVuZGVudENl bGwKKyAgICBAZXh0ZW5kcyBCYWNrZ3JpZC5EZXBlbmRlbnRDZWxsCisgICov CisgIHZhci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y4nKTsKKyAgICAgICAgICBu YW1lID0gYXR0ckFyci5zaGlmdCgpOworICAgICAgICAgIHNlbGYuc3RvcExp c3RlbmluZyhzZWxmLm1vZGVsLCAiY2hhbmdlOiIgKyBuYW1lLCBzZWxmLnJl bmRlcl9kZXBzKTsKKyAgICAgICAgfSk7CisgICAgICB9CisgICAgICBCYWNr Ym9uZS5WaWV3LnByb3RvdHlwZS5yZW1vdmUuYXBwbHkoc2VsZiwgYXJndW1l bnRzKTsKKyAgICB9CisgIH0pOworCiAgIHJldHVybiBCYWNrZ3JpZDsKIAog fSkpOwo= --001a1141dace8ddd5a052f69d140 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 --001a1141dace8ddd5a052f69d140--