public inbox for [email protected]  
help / color / mirror / Atom feed
[pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error
12+ messages / 2 participants
[nested] [flat]

* [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error
@ 2016-07-06 09:42 Surinder Kumar <[email protected]>
  2016-07-06 12:10 ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  0 siblings, 1 reply; 12+ messages in thread

From: Surinder Kumar @ 2016-07-06 09:42 UTC (permalink / raw)
  To: [email protected]; pgadmin-hackers

Hi

Please find the patch with issue fixed:
File Browser - File does not exist error

> it is due to wrong path formation. strip the leftmost slash only from the
> file name selected not from the full path.


Please review.

*Reply to the comments:*
The file browser is virtually unreadable (see screen shot), it does not
work like Mac app
It seems to be font issue to me. I will fix it and send a patch.

When I click on the folder name, it offers to change the folder name
instead of opening it (opening works when I click on the folder logo)
we are performing two operations on double click:
1) Navigate inside the folder
double clicking on folder icon allows to navigate inside the folder.
2) Rename folder
double clicking on folder name allows to rename the file/folder.

When I manage to navigate to the right file and want to open it, I get a
red message ‘File does not exist’. That message disappears after 2-3 seconds
attached a patch with fix.

Thanks,
Surinder Kumar


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [application/octet-stream] RM#1432.patch (920B, 3-RM%231432.patch)
  download | inline diff:
diff --git a/web/pgadmin/tools/sqleditor/__init__.py b/web/pgadmin/tools/sqleditor/__init__.py
index c713fb5..92e4b17 100644
--- a/web/pgadmin/tools/sqleditor/__init__.py
+++ b/web/pgadmin/tools/sqleditor/__init__.py
@@ -1121,16 +1121,13 @@ def load_file():
     if request.data:
         file_data = json.loads(request.data.decode())

+    file_path = unquote(file_data['file_name'])
     # retrieve storage directory path
     storage_manager_path = get_storage_directory()
-    if storage_manager_path is None:
-        storage_manager_path = ""
+    if storage_manager_path:
+        # generate full path of file
+        file_path = os.path.join(storage_manager_path, file_path.lstrip('/'))

-    # generate full path of file
-    file_path = os.path.join(
-        storage_manager_path,
-        unquote(file_data['file_name'].lstrip('/'))
-    )
     file_data = None

     # check if file type is text or binary


