Use meta key to open todo in new tab
This commit is contained in:
parent
fb02c96747
commit
f9014e4ec6
1 changed files with 7 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue