mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-19 01:26:08 +10:00
Adds t as a shortcut for find file anywhere
This commit is contained in:
@@ -87,7 +87,6 @@ class Dispatcher
|
||||
new GroupAvatar()
|
||||
when 'projects:tree:show'
|
||||
new TreeView()
|
||||
shortcut_handler = new ShortcutsTree()
|
||||
when 'projects:find_file:show'
|
||||
shortcut_handler = true
|
||||
when 'projects:blob:show'
|
||||
|
||||
@@ -4,6 +4,7 @@ class @Shortcuts
|
||||
Mousetrap.reset()
|
||||
Mousetrap.bind('?', @selectiveHelp)
|
||||
Mousetrap.bind('s', Shortcuts.focusSearch)
|
||||
Mousetrap.bind('t', -> Turbolinks.visit(findFileURL)) if findFileURL?
|
||||
|
||||
selectiveHelp: (e) =>
|
||||
Shortcuts.showHelp(e, @enabledHelp)
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
class @ShortcutsTree extends ShortcutsNavigation
|
||||
constructor: ->
|
||||
super()
|
||||
Mousetrap.bind('t', -> ShortcutsTree.findAndFollowLink('.shortcuts-find-file'))
|
||||
@@ -37,3 +37,6 @@
|
||||
%h1.title= title
|
||||
|
||||
= render 'shared/outdated_browser'
|
||||
-if defined?(@project)
|
||||
:javascript
|
||||
var findFileURL = '#{namespace_project_find_file_path(@project.namespace, @project, @ref)}';
|
||||
Reference in New Issue
Block a user