^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error
  2016-07-06 09:42 [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
@ 2016-07-06 12:10 ` Dave Page <[email protected]>
  2016-07-06 13:32   ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  0 siblings, 1 reply; 12+ messages in thread

From: Dave Page @ 2016-07-06 12:10 UTC (permalink / raw)
  To: Surinder Kumar <[email protected]>; +Cc: Marc Linster <[email protected]>; pgadmin-hackers

Hi,

I think we need more changes than just that;

- The path at the top should not be editable (it should be greyed in fact)

- The path at the top should only show the directory path. The
filename should never be appended.

- The CSS needs to be fixed so the filename textbox at the bottom is
never hidden (as it is now if the dialogue opens at a small size).

- Double-click to navigate vs. rename should be modified to work in
part like it does on Mac - Double-click on either the icon or the name
should open the item (browser into a folder, or select and "OK" on a
file), and Click then Enter should rename. I'm hesitant to try to
implement "slow double click to rename" as that would likely need to
be tunable for accessibility reasons.

On Wed, Jul 6, 2016 at 10:42 AM, Surinder Kumar
<[email protected]> wrote:
> Hi
>
> Please find the patch with issue fixed:
> File Browser - File does not exist error
>>
>> it is due to wrong path formation. strip the leftmost slash only from the
>> file name selected not from the full path.
>
>
> Please review.
>
> Reply to the comments:
> The file browser is virtually unreadable (see screen shot), it does not work
> like Mac app
> It seems to be font issue to me. I will fix it and send a patch.
>
> When I click on the folder name, it offers to change the folder name instead
> of opening it (opening works when I click on the folder logo)
> we are performing two operations on double click:
> 1) Navigate inside the folder
> double clicking on folder icon allows to navigate inside the folder.
> 2) Rename folder
> double clicking on folder name allows to rename the file/folder.
>
> When I manage to navigate to the right file and want to open it, I get a red
> message ‘File does not exist’. That message disappears after 2-3 seconds
> attached a patch with fix.
>
> Thanks,
> Surinder Kumar
>
>
> --
> Sent via pgadmin-hackers mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



-- 
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 ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers



^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error
  2016-07-06 09:42 [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-06 12:10 ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
@ 2016-07-06 13:32   ` Surinder Kumar <[email protected]>
  2016-07-07 12:50     ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  0 siblings, 1 reply; 12+ messages in thread

From: Surinder Kumar @ 2016-07-06 13:32 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: Marc Linster <[email protected]>; pgadmin-hackers

On Wed, Jul 6, 2016 at 5:40 PM, Dave Page <[email protected]> wrote:

> Hi,
>
> I think we need more changes than just that;
>
> - The path at the top should not be editable (it should be greyed in fact)
>
Ok

>
> - The path at the top should only show the directory path. The
> filename should never be appended.
>
Ok

>
> - The CSS needs to be fixed so the filename textbox at the bottom is
> never hidden (as it is now if the dialogue opens at a small size).
>
Ok

>
> - Double-click to navigate vs. rename should be modified to work in
> part like it does on Mac - Double-click on either the icon or the name
> should open the item (browser into a folder, or select and "OK" on a
> file), and Click then Enter should rename. I'm hesitant to try to
> implement "slow double click to rename" as that would likely need to
> be tunable for accessibility reasons.
>
Ok, I will fix it.

>
> On Wed, Jul 6, 2016 at 10:42 AM, Surinder Kumar
> <[email protected]> wrote:
> > Hi
> >
> > Please find the patch with issue fixed:
> > File Browser - File does not exist error
> >>
> >> it is due to wrong path formation. strip the leftmost slash only from
> the
> >> file name selected not from the full path.
> >
> >
> > Please review.
> >
> > Reply to the comments:
> > The file browser is virtually unreadable (see screen shot), it does not
> work
> > like Mac app
> > It seems to be font issue to me. I will fix it and send a patch.
> >
> > When I click on the folder name, it offers to change the folder name
> instead
> > of opening it (opening works when I click on the folder logo)
> > we are performing two operations on double click:
> > 1) Navigate inside the folder
> > double clicking on folder icon allows to navigate inside the folder.
> > 2) Rename folder
> > double clicking on folder name allows to rename the file/folder.
> >
> > When I manage to navigate to the right file and want to open it, I get a
> red
> > message ‘File does not exist’. That message disappears after 2-3 seconds
> > attached a patch with fix.
> >
> > Thanks,
> > Surinder Kumar
> >
> >
> > --
> > Sent via pgadmin-hackers mailing list ([email protected])
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgadmin-hackers
> >
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error
  2016-07-06 09:42 [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-06 12:10 ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  2016-07-06 13:32   ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
@ 2016-07-07 12:50     ` Surinder Kumar <[email protected]>
  2016-07-11 13:11       ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  0 siblings, 1 reply; 12+ messages in thread

From: Surinder Kumar @ 2016-07-07 12:50 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: Marc Linster <[email protected]>; pgadmin-hackers

On Wed, Jul 6, 2016 at 7:02 PM, Surinder Kumar <
[email protected]> wrote:

> On Wed, Jul 6, 2016 at 5:40 PM, Dave Page <[email protected]> wrote:
>
>> Hi,
>>
>> I think we need more changes than just that;
>>
>> - The path at the top should not be editable (it should be greyed in fact)
>>
> Ok
>
>>
>> - The path at the top should only show the directory path. The
>> filename should never be appended.
>>
> Ok
>
>>
>> - The CSS needs to be fixed so the filename textbox at the bottom is
>> never hidden (as it is now if the dialogue opens at a small size).
>>
> Ok
>
>>
>> - Double-click to navigate vs. rename should be modified to work in
>> part like it does on Mac - Double-click on either the icon or the name
>> should open the item (browser into a folder, or select and "OK" on a
>> file), and Click then Enter should rename. I'm hesitant to try to
>> implement "slow double click to rename" as that would likely need to
>> be tunable for accessibility reasons.
>>
> Ok, I will fix it.
>
In the current scenario, the Enter Key is bound to the OK button by default
in Alertify dialog which servers the purpose of closing the dialog.
Should we de-attach Enter Key event bound to OK button and use it for
rename file?
please suggest what should I do?


On Wed, Jul 6, 2016 at 10:42 AM, Surinder Kumar
>> <[email protected]> wrote:
>> > Hi
>> >
>> > Please find the patch with issue fixed:
>> > File Browser - File does not exist error
>> >>
>> >> it is due to wrong path formation. strip the leftmost slash only from
>> the
>> >> file name selected not from the full path.
>> >
>> >
>> > Please review.
>> >
>> > Reply to the comments:
>> > The file browser is virtually unreadable (see screen shot), it does not
>> work
>> > like Mac app
>> > It seems to be font issue to me. I will fix it and send a patch.
>> >
>> > When I click on the folder name, it offers to change the folder name
>> instead
>> > of opening it (opening works when I click on the folder logo)
>> > we are performing two operations on double click:
>> > 1) Navigate inside the folder
>> > double clicking on folder icon allows to navigate inside the folder.
>> > 2) Rename folder
>> > double clicking on folder name allows to rename the file/folder.
>> >
>> > When I manage to navigate to the right file and want to open it, I get
>> a red
>> > message ‘File does not exist’. That message disappears after 2-3 seconds
>> > attached a patch with fix.
>> >
>> > Thanks,
>> > Surinder Kumar
>> >
>> >
>> > --
>> > Sent via pgadmin-hackers mailing list ([email protected])
>> > To make changes to your subscription:
>> > http://www.postgresql.org/mailpref/pgadmin-hackers
>> >
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>


^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error
  2016-07-06 09:42 [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-06 12:10 ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  2016-07-06 13:32   ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-07 12:50     ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
@ 2016-07-11 13:11       ` Dave Page <[email protected]>
  2016-07-12 06:10         ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  0 siblings, 1 reply; 12+ messages in thread

From: Dave Page @ 2016-07-11 13:11 UTC (permalink / raw)
  To: Surinder Kumar <[email protected]>; +Cc: Marc Linster <[email protected]>; pgadmin-hackers

On Thu, Jul 7, 2016 at 1:50 PM, Surinder Kumar
<[email protected]> wrote:
> On Wed, Jul 6, 2016 at 7:02 PM, Surinder Kumar
> <[email protected]> wrote:
>>
>> On Wed, Jul 6, 2016 at 5:40 PM, Dave Page <[email protected]> wrote:
>>>
>>> Hi,
>>>
>>> I think we need more changes than just that;
>>>
>>> - The path at the top should not be editable (it should be greyed in
>>> fact)
>>
>> Ok
>>>
>>>
>>> - The path at the top should only show the directory path. The
>>> filename should never be appended.
>>
>> Ok
>>>
>>>
>>> - The CSS needs to be fixed so the filename textbox at the bottom is
>>> never hidden (as it is now if the dialogue opens at a small size).
>>
>> Ok
>>>
>>>
>>> - Double-click to navigate vs. rename should be modified to work in
>>> part like it does on Mac - Double-click on either the icon or the name
>>> should open the item (browser into a folder, or select and "OK" on a
>>> file), and Click then Enter should rename. I'm hesitant to try to
>>> implement "slow double click to rename" as that would likely need to
>>> be tunable for accessibility reasons.
>>
>> Ok, I will fix it.
>
> In the current scenario, the Enter Key is bound to the OK button by default
> in Alertify dialog which servers the purpose of closing the dialog.
> Should we de-attach Enter Key event bound to OK button and use it for rename
> file?
> please suggest what should I do?

Hmm, good point.

How hard would it be to look for 2 consecutive single-clicks (but not
a double-click) for rename? If we can do that, it avoids timing
considerations for double-clicks (which would be defined by the OS).


-- 
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 ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers



^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error
  2016-07-06 09:42 [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-06 12:10 ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  2016-07-06 13:32   ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-07 12:50     ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-11 13:11       ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
@ 2016-07-12 06:10         ` Surinder Kumar <[email protected]>
  2016-07-13 11:45           ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  0 siblings, 1 reply; 12+ messages in thread

From: Surinder Kumar @ 2016-07-12 06:10 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: Marc Linster <[email protected]>; pgadmin-hackers

On Mon, Jul 11, 2016 at 6:41 PM, Dave Page <[email protected]> wrote:

> On Thu, Jul 7, 2016 at 1:50 PM, Surinder Kumar
> <[email protected]> wrote:
> > On Wed, Jul 6, 2016 at 7:02 PM, Surinder Kumar
> > <[email protected]> wrote:
> >>
> >> On Wed, Jul 6, 2016 at 5:40 PM, Dave Page <[email protected]> wrote:
> >>>
> >>> Hi,
> >>>
> >>> I think we need more changes than just that;
> >>>
> >>> - The path at the top should not be editable (it should be greyed in
> >>> fact)
> >>
> >> Ok
> >>>
> >>>
> >>> - The path at the top should only show the directory path. The
> >>> filename should never be appended.
> >>
> >> Ok
> >>>
> >>>
> >>> - The CSS needs to be fixed so the filename textbox at the bottom is
> >>> never hidden (as it is now if the dialogue opens at a small size).
> >>
> >> Ok
> >>>
> >>>
> >>> - Double-click to navigate vs. rename should be modified to work in
> >>> part like it does on Mac - Double-click on either the icon or the name
> >>> should open the item (browser into a folder, or select and "OK" on a
> >>> file), and Click then Enter should rename. I'm hesitant to try to
> >>> implement "slow double click to rename" as that would likely need to
> >>> be tunable for accessibility reasons.
> >>
> >> Ok, I will fix it.
> >
> > In the current scenario, the Enter Key is bound to the OK button by
> default
> > in Alertify dialog which servers the purpose of closing the dialog.
> > Should we de-attach Enter Key event bound to OK button and use it for
> rename
> > file?
> > please suggest what should I do?
>
> Hmm, good point.
>
> How hard would it be to look for 2 consecutive single-clicks (but not
> a double-click) for rename? If we can do that, it avoids timing
> considerations for double-clicks (which would be defined by the OS).
>

I tried to implement slow double click, here is Fiddle
<https://jsfiddle.net/5kwn6mj2/#;
There are two events 1) double click (it will be used for folder navigation)
2) Slow double click(For rename), It is a simple click event, when clicked
twice after delay we consider it a slow double click.

But it is not working smoothly, double click and single click events are
conflicting.

Also, we have rename button in navigation for rename operation,
Can we skip slow double click because it is very confusing?

>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error
  2016-07-06 09:42 [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-06 12:10 ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  2016-07-06 13:32   ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-07 12:50     ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-11 13:11       ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  2016-07-12 06:10         ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
@ 2016-07-13 11:45           ` Dave Page <[email protected]>
  2016-07-13 13:50             ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  0 siblings, 1 reply; 12+ messages in thread

From: Dave Page @ 2016-07-13 11:45 UTC (permalink / raw)
  To: Surinder Kumar <[email protected]>; +Cc: Marc Linster <[email protected]>; pgadmin-hackers

On Tue, Jul 12, 2016 at 7:10 AM, Surinder Kumar
<[email protected]> wrote:
> On Mon, Jul 11, 2016 at 6:41 PM, Dave Page <[email protected]> wrote:
>>
>> On Thu, Jul 7, 2016 at 1:50 PM, Surinder Kumar
>> <[email protected]> wrote:
>> > On Wed, Jul 6, 2016 at 7:02 PM, Surinder Kumar
>> > <[email protected]> wrote:
>> >>
>> >> On Wed, Jul 6, 2016 at 5:40 PM, Dave Page <[email protected]> wrote:
>> >>>
>> >>> Hi,
>> >>>
>> >>> I think we need more changes than just that;
>> >>>
>> >>> - The path at the top should not be editable (it should be greyed in
>> >>> fact)
>> >>
>> >> Ok
>> >>>
>> >>>
>> >>> - The path at the top should only show the directory path. The
>> >>> filename should never be appended.
>> >>
>> >> Ok
>> >>>
>> >>>
>> >>> - The CSS needs to be fixed so the filename textbox at the bottom is
>> >>> never hidden (as it is now if the dialogue opens at a small size).
>> >>
>> >> Ok
>> >>>
>> >>>
>> >>> - Double-click to navigate vs. rename should be modified to work in
>> >>> part like it does on Mac - Double-click on either the icon or the name
>> >>> should open the item (browser into a folder, or select and "OK" on a
>> >>> file), and Click then Enter should rename. I'm hesitant to try to
>> >>> implement "slow double click to rename" as that would likely need to
>> >>> be tunable for accessibility reasons.
>> >>
>> >> Ok, I will fix it.
>> >
>> > In the current scenario, the Enter Key is bound to the OK button by
>> > default
>> > in Alertify dialog which servers the purpose of closing the dialog.
>> > Should we de-attach Enter Key event bound to OK button and use it for
>> > rename
>> > file?
>> > please suggest what should I do?
>>
>> Hmm, good point.
>>
>> How hard would it be to look for 2 consecutive single-clicks (but not
>> a double-click) for rename? If we can do that, it avoids timing
>> considerations for double-clicks (which would be defined by the OS).
>
>
> I tried to implement slow double click, here is Fiddle
> There are two events 1) double click (it will be used for folder navigation)
> 2) Slow double click(For rename), It is a simple click event, when clicked
> twice after delay we consider it a slow double click.
>
> But it is not working smoothly, double click and single click events are
> conflicting.

