Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
6e550af1
Commit
6e550af1
authored
Jun 30, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show shotcut dialog on ?
parent
0f84833c
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
1 deletion
+35
-1
app/assets/javascripts/main.js.coffee
app/assets/javascripts/main.js.coffee
+3
-0
app/assets/javascripts/shortcuts.js.coffee
app/assets/javascripts/shortcuts.js.coffee
+11
-0
app/controllers/help_controller.rb
app/controllers/help_controller.rb
+3
-0
app/views/help/_shortcuts.html.haml
app/views/help/_shortcuts.html.haml
+14
-0
app/views/help/shortcuts.js.haml
app/views/help/shortcuts.js.haml
+3
-0
app/views/layouts/_head_panel.html.haml
app/views/layouts/_head_panel.html.haml
+0
-1
config/routes.rb
config/routes.rb
+1
-0
No files found.
app/assets/javascripts/main.js.coffee
View file @
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
()
...
...
app/assets/javascripts/shortcuts.js.coffee
0 → 100644
View file @
6e550af1
class
Shortcuts
constructor
:
->
if
$
(
'#modal-shortcuts'
).
length
>
0
$
(
'#modal-shortcuts'
).
modal
(
'show'
)
else
$
.
ajax
(
url
:
'/help/shortcuts'
,
dataType
:
"script"
)
@
Shortcuts
=
Shortcuts
app/controllers/help_controller.rb
View file @
6e550af1
...
...
@@ -12,4 +12,7 @@ class HelpController < ApplicationController
not_found!
end
end
def
shortcuts
end
end
app/views/help/_shortcuts.html.haml
0 → 100644
View file @
6e550af1
#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
app/views/help/shortcuts.js.haml
0 → 100644
View file @
6e550af1
:plain
$("body").append("
#{
escape_javascript
(
render
(
'shortcuts'
))
}
");
$("#modal-shortcuts").modal();
app/views/layouts/_head_panel.html.haml
View file @
6e550af1
...
...
@@ -38,4 +38,3 @@
%li
=
link_to
current_user
,
class:
"profile-pic"
,
id:
'profile-pic'
do
=
image_tag
gravatar_icon
(
current_user
.
email
,
26
)
config/routes.rb
View file @
6e550af1
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment