Commit ef9298febbe5d84b641fcef4e4c9f8997e17a15a
Exists in
master
and in
4 other branches
Merge branch 'feature/shortcuts' of /home/git/repositories/gitlab/gitlabhq into 6-0-dev
Showing
7 changed files
with
35 additions
and
1 deletions
Show diff stats
app/assets/javascripts/main.js.coffee
@@ -67,6 +67,9 @@ $ -> | @@ -67,6 +67,9 @@ $ -> | ||
67 | $('.appear-data').fadeIn() | 67 | $('.appear-data').fadeIn() |
68 | e.preventDefault() | 68 | e.preventDefault() |
69 | 69 | ||
70 | + $('body').keydown (e) -> | ||
71 | + if e.which is 191 | ||
72 | + new Shortcuts() | ||
70 | 73 | ||
71 | # Initialize chosen selects | 74 | # Initialize chosen selects |
72 | $('select.chosen').chosen() | 75 | $('select.chosen').chosen() |
app/controllers/help_controller.rb
@@ -0,0 +1,14 @@ | @@ -0,0 +1,14 @@ | ||
1 | +#modal-shortcuts.modal.hide | ||
2 | + .modal-header | ||
3 | + %a.close{href: "#"} × | ||
4 | + %h3 Keyboard Shortcuts | ||
5 | + .modal-body | ||
6 | + %h5 Global Shortcuts | ||
7 | + %p | ||
8 | + %span.label.label-inverse s | ||
9 | + – | ||
10 | + Focus Search | ||
11 | + %p | ||
12 | + %span.label.label-inverse ? | ||
13 | + – | ||
14 | + Show this dialog |
app/views/layouts/_head_panel.html.haml
@@ -38,4 +38,3 @@ | @@ -38,4 +38,3 @@ | ||
38 | %li | 38 | %li |
39 | = link_to current_user, class: "profile-pic", id: 'profile-pic' do | 39 | = link_to current_user, class: "profile-pic", id: 'profile-pic' do |
40 | = image_tag gravatar_icon(current_user.email, 26) | 40 | = image_tag gravatar_icon(current_user.email, 26) |
41 | - |
config/routes.rb
@@ -38,6 +38,7 @@ Gitlab::Application.routes.draw do | @@ -38,6 +38,7 @@ Gitlab::Application.routes.draw do | ||
38 | get 'help/system_hooks' => 'help#system_hooks' | 38 | get 'help/system_hooks' => 'help#system_hooks' |
39 | get 'help/web_hooks' => 'help#web_hooks' | 39 | get 'help/web_hooks' => 'help#web_hooks' |
40 | get 'help/workflow' => 'help#workflow' | 40 | get 'help/workflow' => 'help#workflow' |
41 | + get 'help/shortcuts' | ||
41 | 42 | ||
42 | # | 43 | # |
43 | # Global snippets | 44 | # Global snippets |