Now closing a notification can be done with keyboard navigation and extensions like Vimium
Showing the changes to assets/javascripts (2 of 2 files). Show all
Unified · Split
| @@ -1,6 +1,6 @@ | |||
| 1 | notif = (title, html) -> | 1 | notif = (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 | ||
| 5 | textNotif = (title, message) -> | 5 | textNotif = (title, message) -> |
| 6 | notif title, """<p class="_notif-text">#{message}""" | 6 | notif title, """<p class="_notif-text">#{message}""" |
| @@ -48,7 +48,7 @@ class app.views.Notif extends app.View · 47 unmodified lines | |||
| 48 | return | 48 | 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 | return | 54 | return |