From 96448d1b7b48820a10bd0fff0ba95de56117e7e8 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 5 Jul 2013 15:19:31 +0300 Subject: [PATCH] Fix shortcuts popup --- app/assets/javascripts/main.js.coffee | 8 ++++---- app/views/help/_shortcuts.html.haml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/main.js.coffee b/app/assets/javascripts/main.js.coffee index cb9678d..0e7e0a4 100644 --- a/app/assets/javascripts/main.js.coffee +++ b/app/assets/javascripts/main.js.coffee @@ -67,10 +67,6 @@ $ -> $('.appear-data').fadeIn() e.preventDefault() - $('body').keydown (e) -> - if e.which is 191 - new Shortcuts() - # Initialize chosen selects $('select.chosen').chosen() @@ -114,6 +110,10 @@ $ -> when 115 $("#search").focus() e.preventDefault() + when 63 + new Shortcuts() + e.preventDefault() + # Commit show suppressed diff $(".supp_diff_link").bind "click", -> diff --git a/app/views/help/_shortcuts.html.haml b/app/views/help/_shortcuts.html.haml index 7cbe5fc..793cb45 100644 --- a/app/views/help/_shortcuts.html.haml +++ b/app/views/help/_shortcuts.html.haml @@ -1,6 +1,6 @@ #modal-shortcuts.modal.hide .modal-header - %a.close{href: "#"} × + %a.close{href: "#", "data-dismiss" => "modal"} × %h3 Keyboard Shortcuts .modal-body %h5 Global Shortcuts -- libgit2 0.21.2