Showing the changes to assets/javascripts (4 of 7 files). Show all
Unified · Split
| @@ -1,5 +1,5 @@ | |||
| 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}<a href="#" class="_notif-close"></a>""" | 3 | """<h5 class="_notif-title">#{title}</h5>#{html}<a href="#" class="_notif-close"></a>""" |
| 4 | 4 | ||
| 5 | textNotif = (title, message) -> | 5 | textNotif = (title, message) -> |
| @@ -4,7 +4,7 @@ class app.views.News extends app.views.Notif · 3 unmodified lines | |||
| 4 | @className += ' _notif-news' | 4 | @className += ' _notif-news' |
| 5 | 5 | ||
| 6 | @defautOptions: | 6 | @defautOptions: |
| 7 | autoHide: null | 7 | autoHide: 30000 |
| 8 | 8 | ||
| 9 | init: -> | 9 | init: -> |
| 10 | @unreadNews = @getUnreadNews() | 10 | @unreadNews = @getUnreadNews() |
| @@ -48,6 +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 | return if event.which isnt 1 | ||
| 51 | if event.target.tagName isnt 'A' or event.target.classList.contains('_notif-close') | 52 | if event.target.tagName isnt 'A' or event.target.classList.contains('_notif-close') |
| 52 | $.stopEvent(event) | 53 | $.stopEvent(event) |
| 53 | @hide() | 54 | @hide() |
| @@ -3,6 +3,9 @@ · 2 unmodified lines | |||
| 3 | class app.views.Updates extends app.views.Notif | 3 | class app.views.Updates extends app.views.Notif |
| 4 | @className += ' _notif-news' | 4 | @className += ' _notif-news' |
| 5 | 5 | ||
| 6 | @defautOptions: | ||
| 7 | autoHide: 30000 | ||
| 8 | |||
| 6 | init: -> | 9 | init: -> |
| 7 | @updatedDocs = @getUpdatedDocs() | 10 | @updatedDocs = @getUpdatedDocs() |
| 8 | @show() if @updatedDocs.length | 11 | @show() if @updatedDocs.length |