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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
34564296
Commit
34564296
authored
Jan 19, 2016
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds `t` as a shortcut for find file anywhere
parent
340df52b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
5 deletions
+4
-5
app/assets/javascripts/dispatcher.js.coffee
app/assets/javascripts/dispatcher.js.coffee
+0
-1
app/assets/javascripts/shortcuts.js.coffee
app/assets/javascripts/shortcuts.js.coffee
+1
-0
app/assets/javascripts/shortcuts_tree.coffee
app/assets/javascripts/shortcuts_tree.coffee
+0
-4
app/views/layouts/header/_default.html.haml
app/views/layouts/header/_default.html.haml
+3
-0
No files found.
app/assets/javascripts/dispatcher.js.coffee
View file @
34564296
...
@@ -87,7 +87,6 @@ class Dispatcher
...
@@ -87,7 +87,6 @@ class Dispatcher
new
GroupAvatar
()
new
GroupAvatar
()
when
'projects:tree:show'
when
'projects:tree:show'
new
TreeView
()
new
TreeView
()
shortcut_handler
=
new
ShortcutsTree
()
when
'projects:find_file:show'
when
'projects:find_file:show'
shortcut_handler
=
true
shortcut_handler
=
true
when
'projects:blob:show'
when
'projects:blob:show'
...
...
app/assets/javascripts/shortcuts.js.coffee
View file @
34564296
...
@@ -4,6 +4,7 @@ class @Shortcuts
...
@@ -4,6 +4,7 @@ class @Shortcuts
Mousetrap
.
reset
()
Mousetrap
.
reset
()
Mousetrap
.
bind
(
'?'
,
@
selectiveHelp
)
Mousetrap
.
bind
(
'?'
,
@
selectiveHelp
)
Mousetrap
.
bind
(
's'
,
Shortcuts
.
focusSearch
)
Mousetrap
.
bind
(
's'
,
Shortcuts
.
focusSearch
)
Mousetrap
.
bind
(
't'
,
->
Turbolinks
.
visit
(
findFileURL
))
if
findFileURL
?
selectiveHelp
:
(
e
)
=>
selectiveHelp
:
(
e
)
=>
Shortcuts
.
showHelp
(
e
,
@
enabledHelp
)
Shortcuts
.
showHelp
(
e
,
@
enabledHelp
)
...
...
app/assets/javascripts/shortcuts_tree.coffee
deleted
100644 → 0
View file @
340df52b
class
@
ShortcutsTree
extends
ShortcutsNavigation
constructor
:
->
super
()
Mousetrap
.
bind
(
't'
,
->
ShortcutsTree
.
findAndFollowLink
(
'.shortcuts-find-file'
))
app/views/layouts/header/_default.html.haml
View file @
34564296
...
@@ -37,3 +37,6 @@
...
@@ -37,3 +37,6 @@
%h1
.title
=
title
%h1
.title
=
title
=
render
'shared/outdated_browser'
=
render
'shared/outdated_browser'
-
if
defined?
(
@project
)
:javascript
var
findFileURL
=
'
#{
namespace_project_find_file_path
(
@project
.
namespace
,
@project
,
@ref
)
}
'
;
\ No newline at end of file
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