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' @className += ' _notif-news'
@defautOptions: @defautOptions:
autoHide: null autoHide: 30000
init: -> init: ->
@unreadNews = @getUnreadNews() @unreadNews = @getUnreadNews()

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

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

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

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

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

Loading…
Cancel
Save