Yeah, so I see.

> Also, we have rename button in navigation for rename operation,
> Can we skip slow double click because it is very confusing?

OK, I must have been having a brain failure moment or something. Yes,
skip it - we obviously don't need it with the rename button.

So we have:

- Click to select
- Double click to open a folder
- Button to rename the select file/folder

Sorry!

-- 
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 ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers



^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error
  2016-07-06 09:42 [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-06 12:10 ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  2016-07-06 13:32   ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-07 12:50     ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-11 13:11       ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  2016-07-12 06:10         ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-13 11:45           ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
@ 2016-07-13 13:50             ` Surinder Kumar <[email protected]>
  2016-07-13 13:53               ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  0 siblings, 1 reply; 12+ messages in thread

From: Surinder Kumar @ 2016-07-13 13:50 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: Marc Linster <[email protected]>; pgadmin-hackers

Please find updated patch with following changes/enhancements:

   1. Double click on file/folder icon or name will navigate to the
   folder/file.
   2. Selected file/folder can be renamed by Rename button only. Double
   click rename is removed.
   3. Filename text box will not hide on smaller screen. Setting minimum
   width of File Browser fixed it.
   4. Path at top will only show directory name, not the file name and it
   is greyed out.

*Issue not fixed:*
Icons and fonts of Query tool and File Browser looks blurred in Runtime
environment.
I tried debugging it. while debugging, It gets fixed on my ubuntu runtime.
but I don't know how it gets fixed without changing css styles. It needs
more time to debug.

Please review.

On Wed, Jul 13, 2016 at 5:15 PM, Dave Page <[email protected]> wrote:

> On Tue, Jul 12, 2016 at 7:10 AM, Surinder Kumar
> <[email protected]> wrote:
> > On Mon, Jul 11, 2016 at 6:41 PM, Dave Page <[email protected]> wrote:
> >>
> >> On Thu, Jul 7, 2016 at 1:50 PM, Surinder Kumar
> >> <[email protected]> wrote:
> >> > On Wed, Jul 6, 2016 at 7:02 PM, Surinder Kumar
> >> > <[email protected]> wrote:
> >> >>
> >> >> On Wed, Jul 6, 2016 at 5:40 PM, Dave Page <[email protected]> wrote:
> >> >>>
> >> >>> Hi,
> >> >>>
> >> >>> I think we need more changes than just that;
> >> >>>
> >> >>> - The path at the top should not be editable (it should be greyed in
> >> >>> fact)
> >> >>
> >> >> Ok
> >> >>>
> >> >>>
> >> >>> - The path at the top should only show the directory path. The
> >> >>> filename should never be appended.
> >> >>
> >> >> Ok
> >> >>>
> >> >>>
> >> >>> - The CSS needs to be fixed so the filename textbox at the bottom is
> >> >>> never hidden (as it is now if the dialogue opens at a small size).
> >> >>
> >> >> Ok
> >> >>>
> >> >>>
> >> >>> - Double-click to navigate vs. rename should be modified to work in
> >> >>> part like it does on Mac - Double-click on either the icon or the
> name
> >> >>> should open the item (browser into a folder, or select and "OK" on a
> >> >>> file), and Click then Enter should rename. I'm hesitant to try to
> >> >>> implement "slow double click to rename" as that would likely need to
> >> >>> be tunable for accessibility reasons.
> >> >>
> >> >> Ok, I will fix it.
> >> >
> >> > In the current scenario, the Enter Key is bound to the OK button by
> >> > default
> >> > in Alertify dialog which servers the purpose of closing the dialog.
> >> > Should we de-attach Enter Key event bound to OK button and use it for
> >> > rename
> >> > file?
> >> > please suggest what should I do?
> >>
> >> Hmm, good point.
> >>
> >> How hard would it be to look for 2 consecutive single-clicks (but not
> >> a double-click) for rename? If we can do that, it avoids timing
> >> considerations for double-clicks (which would be defined by the OS).
> >
> >
> > I tried to implement slow double click, here is Fiddle
> > There are two events 1) double click (it will be used for folder
> navigation)
> > 2) Slow double click(For rename), It is a simple click event, when
> clicked
> > twice after delay we consider it a slow double click.
> >
> > But it is not working smoothly, double click and single click events are
> > conflicting.
>
> Yeah, so I see.
>
> > Also, we have rename button in navigation for rename operation,
> > Can we skip slow double click because it is very confusing?
>
> OK, I must have been having a brain failure moment or something. Yes,
> skip it - we obviously don't need it with the rename button.
>
> So we have:
>
> - Click to select
> - Double click to open a folder
> - Button to rename the select file/folder
>
> Sorry!
>
> --
> 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 ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [application/octet-stream] RM#1432_v2.patch (7.3K, 3-RM%231432_v2.patch)
  download | inline diff:
diff --git a/web/pgadmin/misc/file_manager/static/css/file_manager.css b/web/pgadmin/misc/file_manager/static/css/file_manager.css
index 0f188d8..ea502ac 100755
--- a/web/pgadmin/misc/file_manager/static/css/file_manager.css
+++ b/web/pgadmin/misc/file_manager/static/css/file_manager.css
@@ -24,11 +24,15 @@
   float: left;
   text-align: left;
   line-height:1.9em;
-  text-shadow:1px 1px 0px #ffffff;
+  max-width: 367px;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  color: #999;
 }

 #uploader h1 b {
   font-weight: normal;
+  color: #999;
 }

 .uploadresponse {
@@ -346,6 +350,7 @@ button.list span {
   -moz-border-radius: 5px;
   float: left;
   margin-right: 10px;
+  background: #EEE;
 }

 .file_manager #uploader .btn-group .btn[disabled] {
@@ -528,7 +533,9 @@ button.list span {
   -moz-border-radius: 3px;
   height: 22px;
   font-size: 13px;
+  font-weight: normal;
   display: inline;
+  width: 150px;
 }

 .allowed_file_types .change_file_types {
diff --git a/web/pgadmin/misc/file_manager/templates/file_manager/js/file_manager.js b/web/pgadmin/misc/file_manager/templates/file_manager/js/file_manager.js
index 7d6eb3b..9e8a080 100644
--- a/web/pgadmin/misc/file_manager/templates/file_manager/js/file_manager.js
+++ b/web/pgadmin/misc/file_manager/templates/file_manager/js/file_manager.js
@@ -94,6 +94,7 @@ define([
               $container.find('.storage_content').remove();
               $container.append("<div class='storage_content'></div>");
               renderStoragePanel(params);
+              this.elements.dialog.style.minWidth = '630px';
               this.show();
             },
             settings: {
@@ -203,6 +204,7 @@ define([
               $container.find('.storage_content').remove();
               $container.append("<div class='storage_content'></div>");
               renderStoragePanel(params);
+              this.elements.dialog.style.minWidth = '630px';
               this.show();
             },
             settings: {
@@ -314,6 +316,7 @@ define([
               $container.find('.storage_content').remove();
               $container.append("<div class='storage_content'></div>");
               renderStoragePanel(params);
+              this.elements.dialog.style.minWidth = '630px';
               this.show();
             },
             settings: {
@@ -425,6 +428,7 @@ define([
               $container.find('.storage_content').remove();
               $container.append("<div class='storage_content'></div>");
               renderStoragePanel(params);
+              this.elements.dialog.style.minWidth = '630px';
               this.show();
             },
             settings: {
diff --git a/web/pgadmin/misc/file_manager/templates/file_manager/js/utility.js b/web/pgadmin/misc/file_manager/templates/file_manager/js/utility.js
index 8e9c42e..baa71b1 100755
--- a/web/pgadmin/misc/file_manager/templates/file_manager/js/utility.js
+++ b/web/pgadmin/misc/file_manager/templates/file_manager/js/utility.js
@@ -195,7 +195,7 @@ var setUploader = function(path) {
   path = decodeURI(path);

   var display_string = path,
-      mypath = '';
+      file_path = '';

   // split path
   var split_path = display_string.split('/');
@@ -203,29 +203,17 @@ var setUploader = function(path) {

   // set empty path if it is windows
   if (config.options.platform_type === "win32" && config.options.show_volumes) {
-      mypath = "";
+      file_path = "";
   } else if (split_path.length === 0) {
-    mypath = $('<b>/</b>');
+    file_path = '/';
   } else {
-    mypath = $('<a class="breadcrumbs" href="#" data-path="/">/</a>');
+    file_path = '/';
   }
-  $(mypath).appendTo($('.storage_dialog #uploader h1'));

   Object.keys(split_path).forEach(function (i) {
-    if (i < split_path.length - 1) {
-      mypath = $(
-        '<a class="breadcrumbs" href="#" data-path="' +
-        display_string.replace(split_path[i+1], '') +
-        '">' + split_path[i] + '/</a>'
-      );
-      $(mypath).appendTo($('.storage_dialog #uploader h1'));
-    } else {
-      mypath = $('<b>' + split_path[i] + '/</b>');
-      $(mypath).appendTo(
-        $('.storage_dialog #uploader h1')
-      );
-    }
+    file_path += split_path[i] + '/';
   });
+  $('.storage_dialog #uploader h1').html(file_path);

   $('.currentpath').val(path);
   if ($('.storage_dialog #uploader h1 span').length === 0) {
@@ -908,28 +896,6 @@ var getFolderInfo = function(path, file_type) {
         }
       });

-      $('.fileinfo #contents li p').on('dblclick',function(e) {
-        e.stopPropagation();
-        var $this = $(this);
-        var orig_value = decodeURI($this.find('span').attr('title')),
-            newvalue = orig_value.substring(0, orig_value.indexOf('.'));
-
-        if (newvalue === '') {
-          newvalue = orig_value;
-        }
-
-        $this.find('input').toggle().val(newvalue).focus();
-        $this.find('span').toggle();
-
-        // Rename folder/file on pressing enter key
-        $('.file_manager').unbind().on('keyup', function(e) {
-          if (e.keyCode == 13) {
-            e.stopPropagation();
-            $this.find('input').trigger('blur');
-          }
-        });
-      });
-
       // Rename UI handling
       $('.fileinfo #contents li p').on('blur dblclick','input', function(e) {
         e.stopPropagation();
@@ -1008,30 +974,6 @@ var getFolderInfo = function(path, file_type) {
         }
       });

-      $('.fileinfo table#contents tr td p').on('dblclick', function(e) {
-        e.stopPropagation();
-        var $this = $(this),
-            orig_value = decodeURI(
-              $this.find('span').attr('title')
-            );
-
-        var newvalue = orig_value.substring(0, orig_value.lastIndexOf('.'));
-        if (orig_value.lastIndexOf('/') == orig_value.length - 1 || newvalue === '') {
-          newvalue = orig_value;
-        }
-
-        $this.find('input').toggle().val(newvalue).focus();
-        $this.find('span').toggle();
-
-        // Rename folder/file on pressing enter key
-        $('.file_manager').unbind().on('keyup', function(e) {
-          if (e.keyCode == 13) {
-            e.stopPropagation();
-            $this.find('input').trigger('blur');
-          }
-        });
-      });
-
       $('.fileinfo table#contents tr td p').on(
         'blur dblclick', 'input', function(e) {
         var old_name = decodeURI($(this).siblings('span').attr('title')),
@@ -1148,11 +1090,7 @@ var getFolderInfo = function(path, file_type) {
                 'disabled'
               );
               // set selected folder name in breadcrums
-              $('.file_manager #uploader h1').hide();
               $('.file_manager #uploader .show_selected_file').remove();
-              $('<span class="show_selected_file">'+path+'</span>').appendTo(
-                '.file_manager #uploader .filemanager-path-group'
-              );
             }

             if (
@@ -1200,11 +1138,7 @@ var getFolderInfo = function(path, file_type) {
                 'disabled'
               );
               // set selected folder name in breadcrums
-              $('.file_manager #uploader h1').hide();
               $('.file_manager #uploader .show_selected_file').remove();
-              $('<span class="show_selected_file">' + path + '</span>').appendTo(
-                '.file_manager #uploader .filemanager-path-group'
-              );
             }
             if (
               config.options.dialog_type == 'create_file' &&


^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error
  2016-07-06 09:42 [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-06 12:10 ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  2016-07-06 13:32   ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-07 12:50     ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-11 13:11       ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  2016-07-12 06:10         ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-13 11:45           ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  2016-07-13 13:50             ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
@ 2016-07-13 13:53               ` Surinder Kumar <[email protected]>
  2016-07-13 13:58                 ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  0 siblings, 1 reply; 12+ messages in thread

From: Surinder Kumar @ 2016-07-13 13:53 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: Marc Linster <[email protected]>; pgadmin-hackers

I forgot to merge the fix for issue "File Browser - File does not exist
error" in the patch.
Please ignore this patch.

On Wed, Jul 13, 2016 at 7:20 PM, Surinder Kumar <
[email protected]> wrote:

> Please find updated patch with following changes/enhancements:
>
>    1. Double click on file/folder icon or name will navigate to the
>    folder/file.
>    2. Selected file/folder can be renamed by Rename button only. Double
>    click rename is removed.
>    3. Filename text box will not hide on smaller screen. Setting minimum
>    width of File Browser fixed it.
>    4. Path at top will only show directory name, not the file name and it
>    is greyed out.
>
> *Issue not fixed:*
> Icons and fonts of Query tool and File Browser looks blurred in Runtime
> environment.
> I tried debugging it. while debugging, It gets fixed on my ubuntu runtime.
> but I don't know how it gets fixed without changing css styles. It needs
> more time to debug.
>
> Please review.
>
> On Wed, Jul 13, 2016 at 5:15 PM, Dave Page <[email protected]> wrote:
>
>> On Tue, Jul 12, 2016 at 7:10 AM, Surinder Kumar
>> <[email protected]> wrote:
>> > On Mon, Jul 11, 2016 at 6:41 PM, Dave Page <[email protected]> wrote:
>> >>
>> >> On Thu, Jul 7, 2016 at 1:50 PM, Surinder Kumar
>> >> <[email protected]> wrote:
>> >> > On Wed, Jul 6, 2016 at 7:02 PM, Surinder Kumar
>> >> > <[email protected]> wrote:
>> >> >>
>> >> >> On Wed, Jul 6, 2016 at 5:40 PM, Dave Page <[email protected]>
>> wrote:
>> >> >>>
>> >> >>> Hi,
>> >> >>>
>> >> >>> I think we need more changes than just that;
>> >> >>>
>> >> >>> - The path at the top should not be editable (it should be greyed
>> in
>> >> >>> fact)
>> >> >>
>> >> >> Ok
>> >> >>>
>> >> >>>
>> >> >>> - The path at the top should only show the directory path. The
>> >> >>> filename should never be appended.
>> >> >>
>> >> >> Ok
>> >> >>>
>> >> >>>
>> >> >>> - The CSS needs to be fixed so the filename textbox at the bottom
>> is
>> >> >>> never hidden (as it is now if the dialogue opens at a small size).
>> >> >>
>> >> >> Ok
>> >> >>>
>> >> >>>
>> >> >>> - Double-click to navigate vs. rename should be modified to work in
>> >> >>> part like it does on Mac - Double-click on either the icon or the
>> name
>> >> >>> should open the item (browser into a folder, or select and "OK" on
>> a
>> >> >>> file), and Click then Enter should rename. I'm hesitant to try to
>> >> >>> implement "slow double click to rename" as that would likely need
>> to
>> >> >>> be tunable for accessibility reasons.
>> >> >>
>> >> >> Ok, I will fix it.
>> >> >
>> >> > In the current scenario, the Enter Key is bound to the OK button by
>> >> > default
>> >> > in Alertify dialog which servers the purpose of closing the dialog.
>> >> > Should we de-attach Enter Key event bound to OK button and use it for
>> >> > rename
>> >> > file?
>> >> > please suggest what should I do?
>> >>
>> >> Hmm, good point.
>> >>
>> >> How hard would it be to look for 2 consecutive single-clicks (but not
>> >> a double-click) for rename? If we can do that, it avoids timing
>> >> considerations for double-clicks (which would be defined by the OS).
>> >
>> >
>> > I tried to implement slow double click, here is Fiddle
>> > There are two events 1) double click (it will be used for folder
>> navigation)
>> > 2) Slow double click(For rename), It is a simple click event, when
>> clicked
>> > twice after delay we consider it a slow double click.
>> >
>> > But it is not working smoothly, double click and single click events are
>> > conflicting.
>>
>> Yeah, so I see.
>>
>> > Also, we have rename button in navigation for rename operation,
>> > Can we skip slow double click because it is very confusing?
>>
>> OK, I must have been having a brain failure moment or something. Yes,
>> skip it - we obviously don't need it with the rename button.
>>
>> So we have:
>>
>> - Click to select
>> - Double click to open a folder
>> - Button to rename the select file/folder
>>
>> Sorry!
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>


