2014-08-21 04:14:31 -04:00
|
|
|
#= require shortcuts
|
|
|
|
|
|
|
|
class @ShortcutsDashboardNavigation extends Shortcuts
|
|
|
|
constructor: ->
|
|
|
|
super()
|
2015-04-01 21:50:28 -04:00
|
|
|
Mousetrap.bind('g a', -> ShortcutsDashboardNavigation.findAndFollowLink('.shortcuts-activity'))
|
|
|
|
Mousetrap.bind('g i', -> ShortcutsDashboardNavigation.findAndFollowLink('.shortcuts-issues'))
|
|
|
|
Mousetrap.bind('g m', -> ShortcutsDashboardNavigation.findAndFollowLink('.shortcuts-merge_requests'))
|
|
|
|
Mousetrap.bind('g p', -> ShortcutsDashboardNavigation.findAndFollowLink('.shortcuts-projects'))
|
2014-08-21 04:14:31 -04:00
|
|
|
|
2015-04-01 21:50:28 -04:00
|
|
|
@findAndFollowLink: (selector) ->
|
2014-08-21 04:14:31 -04:00
|
|
|
link = $(selector).attr('href')
|
|
|
|
if link
|
|
|
|
window.location = link
|