BigW Consortium Gitlab

Commit ef9298fe by Dmitriy Zaporozhets

Merge branch 'feature/shortcuts' of /home/git/repositories/gitlab/gitlabhq into 6-0-dev

parents 0f84833c 6e550af1
......@@ -67,6 +67,9 @@ $ ->
$('.appear-data').fadeIn()
e.preventDefault()
$('body').keydown (e) ->
if e.which is 191
new Shortcuts()
# Initialize chosen selects
$('select.chosen').chosen()
......
class Shortcuts
constructor: ->
if $('#modal-shortcuts').length > 0
$('#modal-shortcuts').modal('show')
else
$.ajax(
url: '/help/shortcuts',
dataType: "script"
)
@Shortcuts = Shortcuts
......@@ -12,4 +12,7 @@ class HelpController < ApplicationController
not_found!
end
end
def shortcuts
end
end
#modal-shortcuts.modal.hide
.modal-header
%a.close{href: "#"} ×
%h3 Keyboard Shortcuts
.modal-body
%h5 Global Shortcuts
%p
%span.label.label-inverse s
&ndash;
Focus Search
%p
%span.label.label-inverse ?
&ndash;
Show this dialog
:plain
$("body").append("#{escape_javascript(render('shortcuts'))}");
$("#modal-shortcuts").modal();
......@@ -38,4 +38,3 @@
%li
= link_to current_user, class: "profile-pic", id: 'profile-pic' do
= image_tag gravatar_icon(current_user.email, 26)
......@@ -38,6 +38,7 @@ Gitlab::Application.routes.draw do
get 'help/system_hooks' => 'help#system_hooks'
get 'help/web_hooks' => 'help#web_hooks'
get 'help/workflow' => 'help#workflow'
get 'help/shortcuts'
#
# Global snippets
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment