mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-19 17:46:07 +10:00
Merge branch 'feature/shortcuts' of /home/git/repositories/gitlab/gitlabhq into 6-0-dev
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
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
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#modal-shortcuts.modal.hide
|
||||
.modal-header
|
||||
%a.close{href: "#"} ×
|
||||
%h3 Keyboard Shortcuts
|
||||
.modal-body
|
||||
%h5 Global Shortcuts
|
||||
%p
|
||||
%span.label.label-inverse s
|
||||
–
|
||||
Focus Search
|
||||
%p
|
||||
%span.label.label-inverse ?
|
||||
–
|
||||
Show this dialog
|
||||
@@ -0,0 +1,3 @@
|
||||
: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
|
||||
|
||||
Reference in New Issue
Block a user