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

Showing the changes to assets/javascripts (2 of 2 files). Show all

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 @@
1notif = (title, html) ->1notif = (title, html) ->
2 html = html.replace /<a/g, '<a class="_notif-link"'2 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>"""
4 4
5textNotif = (title, message) ->5textNotif = (title, message) ->
6 notif title, """<p class="_notif-text">#{message}"""6 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
48 return48 return
49 49
50 onClick: (event) =>50 onClick: (event) =>
51 unless event.target.tagName is 'A'51 if event.target.tagName isnt 'A' or event.target.classList.contains('_notif-close')
52 $.stopEvent(event)52 $.stopEvent(event)
53 @hide()53 @hide()
54 return54 return