History

_notif-close element is now an anchor instead of div

Now closing a notification can be done with keyboard navigation and extensions like Vimium

Philip Karpiak committed 10 years ago

Commit 097b3281 parent deb91d82 files · +2 −2Browse files

Unified · Split

2 files
  1. assets/javascripts/templates/notif_tmpl.coffee +1 −1
  2. assets/javascripts/views/misc/notif.coffee +1 −1
assets/javascripts/templates/notif_tmpl.coffee+1−1
@@ -1,6 +1,6 @@
11 notif = (title, html) ->
22 html = html.replace /<a/g, '<a class="_notif-link"'
3− """<h5 class="_notif-title">#{title}</h5>#{html}<div class="_notif-close"></div>"""
3+ """<h5 class="_notif-title">#{title}</h5>#{html}<a href="#" class="_notif-close"></a>"""
44
55 textNotif = (title, message) ->
66 notif title, """<p class="_notif-text">#{message}"""
assets/javascripts/views/misc/notif.coffee+1−1
@@ -48,7 +48,7 @@ class app.views.Notif extends app.View · 47 unmodified lines
4848 return
4949
5050 onClick: (event) =>
51− unless event.target.tagName is 'A'
51+ if event.target.tagName isnt 'A' or event.target.classList.contains('_notif-close')
5252 $.stopEvent(event)
5353 @hide()
5454 return