^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error
  2016-07-06 09:42 [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-06 12:10 ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  2016-07-06 13:32   ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-07 12:50     ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-11 13:11       ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  2016-07-12 06:10         ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-13 11:45           ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  2016-07-13 13:50             ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-13 13:53               ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
@ 2016-07-13 13:58                 ` Surinder Kumar <[email protected]>
  2016-07-15 09:52                   ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  0 siblings, 1 reply; 12+ messages in thread

From: Surinder Kumar @ 2016-07-13 13:58 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: Marc Linster <[email protected]>; pgadmin-hackers

Please find updated patch.
This patch also includes the fix for issue  "File Browser - File does not
exist error".

On Wed, Jul 13, 2016 at 7:23 PM, Surinder Kumar <
[email protected]> wrote:

> I forgot to merge the fix for issue "File Browser - File does not exist
> error" in the patch.
> Please ignore this patch.
>
> On Wed, Jul 13, 2016 at 7:20 PM, Surinder Kumar <
> [email protected]> wrote:
>
>> Please find updated patch with following changes/enhancements:
>>
>>    1. Double click on file/folder icon or name will navigate to the
>>    folder/file.
>>    2. Selected file/folder can be renamed by Rename button only. Double
>>    click rename is removed.
>>    3. Filename text box will not hide on smaller screen. Setting minimum
>>    width of File Browser fixed it.
>>    4. Path at top will only show directory name, not the file name and
>>    it is greyed out.
>>
>> *Issue not fixed:*
>> Icons and fonts of Query tool and File Browser looks blurred in Runtime
>> environment.
>> I tried debugging it. while debugging, It gets fixed on my ubuntu
>> runtime. but I don't know how it gets fixed without changing css styles. It
>> needs more time to debug.
>>
>> Please review.
>>
>> On Wed, Jul 13, 2016 at 5:15 PM, Dave Page <[email protected]> wrote:
>>
>>> On Tue, Jul 12, 2016 at 7:10 AM, Surinder Kumar
>>> <[email protected]> wrote:
>>> > On Mon, Jul 11, 2016 at 6:41 PM, Dave Page <[email protected]> wrote:
>>> >>
>>> >> On Thu, Jul 7, 2016 at 1:50 PM, Surinder Kumar
>>> >> <[email protected]> wrote:
>>> >> > On Wed, Jul 6, 2016 at 7:02 PM, Surinder Kumar
>>> >> > <[email protected]> wrote:
>>> >> >>
>>> >> >> On Wed, Jul 6, 2016 at 5:40 PM, Dave Page <[email protected]>
>>> wrote:
>>> >> >>>
>>> >> >>> Hi,
>>> >> >>>
>>> >> >>> I think we need more changes than just that;
>>> >> >>>
>>> >> >>> - The path at the top should not be editable (it should be greyed
>>> in
>>> >> >>> fact)
>>> >> >>
>>> >> >> Ok
>>> >> >>>
>>> >> >>>
>>> >> >>> - The path at the top should only show the directory path. The
>>> >> >>> filename should never be appended.
>>> >> >>
>>> >> >> Ok
>>> >> >>>
>>> >> >>>
>>> >> >>> - The CSS needs to be fixed so the filename textbox at the bottom
>>> is
>>> >> >>> never hidden (as it is now if the dialogue opens at a small size).
>>> >> >>
>>> >> >> Ok
>>> >> >>>
>>> >> >>>
>>> >> >>> - Double-click to navigate vs. rename should be modified to work
>>> in
>>> >> >>> part like it does on Mac - Double-click on either the icon or the
>>> name
>>> >> >>> should open the item (browser into a folder, or select and "OK"
>>> on a
>>> >> >>> file), and Click then Enter should rename. I'm hesitant to try to
>>> >> >>> implement "slow double click to rename" as that would likely need
>>> to
>>> >> >>> be tunable for accessibility reasons.
>>> >> >>
>>> >> >> Ok, I will fix it.
>>> >> >
>>> >> > In the current scenario, the Enter Key is bound to the OK button by
>>> >> > default
>>> >> > in Alertify dialog which servers the purpose of closing the dialog.
>>> >> > Should we de-attach Enter Key event bound to OK button and use it
>>> for
>>> >> > rename
>>> >> > file?
>>> >> > please suggest what should I do?
>>> >>
>>> >> Hmm, good point.
>>> >>
>>> >> How hard would it be to look for 2 consecutive single-clicks (but not
>>> >> a double-click) for rename? If we can do that, it avoids timing
>>> >> considerations for double-clicks (which would be defined by the OS).
>>> >
>>> >
>>> > I tried to implement slow double click, here is Fiddle
>>> > There are two events 1) double click (it will be used for folder
>>> navigation)
>>> > 2) Slow double click(For rename), It is a simple click event, when
>>> clicked
>>> > twice after delay we consider it a slow double click.
>>> >
>>> > But it is not working smoothly, double click and single click events
>>> are
>>> > conflicting.
>>>
>>> Yeah, so I see.
>>>
>>> > Also, we have rename button in navigation for rename operation,
>>> > Can we skip slow double click because it is very confusing?
>>>
>>> OK, I must have been having a brain failure moment or something. Yes,
>>> skip it - we obviously don't need it with the rename button.
>>>
>>> So we have:
>>>
>>> - Click to select
>>> - Double click to open a folder
>>> - Button to rename the select file/folder
>>>
>>> Sorry!
>>>
>>> --
>>> 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 ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [application/octet-stream] RM#1432_v3.patch (8.2K, 3-RM%231432_v3.patch)
  download | inline diff:
diff --git a/web/pgadmin/misc/file_manager/static/css/file_manager.css b/web/pgadmin/misc/file_manager/static/css/file_manager.css
index 0f188d8..ea502ac 100755
--- a/web/pgadmin/misc/file_manager/static/css/file_manager.css
+++ b/web/pgadmin/misc/file_manager/static/css/file_manager.css
@@ -24,11 +24,15 @@
   float: left;
   text-align: left;
   line-height:1.9em;
-  text-shadow:1px 1px 0px #ffffff;
+  max-width: 367px;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  color: #999;
 }

 #uploader h1 b {
   font-weight: normal;
+  color: #999;
 }

 .uploadresponse {
@@ -346,6 +350,7 @@ button.list span {
   -moz-border-radius: 5px;
   float: left;
   margin-right: 10px;
+  background: #EEE;
 }

 .file_manager #uploader .btn-group .btn[disabled] {
@@ -528,7 +533,9 @@ button.list span {
   -moz-border-radius: 3px;
   height: 22px;
   font-size: 13px;
+  font-weight: normal;
   display: inline;
+  width: 150px;
 }

 .allowed_file_types .change_file_types {
diff --git a/web/pgadmin/misc/file_manager/templates/file_manager/js/file_manager.js b/web/pgadmin/misc/file_manager/templates/file_manager/js/file_manager.js
index 7d6eb3b..9e8a080 100644
--- a/web/pgadmin/misc/file_manager/templates/file_manager/js/file_manager.js
+++ b/web/pgadmin/misc/file_manager/templates/file_manager/js/file_manager.js
@@ -94,6 +94,7 @@ define([
               $container.find('.storage_content').remove();
               $container.append("<div class='storage_content'></div>");
               renderStoragePanel(params);
+              this.elements.dialog.style.minWidth = '630px';
               this.show();
             },
             settings: {
@@ -203,6 +204,7 @@ define([
               $container.find('.storage_content').remove();
               $container.append("<div class='storage_content'></div>");
               renderStoragePanel(params);
+              this.elements.dialog.style.minWidth = '630px';
               this.show();
             },
             settings: {
@@ -314,6 +316,7 @@ define([
               $container.find('.storage_content').remove();
               $container.append("<div class='storage_content'></div>");
               renderStoragePanel(params);
+              this.elements.dialog.style.minWidth = '630px';
               this.show();
             },
             settings: {
@@ -425,6 +428,7 @@ define([
               $container.find('.storage_content').remove();
               $container.append("<div class='storage_content'></div>");
               renderStoragePanel(params);
+              this.elements.dialog.style.minWidth = '630px';
               this.show();
             },
             settings: {
diff --git a/web/pgadmin/misc/file_manager/templates/file_manager/js/utility.js b/web/pgadmin/misc/file_manager/templates/file_manager/js/utility.js
index 8e9c42e..baa71b1 100755
--- a/web/pgadmin/misc/file_manager/templates/file_manager/js/utility.js
+++ b/web/pgadmin/misc/file_manager/templates/file_manager/js/utility.js
@@ -195,7 +195,7 @@ var setUploader = function(path) {
   path = decodeURI(path);

   var display_string = path,
-      mypath = '';
+      file_path = '';

   // split path
   var split_path = display_string.split('/');
@@ -203,29 +203,17 @@ var setUploader = function(path) {

   // set empty path if it is windows
   if (config.options.platform_type === "win32" && config.options.show_volumes) {
-      mypath = "";
+      file_path = "";
   } else if (split_path.length === 0) {
-    mypath = $('<b>/</b>');
+    file_path = '/';
   } else {
-    mypath = $('<a class="breadcrumbs" href="#" data-path="/">/</a>');
+    file_path = '/';
   }
-  $(mypath).appendTo($('.storage_dialog #uploader h1'));

   Object.keys(split_path).forEach(function (i) {
-    if (i < split_path.length - 1) {
-      mypath = $(
-        '<a class="breadcrumbs" href="#" data-path="' +
-        display_string.replace(split_path[i+1], '') +
-        '">' + split_path[i] + '/</a>'
-      );
-      $(mypath).appendTo($('.storage_dialog #uploader h1'));
-    } else {
-      mypath = $('<b>' + split_path[i] + '/</b>');
-      $(mypath).appendTo(
-        $('.storage_dialog #uploader h1')
-      );
-    }
+    file_path += split_path[i] + '/';
   });
+  $('.storage_dialog #uploader h1').html(file_path);

   $('.currentpath').val(path);
   if ($('.storage_dialog #uploader h1 span').length === 0) {
@@ -908,28 +896,6 @@ var getFolderInfo = function(path, file_type) {
         }
       });

-      $('.fileinfo #contents li p').on('dblclick',function(e) {
-        e.stopPropagation();
-        var $this = $(this);
-        var orig_value = decodeURI($this.find('span').attr('title')),
-            newvalue = orig_value.substring(0, orig_value.indexOf('.'));
-
-        if (newvalue === '') {
-          newvalue = orig_value;
-        }
-
-        $this.find('input').toggle().val(newvalue).focus();
-        $this.find('span').toggle();
-
-        // Rename folder/file on pressing enter key
-        $('.file_manager').unbind().on('keyup', function(e) {
-          if (e.keyCode == 13) {
-            e.stopPropagation();
-            $this.find('input').trigger('blur');
-          }
-        });
-      });
-
       // Rename UI handling
       $('.fileinfo #contents li p').on('blur dblclick','input', function(e) {
         e.stopPropagation();
@@ -1008,30 +974,6 @@ var getFolderInfo = function(path, file_type) {
         }
       });

-      $('.fileinfo table#contents tr td p').on('dblclick', function(e) {
-        e.stopPropagation();
-        var $this = $(this),
-            orig_value = decodeURI(
-              $this.find('span').attr('title')
-            );
-
-        var newvalue = orig_value.substring(0, orig_value.lastIndexOf('.'));
-        if (orig_value.lastIndexOf('/') == orig_value.length - 1 || newvalue === '') {
-          newvalue = orig_value;
-        }
-
-        $this.find('input').toggle().val(newvalue).focus();
-        $this.find('span').toggle();
-
-        // Rename folder/file on pressing enter key
-        $('.file_manager').unbind().on('keyup', function(e) {
-          if (e.keyCode == 13) {
-            e.stopPropagation();
-            $this.find('input').trigger('blur');
-          }
-        });
-      });
-
       $('.fileinfo table#contents tr td p').on(
         'blur dblclick', 'input', function(e) {
         var old_name = decodeURI($(this).siblings('span').attr('title')),
@@ -1148,11 +1090,7 @@ var getFolderInfo = function(path, file_type) {
                 'disabled'
               );
               // set selected folder name in breadcrums
-              $('.file_manager #uploader h1').hide();
               $('.file_manager #uploader .show_selected_file').remove();
-              $('<span class="show_selected_file">'+path+'</span>').appendTo(
-                '.file_manager #uploader .filemanager-path-group'
-              );
             }

             if (
@@ -1200,11 +1138,7 @@ var getFolderInfo = function(path, file_type) {
                 'disabled'
               );
               // set selected folder name in breadcrums
-              $('.file_manager #uploader h1').hide();
               $('.file_manager #uploader .show_selected_file').remove();
-              $('<span class="show_selected_file">' + path + '</span>').appendTo(
-                '.file_manager #uploader .filemanager-path-group'
-              );
             }
             if (
               config.options.dialog_type == 'create_file' &&
diff --git a/web/pgadmin/tools/sqleditor/__init__.py b/web/pgadmin/tools/sqleditor/__init__.py
index c713fb5..92e4b17 100644
--- a/web/pgadmin/tools/sqleditor/__init__.py
+++ b/web/pgadmin/tools/sqleditor/__init__.py
@@ -1121,16 +1121,13 @@ def load_file():
     if request.data:
         file_data = json.loads(request.data.decode())

+    file_path = unquote(file_data['file_name'])
     # retrieve storage directory path
     storage_manager_path = get_storage_directory()
-    if storage_manager_path is None:
-        storage_manager_path = ""
+    if storage_manager_path:
+        # generate full path of file
+        file_path = os.path.join(storage_manager_path, file_path.lstrip('/'))

-    # generate full path of file
-    file_path = os.path.join(
-        storage_manager_path,
-        unquote(file_data['file_name'].lstrip('/'))
-    )
     file_data = None

     # check if file type is text or binary


^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error
  2016-07-06 09:42 [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-06 12:10 ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  2016-07-06 13:32   ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-07 12:50     ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-11 13:11       ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  2016-07-12 06:10         ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-13 11:45           ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  2016-07-13 13:50             ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-13 13:53               ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-13 13:58                 ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
@ 2016-07-15 09:52                   ` Dave Page <[email protected]>
  2016-07-15 09:56                     ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  0 siblings, 1 reply; 12+ messages in thread

From: Dave Page @ 2016-07-15 09:52 UTC (permalink / raw)
  To: Surinder Kumar <[email protected]>; +Cc: Marc Linster <[email protected]>; pgadmin-hackers

Thanks Surinder, patch applied.

I suspect the font rendering issue is related to others we've seen,
where the solution is to ensure the -webkit-transform CSS attribute is
set to none. Can you have a poke around with it please?

On Wed, Jul 13, 2016 at 2:58 PM, Surinder Kumar
<[email protected]> wrote:
> Please find updated patch.
> This patch also includes the fix for issue  "File Browser - File does not
> exist error".
>
> On Wed, Jul 13, 2016 at 7:23 PM, Surinder Kumar
> <[email protected]> wrote:
>>
>> I forgot to merge the fix for issue "File Browser - File does not exist
>> error" in the patch.
>> Please ignore this patch.
>>
>> On Wed, Jul 13, 2016 at 7:20 PM, Surinder Kumar
>> <[email protected]> wrote:
>>>
>>> Please find updated patch with following changes/enhancements:
>>>
>>> Double click on file/folder icon or name will navigate to the
>>> folder/file.
>>> Selected file/folder can be renamed by Rename button only. Double click
>>> rename is removed.
>>> Filename text box will not hide on smaller screen. Setting minimum width
>>> of File Browser fixed it.
>>> Path at top will only show directory name, not the file name and it is
>>> greyed out.
>>>
>>> Issue not fixed:
>>> Icons and fonts of Query tool and File Browser looks blurred in Runtime
>>> environment.
>>> I tried debugging it. while debugging, It gets fixed on my ubuntu
>>> runtime. but I don't know how it gets fixed without changing css styles. It
>>> needs more time to debug.
>>>
>>> Please review.
>>>
>>> On Wed, Jul 13, 2016 at 5:15 PM, Dave Page <[email protected]> wrote:
>>>>
>>>> On Tue, Jul 12, 2016 at 7:10 AM, Surinder Kumar
>>>> <[email protected]> wrote:
>>>> > On Mon, Jul 11, 2016 at 6:41 PM, Dave Page <[email protected]> wrote:
>>>> >>
>>>> >> On Thu, Jul 7, 2016 at 1:50 PM, Surinder Kumar
>>>> >> <[email protected]> wrote:
>>>> >> > On Wed, Jul 6, 2016 at 7:02 PM, Surinder Kumar
>>>> >> > <[email protected]> wrote:
>>>> >> >>
>>>> >> >> On Wed, Jul 6, 2016 at 5:40 PM, Dave Page <[email protected]>
>>>> >> >> wrote:
>>>> >> >>>
>>>> >> >>> Hi,
>>>> >> >>>
>>>> >> >>> I think we need more changes than just that;
>>>> >> >>>
>>>> >> >>> - The path at the top should not be editable (it should be greyed
>>>> >> >>> in
>>>> >> >>> fact)
>>>> >> >>
>>>> >> >> Ok
>>>> >> >>>
>>>> >> >>>
>>>> >> >>> - The path at the top should only show the directory path. The
>>>> >> >>> filename should never be appended.
>>>> >> >>
>>>> >> >> Ok
>>>> >> >>>
>>>> >> >>>
>>>> >> >>> - The CSS needs to be fixed so the filename textbox at the bottom
>>>> >> >>> is
>>>> >> >>> never hidden (as it is now if the dialogue opens at a small
>>>> >> >>> size).
>>>> >> >>
>>>> >> >> Ok
>>>> >> >>>
>>>> >> >>>
>>>> >> >>> - Double-click to navigate vs. rename should be modified to work
>>>> >> >>> in
>>>> >> >>> part like it does on Mac - Double-click on either the icon or the
>>>> >> >>> name
>>>> >> >>> should open the item (browser into a folder, or select and "OK"
>>>> >> >>> on a
>>>> >> >>> file), and Click then Enter should rename. I'm hesitant to try to
>>>> >> >>> implement "slow double click to rename" as that would likely need
>>>> >> >>> to
>>>> >> >>> be tunable for accessibility reasons.
>>>> >> >>
>>>> >> >> Ok, I will fix it.
>>>> >> >
>>>> >> > In the current scenario, the Enter Key is bound to the OK button by
>>>> >> > default
>>>> >> > in Alertify dialog which servers the purpose of closing the dialog.
>>>> >> > Should we de-attach Enter Key event bound to OK button and use it
>>>> >> > for
>>>> >> > rename
>>>> >> > file?
>>>> >> > please suggest what should I do?
>>>> >>
>>>> >> Hmm, good point.
>>>> >>
>>>> >> How hard would it be to look for 2 consecutive single-clicks (but not
>>>> >> a double-click) for rename? If we can do that, it avoids timing
>>>> >> considerations for double-clicks (which would be defined by the OS).
>>>> >
>>>> >
>>>> > I tried to implement slow double click, here is Fiddle
>>>> > There are two events 1) double click (it will be used for folder
>>>> > navigation)
>>>> > 2) Slow double click(For rename), It is a simple click event, when
>>>> > clicked
>>>> > twice after delay we consider it a slow double click.
>>>> >
>>>> > But it is not working smoothly, double click and single click events
>>>> > are
>>>> > conflicting.
>>>>
>>>> Yeah, so I see.
>>>>
>>>> > Also, we have rename button in navigation for rename operation,
>>>> > Can we skip slow double click because it is very confusing?
>>>>
>>>> OK, I must have been having a brain failure moment or something. Yes,
>>>> skip it - we obviously don't need it with the rename button.
>>>>
>>>> So we have:
>>>>
>>>> - Click to select
>>>> - Double click to open a folder
>>>> - Button to rename the select file/folder
>>>>
>>>> Sorry!
>>>>
>>>> --
>>>> Dave Page
>>>> Blog: http://pgsnake.blogspot.com
>>>> Twitter: @pgsnake
>>>>
>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>> The Enterprise PostgreSQL Company
>>>
>>>
>>
>



