public inbox for [email protected]  
help / color / mirror / Atom feed
[pgAdmin][RM4206]: Grant wizard does not close when we press ESC key
4+ messages / 2 participants
[nested] [flat]

* [pgAdmin][RM4206]: Grant wizard does not close when we press ESC key
@ 2020-04-06 08:50 Pradip Parkale <[email protected]>
  2020-04-06 09:56 ` Re: [pgAdmin][RM4206]: Grant wizard does not close when we press ESC key Akshay Joshi <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: Pradip Parkale @ 2020-04-06 08:50 UTC (permalink / raw)
  To: pgadmin-hackers

Hi Hackers,

Please find the attached patch to close the Grant Wizard when the ESC key
is pressed.

-- 
Thanks & Regards,
Pradip Parkale
QMG, EnterpriseDB Corporation


Attachments:

  [application/octet-stream] RM4206.patch (1.1K, 3-RM4206.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/static/js/wizard.js b/web/pgadmin/browser/static/js/wizard.js
index 3068572d1..c696c8046 100644
--- a/web/pgadmin/browser/static/js/wizard.js
+++ b/web/pgadmin/browser/static/js/wizard.js
@@ -292,6 +292,9 @@ define([
         } else if(event.target.tagName == 'TEXTAREA'){
           $(firstWizardFooterBtn).focus();
         }
+      } else if (event.keyCode === 27){
+        //close the wizard when esc key is pressed
+        $(wizardHeader).find('button.ajs-close').click();
       }
     },
     enableDisableNext: function(disable) {
diff --git a/web/pgadmin/static/js/utils.js b/web/pgadmin/static/js/utils.js
index 86dae698e..2ddae874d 100644
--- a/web/pgadmin/static/js/utils.js
+++ b/web/pgadmin/static/js/utils.js
@@ -38,7 +38,8 @@ export function findAndSetFocus(container) {
           .pgadmin-controls:first input:enabled,
           .pgadmin-controls:first .btn:not(.toggle),
           .ajs-commands:first,
-          .CodeMirror-scroll`)
+          .CodeMirror-scroll,
+          .wizard-header`)
         .find('*[tabindex]:not([tabindex="-1"])');
     }
 


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

* Re: [pgAdmin][RM4206]: Grant wizard does not close when we press ESC key
  2020-04-06 08:50 [pgAdmin][RM4206]: Grant wizard does not close when we press ESC key Pradip Parkale <[email protected]>
@ 2020-04-06 09:56 ` Akshay Joshi <[email protected]>
  2020-04-07 08:11   ` Re: [pgAdmin][RM4206]: Grant wizard does not close when we press ESC key Pradip Parkale <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: Akshay Joshi @ 2020-04-06 09:56 UTC (permalink / raw)
  To: Pradip Parkale <[email protected]>; +Cc: pgadmin-hackers

Hi Pradip

Patch not working, please check one more time.

On Mon, Apr 6, 2020 at 2:20 PM Pradip Parkale <
[email protected]> wrote:

> Hi Hackers,
>
> Please find the attached patch to close the Grant Wizard when the ESC key
> is pressed.
>
> --
> Thanks & Regards,
> Pradip Parkale
> QMG, EnterpriseDB Corporation
>


-- 
*Thanks & Regards*
*Akshay Joshi*

*Sr. Software Architect*
*EnterpriseDB Software India Private Limited*
*Mobile: +91 976-788-8246*


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

* Re: [pgAdmin][RM4206]: Grant wizard does not close when we press ESC key
  2020-04-06 08:50 [pgAdmin][RM4206]: Grant wizard does not close when we press ESC key Pradip Parkale <[email protected]>
  2020-04-06 09:56 ` Re: [pgAdmin][RM4206]: Grant wizard does not close when we press ESC key Akshay Joshi <[email protected]>
@ 2020-04-07 08:11   ` Pradip Parkale <[email protected]>
  2020-04-07 08:25     ` Re: [pgAdmin][RM4206]: Grant wizard does not close when we press ESC key Akshay Joshi <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: Pradip Parkale @ 2020-04-07 08:11 UTC (permalink / raw)
  To: Akshay Joshi <[email protected]>; +Cc: pgadmin-hackers

Hi Akshay,
Please find the updated patch.

On Mon, Apr 6, 2020 at 3:26 PM Akshay Joshi <[email protected]>
wrote:

> Hi Pradip
>
> Patch not working, please check one more time.
>
> On Mon, Apr 6, 2020 at 2:20 PM Pradip Parkale <
> [email protected]> wrote:
>
>> Hi Hackers,
>>
>> Please find the attached patch to close the Grant Wizard when the ESC key
>> is pressed.
>>
>> --
>> Thanks & Regards,
>> Pradip Parkale
>> QMG, EnterpriseDB Corporation
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
>
> *Sr. Software Architect*
> *EnterpriseDB Software India Private Limited*
> *Mobile: +91 976-788-8246*
>


-- 
Thanks & Regards,
Pradip Parkale
QMG, EnterpriseDB Corporation


Attachments:

  [application/octet-stream] RM4206_v2.patch (2.7K, 3-RM4206_v2.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/static/js/wizard.js b/web/pgadmin/browser/static/js/wizard.js
index 3068572d1..080ae56f2 100644
--- a/web/pgadmin/browser/static/js/wizard.js
+++ b/web/pgadmin/browser/static/js/wizard.js
@@ -184,11 +184,10 @@ define([
 
       /* OnLoad Callback */
       this.onLoad();
-
       setTimeout(function() {
         var container = $(self.el);
         commonUtils.findAndSetFocus(container);
-      }, 100);
+      }, 500);
 
       return this;
     },
