public inbox for [email protected]  
help / color / mirror / Atom feed
[PgAdmin][RM5275] Accessibilty :Tab navigation is not working for table>> parameters.
2+ messages / 2 participants
[nested] [flat]

* [PgAdmin][RM5275] Accessibilty :Tab navigation is not working for table>> parameters.
@ 2020-04-03 15:45 Pradip Parkale <[email protected]>
  2020-04-06 07:47 ` Re: [PgAdmin][RM5275] Accessibilty :Tab navigation is not working for table>> parameters. Akshay Joshi <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Pradip Parkale @ 2020-04-03 15:45 UTC (permalink / raw)
  To: pgadmin-hackers

Hi Hackers,

Please find an attached patch for key navigation in Table >> Parameter. I
have added a key down event to handle the key navigation.


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


Attachments:

  [application/octet-stream] RM5275.patch (2.5K, 3-RM5275.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/static/js/schema.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/static/js/schema.js
index 23d02ca83..613941637 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/static/js/schema.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/static/js/schema.js
@@ -55,6 +55,23 @@ define('pgadmin.node.schema', [
           }
         }
       },
+      events : {
+        'keydown': 'keyDownHandler',
+      },
+
+      keyDownHandler : function(event){
+        // move the focus to editable input
+        let lastButton = $(this.$el).find('button:last');
+        let firstEditableCell = $(this.$el).find('td.editable:first');
+        if (event.keyCode== 9 && !event.shiftKey){
+          if ($(firstEditableCell).is(':visible')
+            && ($(event.target)).is($(lastButton))){
+            $(firstEditableCell).trigger('click');
+            event.preventDefault();
+            event.stopPropagation();
+          }
+        }
+      },
 
       render: function() {
         var self = this,
@@ -179,7 +196,6 @@ define('pgadmin.node.schema', [
     control: Backform.SwitchControl.extend({
       onChange: function() {
         Backform.SwitchControl.prototype.onChange.apply(this, arguments);
-
         let m = this.model;
         // If value of autovacuum_enabled is false and reloptions is null
         // then we should set the value of autovacuum_custom to false, as
diff --git a/web/pgadmin/browser/static/js/node.js b/web/pgadmin/browser/static/js/node.js
index 029a29817..d14dcc5bb 100644
--- a/web/pgadmin/browser/static/js/node.js
+++ b/web/pgadmin/browser/static/js/node.js
@@ -1537,6 +1537,17 @@ define('pgadmin.browser.node', [
                 view.$el.closest('.wcFloating').find('[tabindex]:not([tabindex="-1"]').first().focus();
                 return false;
               }
+              let btnGroup = $(panel.$container.find('.pg-prop-btn-group'));
+              let el = $(btnGroup).find('button:first');
+              if (panel.$container.find('td.editable:last').is(':visible')){
+                if (event.keyCode === 9 && event.shiftKey) {
+                  if ($(el).is($(event.target))){
+                    $(panel.$container.find('td.editable:last').trigger('click'));
+                    event.preventDefault();
+                    event.stopPropagation();
+                  }
+                }
+              }
             });
 
             setTimeout(function() {


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

* Re: [PgAdmin][RM5275] Accessibilty :Tab navigation is not working for table>> parameters.
  2020-04-03 15:45 [PgAdmin][RM5275] Accessibilty :Tab navigation is not working for table>> parameters. Pradip Parkale <[email protected]>
@ 2020-04-06 07:47 ` Akshay Joshi <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

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

Thanks, patch applied.

On Fri, Apr 3, 2020 at 9:15 PM Pradip Parkale <
[email protected]> wrote:

> Hi Hackers,
>
> Please find an attached patch for key navigation in Table >> Parameter. I
> have added a key down event to handle the key navigation.
>
>
> --
> 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] 2+ messages in thread


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

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-04-03 15:45 [PgAdmin][RM5275] Accessibilty :Tab navigation is not working for table>> parameters. Pradip Parkale <[email protected]>
2020-04-06 07:47 ` 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