-- 
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 ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers



^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error
  2016-07-06 09:42 [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-06 12:10 ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  2016-07-06 13:32   ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-07 12:50     ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-11 13:11       ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  2016-07-12 06:10         ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-13 11:45           ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
  2016-07-13 13:50             ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-13 13:53               ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-13 13:58                 ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
  2016-07-15 09:52                   ` Re: [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Dave Page <[email protected]>
@ 2016-07-15 09:56                     ` Surinder Kumar <[email protected]>
  0 siblings, 0 replies; 12+ messages in thread

From: Surinder Kumar @ 2016-07-15 09:56 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: Marc Linster <[email protected]>; pgadmin-hackers

On Fri, Jul 15, 2016 at 3:22 PM, Dave Page <[email protected]> wrote:

> Thanks Surinder, patch applied.
>
> I suspect the font rendering issue is related to others we've seen,
> where the solution is to ensure the -webkit-transform CSS attribute is
> set to none. Can you have a poke around with it please?
>
Sure Dave. I will do.

>
> On Wed, Jul 13, 2016 at 2:58 PM, Surinder Kumar
> <[email protected]> wrote:
> > Please find updated patch.
> > This patch also includes the fix for issue  "File Browser - File does not
> > exist error".
> >
> > On Wed, Jul 13, 2016 at 7:23 PM, Surinder Kumar
> > <[email protected]> wrote:
> >>
> >> I forgot to merge the fix for issue "File Browser - File does not exist
> >> error" in the patch.
> >> Please ignore this patch.
> >>
> >> On Wed, Jul 13, 2016 at 7:20 PM, Surinder Kumar
> >> <[email protected]> wrote:
> >>>
> >>> Please find updated patch with following changes/enhancements:
> >>>
> >>> Double click on file/folder icon or name will navigate to the
> >>> folder/file.
> >>> Selected file/folder can be renamed by Rename button only. Double click
> >>> rename is removed.
> >>> Filename text box will not hide on smaller screen. Setting minimum
> width
> >>> of File Browser fixed it.
> >>> Path at top will only show directory name, not the file name and it is
> >>> greyed out.
> >>>
> >>> Issue not fixed:
> >>> Icons and fonts of Query tool and File Browser looks blurred in Runtime
> >>> environment.
> >>> I tried debugging it. while debugging, It gets fixed on my ubuntu
> >>> runtime. but I don't know how it gets fixed without changing css
> styles. It
> >>> needs more time to debug.
> >>>
> >>> Please review.
> >>>
> >>> On Wed, Jul 13, 2016 at 5:15 PM, Dave Page <[email protected]> wrote:
> >>>>
> >>>> On Tue, Jul 12, 2016 at 7:10 AM, Surinder Kumar
> >>>> <[email protected]> wrote:
> >>>> > On Mon, Jul 11, 2016 at 6:41 PM, Dave Page <[email protected]>
> wrote:
> >>>> >>
> >>>> >> On Thu, Jul 7, 2016 at 1:50 PM, Surinder Kumar
> >>>> >> <[email protected]> wrote:
> >>>> >> > On Wed, Jul 6, 2016 at 7:02 PM, Surinder Kumar
> >>>> >> > <[email protected]> wrote:
> >>>> >> >>
> >>>> >> >> On Wed, Jul 6, 2016 at 5:40 PM, Dave Page <[email protected]>
> >>>> >> >> wrote:
> >>>> >> >>>
> >>>> >> >>> Hi,
> >>>> >> >>>
> >>>> >> >>> I think we need more changes than just that;
> >>>> >> >>>
> >>>> >> >>> - The path at the top should not be editable (it should be
> greyed
> >>>> >> >>> in
> >>>> >> >>> fact)
> >>>> >> >>
> >>>> >> >> Ok
> >>>> >> >>>
> >>>> >> >>>
> >>>> >> >>> - The path at the top should only show the directory path. The
> >>>> >> >>> filename should never be appended.
> >>>> >> >>
> >>>> >> >> Ok
> >>>> >> >>>
> >>>> >> >>>
> >>>> >> >>> - The CSS needs to be fixed so the filename textbox at the
> bottom
> >>>> >> >>> is
> >>>> >> >>> never hidden (as it is now if the dialogue opens at a small
> >>>> >> >>> size).
> >>>> >> >>
> >>>> >> >> Ok
> >>>> >> >>>
> >>>> >> >>>
> >>>> >> >>> - Double-click to navigate vs. rename should be modified to
> work
> >>>> >> >>> in
> >>>> >> >>> part like it does on Mac - Double-click on either the icon or
> the
> >>>> >> >>> name
> >>>> >> >>> should open the item (browser into a folder, or select and "OK"
> >>>> >> >>> on a
> >>>> >> >>> file), and Click then Enter should rename. I'm hesitant to try
> to
> >>>> >> >>> implement "slow double click to rename" as that would likely
> need
> >>>> >> >>> to
> >>>> >> >>> be tunable for accessibility reasons.
> >>>> >> >>
> >>>> >> >> Ok, I will fix it.
> >>>> >> >
> >>>> >> > In the current scenario, the Enter Key is bound to the OK button
> by
> >>>> >> > default
> >>>> >> > in Alertify dialog which servers the purpose of closing the
> dialog.
> >>>> >> > Should we de-attach Enter Key event bound to OK button and use it
> >>>> >> > for
> >>>> >> > rename
> >>>> >> > file?
> >>>> >> > please suggest what should I do?
> >>>> >>
> >>>> >> Hmm, good point.
> >>>> >>
> >>>> >> How hard would it be to look for 2 consecutive single-clicks (but
> not
> >>>> >> a double-click) for rename? If we can do that, it avoids timing
> >>>> >> considerations for double-clicks (which would be defined by the
> OS).
> >>>> >
> >>>> >
> >>>> > I tried to implement slow double click, here is Fiddle
> >>>> > There are two events 1) double click (it will be used for folder
> >>>> > navigation)
> >>>> > 2) Slow double click(For rename), It is a simple click event, when
> >>>> > clicked
> >>>> > twice after delay we consider it a slow double click.
> >>>> >
> >>>> > But it is not working smoothly, double click and single click events
> >>>> > are
> >>>> > conflicting.
> >>>>
> >>>> Yeah, so I see.
> >>>>
> >>>> > Also, we have rename button in navigation for rename operation,
> >>>> > Can we skip slow double click because it is very confusing?
> >>>>
> >>>> OK, I must have been having a brain failure moment or something. Yes,
> >>>> skip it - we obviously don't need it with the rename button.
> >>>>
> >>>> So we have:
> >>>>
> >>>> - Click to select
> >>>> - Double click to open a folder
> >>>> - Button to rename the select file/folder
> >>>>
> >>>> Sorry!
> >>>>
> >>>> --
> >>>> Dave Page
> >>>> Blog: http://pgsnake.blogspot.com
> >>>> Twitter: @pgsnake
> >>>>
> >>>> EnterpriseDB UK: http://www.enterprisedb.com
> >>>> The Enterprise PostgreSQL Company
> >>>
> >>>
> >>
> >
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


^ permalink  raw  reply  [nested|flat] 12+ messages in thread


end of thread, other threads:[~2016-07-15 09:56 UTC | newest]

Thread overview: 12+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-07-06 09:42 [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error Surinder Kumar <[email protected]>
2016-07-06 12:10 ` Dave Page <[email protected]>
2016-07-06 13:32   ` Surinder Kumar <[email protected]>
2016-07-07 12:50     ` Surinder Kumar <[email protected]>
2016-07-11 13:11       ` Dave Page <[email protected]>
2016-07-12 06:10         ` Surinder Kumar <[email protected]>
2016-07-13 11:45           ` Dave Page <[email protected]>
2016-07-13 13:50             ` Surinder Kumar <[email protected]>
2016-07-13 13:53               ` Surinder Kumar <[email protected]>
2016-07-13 13:58                 ` Surinder Kumar <[email protected]>
2016-07-15 09:52                   ` Dave Page <[email protected]>
2016-07-15 09:56                     ` Surinder Kumar <[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