Use meta key to open todo in new tab

This commit is contained in:
Annabel Dunstone 2016-04-08 09:46:32 -07:00
parent fb02c96747
commit f9014e4ec6

View file

@ -57,5 +57,10 @@ class @Todos
$('.todos-pending .badge, .todos-pending-count').text data.count
$('.todos-done .badge').text data.done_count
goToTodoUrl: ->
Turbolinks.visit($(this).data('url'))
goToTodoUrl: (e)->
todoLink = $(this).data('url')
if e.metaKey
e.preventDefault()
window.open(todoLink,'_blank')
else
Turbolinks.visit(todoLink)