Unified · Split
| @@ -1,5 +1,5 @@ | ||
| 1 | 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 | 3 | """<h5 class="_notif-title">#{title}</h5>#{html}<a href="#" class="_notif-close"></a>""" |
| 4 | 4 | |
| 5 | 5 | textNotif = (title, message) -> |
| @@ -4,7 +4,7 @@ class app.views.News extends app.views.Notif · 3 unmodified lines | ||
| 4 | 4 | @className += ' _notif-news' |
| 5 | 5 | |
| 6 | 6 | @defautOptions: |
| 7 | − autoHide: null | |
| 7 | + autoHide: 30000 | |
| 8 | 8 | |
| 9 | 9 | init: -> |
| 10 | 10 | @unreadNews = @getUnreadNews() |
| @@ -48,6 +48,7 @@ class app.views.Notif extends app.View · 47 unmodified lines | ||
| 48 | 48 | return |
| 49 | 49 | |
| 50 | 50 | onClick: (event) => |
| 51 | + return if event.which isnt 1 | |
| 51 | 52 | if event.target.tagName isnt 'A' or event.target.classList.contains('_notif-close') |
| 52 | 53 | $.stopEvent(event) |
| 53 | 54 | @hide() |
| @@ -3,6 +3,9 @@ · 2 unmodified lines | ||
| 3 | 3 | class app.views.Updates extends app.views.Notif |
| 4 | 4 | @className += ' _notif-news' |
| 5 | 5 | |
| 6 | + @defautOptions: | |
| 7 | + autoHide: 30000 | |
| 8 | + | |
| 6 | 9 | init: -> |
| 7 | 10 | @updatedDocs = @getUpdatedDocs() |
| 8 | 11 | @show() if @updatedDocs.length |
| @@ -29,13 +29,14 @@ · 28 unmodified lines | ||
| 29 | 29 | |
| 30 | 30 | ._notif-info { |
| 31 | 31 | float: right; |
| 32 | − color: $textColorLight; | |
| 32 | + color: $notifColorLight; | |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | ._notif-link, |
| 36 | 36 | ._notif-link:hover { |
| 37 | 37 | color: inherit; |
| 38 | 38 | text-decoration: underline; |
| 39 | + cursor: pointer; | |
| 39 | 40 | } |
| 40 | 41 | |
| 41 | 42 | ._notif-close { |
| @@ -114,6 +115,7 @@ · 72 unmodified lines | ||
| 114 | 115 | } |
| 115 | 116 | |
| 116 | 117 | ._notif-list { |
| 118 | + margin: 0; | |
| 117 | 119 | padding-left: 1rem; |
| 118 | 120 | } |
| 119 | 121 | |
| @@ -121,4 +123,6 @@ · 1 unmodified line | ||
| 121 | 123 | color: $textColor; |
| 122 | 124 | background: rgba($tipBackground, .95); |
| 123 | 125 | border: 1px solid $tipBorder; |
| 126 | + | |
| 127 | + ._notif-info { color: $textColorLight; } | |
| 124 | 128 | } |
| @@ -72,7 +72,7 @@ $labelBackground: #f4f4f4; · 71 unmodified lines | ||
| 72 | 72 | |
| 73 | 73 | $notifBackground: rgba(#333, .85); |
| 74 | 74 | $notifColor: #fff; |
| 75 | −$notifColorLight: #bbb; | |
| 75 | +$notifColorLight: #ccc; | |
| 76 | 76 | |
| 77 | 77 | $tipBackground: #fffdcd; |
| 78 | 78 | $tipBorder: #e7dca9; |
| @@ -72,7 +72,7 @@ $labelBackground: #3c3c3e; · 71 unmodified lines | ||
| 72 | 72 | |
| 73 | 73 | $notifBackground: rgba(#000, .85); |
| 74 | 74 | $notifColor: #fff; |
| 75 | −$notifColorLight: #bbb; | |
| 75 | +$notifColorLight: #ccc; | |
| 76 | 76 | |
| 77 | 77 | $tipBackground: #3d4449; |
| 78 | 78 | $tipBorder: #566166; |