Re: [pgAdmin4][Patch]: RM#1243 - Columns on the Query Tool should be sizeable

From: Surinder Kumar <surinder(dot)kumar(at)enterprisedb(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin4][Patch]: RM#1243 - Columns on the Query Tool should be sizeable
Date: 2016-05-27 12:57:19
Message-ID: CAM5-9D-LoaZ12KrKvup3k4YUmW_Kkv5qR538p=1fwzS6bTftEw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi

Please find updated patch with following changes:

1. Replaced the outdated code for *Backgrid Sizeable Columns plugin *with
https://github.com/FortesSolutions/backgrid-sizeable-columns library
because the updated code is available here.
2. I have figured out to calculate *offset* using the parameters of
listener provided, so we need not to tweak the original library code.

On Fri, May 27, 2016 at 5:00 PM, Surinder Kumar <
surinder(dot)kumar(at)enterprisedb(dot)com> wrote:

>
>
> On Fri, May 27, 2016 at 4:43 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>
>> Hi
>>
>> On Fri, May 27, 2016 at 12:07 PM, Surinder Kumar
>> <surinder(dot)kumar(at)enterprisedb(dot)com> wrote:
>> > Hi
>> >
>> > Added support for Columns resizable in query tool. It allows user to
>> resize
>> > the table columns as much as needed.
>> >
>> > We are using Backgrid Sizeable Columns plugin:
>> > https://github.com/WRidder/backgrid-sizeable-columns
>> >
>> > with one change in library on line no 185:
>> > moved the following trigger event out of if condition:
>> >
>> > if (newWidth != oldWidth) {
>> >
>> > }
>> >
>> >
>> > and added one additional parameter offset.
>> > //Trigger event
>> >
>> > view.columns.trigger("resize", columnModel, newWidth, oldWidth, offset);
>> >
>> >
>> > We are listening to this trigger event in sqleditor.js file where we
>> need
>> > offset
>> > to calculate new table width on every resize event.
>>
>> Please ensure any changes to third party libraries are submitted upstream.
>>
> yes, sure.
>
>>
>> > hence, here is the patch attached.
>>
>> ENOATTACHMENT!
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>
>

Attachment Content-Type Size
column_resizable_in_query_tool_v1.patch application/octet-stream 22.1 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2016-05-27 13:05:52 Re: Patch for pgAdmin4 RPM package
Previous Message Sandeep Thakkar 2016-05-27 12:55:26 Re: Patch for pgAdmin4 RPM package