2015-04-26 12:48:37 +05:30
|
|
|
#= require shortcuts
|
|
|
|
|
|
|
|
class @ShortcutsDashboardNavigation extends Shortcuts
|
|
|
|
constructor: ->
|
|
|
|
super()
|
2016-06-16 23:09:34 +05:30
|
|
|
Mousetrap.bind('g a', -> ShortcutsDashboardNavigation.findAndFollowLink('.dashboard-shortcuts-activity'))
|
|
|
|
Mousetrap.bind('g i', -> ShortcutsDashboardNavigation.findAndFollowLink('.dashboard-shortcuts-issues'))
|
|
|
|
Mousetrap.bind('g m', -> ShortcutsDashboardNavigation.findAndFollowLink('.dashboard-shortcuts-merge_requests'))
|
|
|
|
Mousetrap.bind('g p', -> ShortcutsDashboardNavigation.findAndFollowLink('.dashboard-shortcuts-projects'))
|
2015-04-26 12:48:37 +05:30
|
|
|
|
|
|
|
@findAndFollowLink: (selector) ->
|
|
|
|
link = $(selector).attr('href')
|
|
|
|
if link
|
|
|
|
window.location = link
|