summaryrefslogtreecommitdiffstats
path: root/extensions/BugModal
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/BugModal')
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/header.html.tmpl1
-rw-r--r--extensions/BugModal/web/bug_modal.js12
2 files changed, 13 insertions, 0 deletions
diff --git a/extensions/BugModal/template/en/default/bug_modal/header.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/header.html.tmpl
index 70c98641f..f362da540 100644
--- a/extensions/BugModal/template/en/default/bug_modal/header.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/header.html.tmpl
@@ -56,6 +56,7 @@
);
jquery.push(
"datetimepicker",
+ "hotkeys",
);
style_urls.push(
"extensions/BugModal/web/bug_modal.css",
diff --git a/extensions/BugModal/web/bug_modal.js b/extensions/BugModal/web/bug_modal.js
index f39e48575..1eb90f2df 100644
--- a/extensions/BugModal/web/bug_modal.js
+++ b/extensions/BugModal/web/bug_modal.js
@@ -713,6 +713,18 @@ $(function() {
}
})
.change();
+
+ // hotkeys
+ $('body').hotkey('e', function() {
+ if ($('#cancel-btn:visible').length == 0) {
+ $('#mode-btn').click();
+ }
+ } );
+ $('body').hotkey('escape', function() {
+ if ($('#cancel-btn:visible').length != 0) {
+ $('#cancel-btn').click();
+ }
+ } );
});
function confirmUnsafeURL(url) {