Small improvements to notifications

pull/344/merge
Thibaut Courouble 9 years ago
parent 7aab65b247
commit 4c2a5565ed

@ -4,7 +4,7 @@ class app.views.News extends app.views.Notif
@className += ' _notif-news'
@defautOptions:
autoHide: null
autoHide: 30000
init: ->
@unreadNews = @getUnreadNews()

@ -48,6 +48,7 @@ class app.views.Notif extends app.View
return
onClick: (event) =>
return if event.which isnt 1
if event.target.tagName isnt 'A' or event.target.classList.contains('_notif-close')
$.stopEvent(event)
@hide()

@ -3,6 +3,9 @@
class app.views.Updates extends app.views.Notif
@className += ' _notif-news'
@defautOptions:
autoHide: 30000
init: ->
@updatedDocs = @getUpdatedDocs()
@show() if @updatedDocs.length

@ -29,13 +29,14 @@
._notif-info {
float: right;
color: $textColorLight;
color: $notifColorLight;
}
._notif-link,
._notif-link:hover {
color: inherit;
text-decoration: underline;
cursor: pointer;
}
._notif-close {
@ -114,6 +115,7 @@
}
._notif-list {
margin: 0;
padding-left: 1rem;
}
@ -121,4 +123,6 @@
color: $textColor;
background: rgba($tipBackground, .95);
border: 1px solid $tipBorder;
._notif-info { color: $textColorLight; }
}

@ -72,7 +72,7 @@ $labelBackground: #f4f4f4;
$notifBackground: rgba(#333, .85);
$notifColor: #fff;
$notifColorLight: #bbb;
$notifColorLight: #ccc;
$tipBackground: #fffdcd;
$tipBorder: #e7dca9;

@ -72,7 +72,7 @@ $labelBackground: #3c3c3e;
$notifBackground: rgba(#000, .85);
$notifColor: #fff;
$notifColorLight: #bbb;
$notifColorLight: #ccc;
$tipBackground: #3d4449;
$tipBorder: #566166;

Loading…
Cancel
Save