@@ -292,6 +291,9 @@ define([
         } else if(event.target.tagName == 'TEXTAREA'){
           $(firstWizardFooterBtn).focus();
         }
+      } else if (event.keyCode === 27){
+        //close the wizard when esc key is pressed
+        $(wizardHeader).find('button.ajs-close').click();
       }
     },
     enableDisableNext: function(disable) {
diff --git a/web/pgadmin/static/js/utils.js b/web/pgadmin/static/js/utils.js
index 86dae698e..3fde1678f 100644
--- a/web/pgadmin/static/js/utils.js
+++ b/web/pgadmin/static/js/utils.js
@@ -38,10 +38,10 @@ export function findAndSetFocus(container) {
           .pgadmin-controls:first input:enabled,
           .pgadmin-controls:first .btn:not(.toggle),
           .ajs-commands:first,
-          .CodeMirror-scroll`)
-        .find('*[tabindex]:not([tabindex="-1"])');
+          .CodeMirror-scroll,
+          .pgadmin-wizard`)
+        .find('*[tabindex]:not([tabindex="-1"]),input:enabled');
     }
-
     if(first_el.length > 0) {
       first_el[0].focus();
     } else {
diff --git a/web/pgadmin/static/vendor/backgrid/backgrid-select-all.js b/web/pgadmin/static/vendor/backgrid/backgrid-select-all.js
index 4e0c5c48b..8cc11698b 100644
--- a/web/pgadmin/static/vendor/backgrid/backgrid-select-all.js
+++ b/web/pgadmin/static/vendor/backgrid/backgrid-select-all.js
@@ -95,10 +95,6 @@
     onKeydown: function (e) {
       var command = new Backgrid.Command(e);
       if (command.passThru()) return true; // skip ahead to `change`
-      if (command.cancel()) {
-        e.stopPropagation();
-        this.checkbox().blur();
-      }
       else if (command.save() || command.moveLeft() || command.moveRight() ||
                command.moveUp() || command.moveDown()) {
 
diff --git a/web/pgadmin/tools/grant_wizard/static/js/grant_wizard.js b/web/pgadmin/tools/grant_wizard/static/js/grant_wizard.js
index 6c581288b..cae2f7c3f 100644
--- a/web/pgadmin/tools/grant_wizard/static/js/grant_wizard.js
+++ b/web/pgadmin/tools/grant_wizard/static/js/grant_wizard.js
@@ -428,11 +428,6 @@ define([
               });
 
             },
-            hooks: {
-              onshow: function() {
-                commonUtils.findAndSetFocus($(this.elements.body));
-              },
-            },
 
             prepare: function() {
               var that = this;


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

* Re: [pgAdmin][RM4206]: Grant wizard does not close when we press ESC key
  2020-04-06 08:50 [pgAdmin][RM4206]: Grant wizard does not close when we press ESC key Pradip Parkale <[email protected]>
  2020-04-06 09:56 ` Re: [pgAdmin][RM4206]: Grant wizard does not close when we press ESC key Akshay Joshi <[email protected]>
  2020-04-07 08:11   ` Re: [pgAdmin][RM4206]: Grant wizard does not close when we press ESC key Pradip Parkale <[email protected]>
@ 2020-04-07 08:25     ` Akshay Joshi <[email protected]>
  0 siblings, 0 replies; 4+ messages in thread

From: Akshay Joshi @ 2020-04-07 08:25 UTC (permalink / raw)
  To: Pradip Parkale <[email protected]>; +Cc: pgadmin-hackers

Thanks, patch applied.

On Tue, Apr 7, 2020 at 1:42 PM Pradip Parkale <
[email protected]> wrote:

> Hi Akshay,
> Please find the updated patch.
>
> On Mon, Apr 6, 2020 at 3:26 PM Akshay Joshi <[email protected]>
> wrote:
>
>> Hi Pradip
>>
>> Patch not working, please check one more time.
>>
>> On Mon, Apr 6, 2020 at 2:20 PM Pradip Parkale <
>> [email protected]> wrote:
>>
>>> Hi Hackers,
>>>
>>> Please find the attached patch to close the Grant Wizard when the ESC
>>> key is pressed.
>>>
>>> --
>>> Thanks & Regards,
>>> Pradip Parkale
>>> QMG, EnterpriseDB Corporation
>>>
>>
>>
>> --
>> *Thanks & Regards*
>> *Akshay Joshi*
>>
>> *Sr. Software Architect*
>> *EnterpriseDB Software India Private Limited*
>> *Mobile: +91 976-788-8246*
>>
>
>
> --
> Thanks & Regards,
> Pradip Parkale
> QMG, EnterpriseDB Corporation
>


-- 
*Thanks & Regards*
*Akshay Joshi*

*Sr. Software Architect*
*EnterpriseDB Software India Private Limited*
*Mobile: +91 976-788-8246*


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


end of thread, other threads:[~2020-04-07 08:25 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-04-06 08:50 [pgAdmin][RM4206]: Grant wizard does not close when we press ESC key Pradip Parkale <[email protected]>
2020-04-06 09:56 ` Akshay Joshi <[email protected]>
2020-04-07 08:11   ` Pradip Parkale <[email protected]>
2020-04-07 08:25     ` Akshay Joshi <[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