Commit f9014e4e authored by Annabel Dunstone's avatar Annabel Dunstone

Use meta key to open todo in new tab

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