Please, add an appropriate commit message.
"Accessibility" does not mean what this patch does.
Isn't there a way to add those functions to the common dialog widget?
That way all dialog will have the accessibility keys enabled.
On 05/04/2016 11:54 AM, ghidasy(a)linux.vnet.ibm.com wrote:
From: Gabriel Hidasy Rezende <ghidasy(a)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');
+ }
+ });
+};