Commit e0f3b66c authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Review changes

parent 359ec427
......@@ -6,9 +6,9 @@
initSearch: ->
projectsListFilter = $('.projects-list-filter')
projectsListFilter.on 'keyup', (e) =>
clearTimeout(@timer) if @timer
@timer = setTimeout(ProjectsList.filterResults, 500) if projectsListFilter.val() isnt ''
debounceFilter = _.debounce ProjectsList.filterResults, 500
projectsListFilter.on 'keyup', (e) ->
debounceFilter() if projectsListFilter.val() isnt ''
filterResults: ->
$('.projects-list-holder').fadeTo(250, 0.5)
......
......@@ -2,10 +2,10 @@ class @Shortcuts
constructor: (skipResetBindings) ->
@enabledHelp = []
Mousetrap.reset() if not skipResetBindings
Mousetrap.bind('?', @onToggleHelp)
Mousetrap.bind('s', Shortcuts.focusSearch)
Mousetrap.bind 'f', @focusFilter
Mousetrap.bind(['ctrl+shift+p', 'command+shift+p'], @toggleMarkdownPreview)
Mousetrap.bind '?', @onToggleHelp
Mousetrap.bind 's', Shortcuts.focusSearch
Mousetrap.bind 'f', (e) => @focusFilter e
Mousetrap.bind ['ctrl+shift+p', 'command+shift+p'], @toggleMarkdownPreview
Mousetrap.bind('t', -> Turbolinks.visit(findFileURL)) if findFileURL?
onToggleHelp: (e) =>
......@@ -34,7 +34,8 @@ class @Shortcuts
)
focusFilter: (e) ->
$('input[type=search]', '.nav-controls .block-controls').focus()
@filterInput ?= $('input[type=search]', '.nav-controls')
@filterInput.focus()
e.preventDefault()
@focusSearch: (e) ->
......
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