[Kimchi-devel] [PATCH] [Wok] Issue #95: Accessibility

ghidasy at linux.vnet.ibm.com ghidasy at linux.vnet.ibm.com
Wed May 4 14:54:54 UTC 2016


From: Gabriel Hidasy Rezende <ghidasy at br.ibm.com>

Add event handlers for ESC and Enter at the Advanced Search
dialog box.
---
 ui/js/wok.user-log.js | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/ui/js/wok.user-log.js b/ui/js/wok.user-log.js
index 8c2b4a7..d5ffcc7 100644
--- a/ui/js/wok.user-log.js
+++ b/ui/js/wok.user-log.js
@@ -243,4 +243,13 @@ wok.initUserLogWindow = function() {
       });
       $('#form-advanced-search').submit();
   });
-};
\ No newline at end of file
+
+    $(document).on('keyup', function(e) {
+        if (e.which == 27) { //ESC
+            wok.window.close();
+        }
+        if (e.which == 13) { //Enter
+            $('#button-search').trigger('click');
+        }
+    });
+};
-- 
2.5.5




More information about the Kimchi-devel mailing list