diff --git a/assets/javascripts/templates/notif_tmpl.coffee b/assets/javascripts/templates/notif_tmpl.coffee index 839b04d4..be6a68a4 100644 --- a/assets/javascripts/templates/notif_tmpl.coffee +++ b/assets/javascripts/templates/notif_tmpl.coffee @@ -1,5 +1,5 @@ notif = (title, html) -> - html = html.replace /#{title}#{html}""" textNotif = (title, message) -> diff --git a/assets/javascripts/views/misc/news.coffee b/assets/javascripts/views/misc/news.coffee index 4279ca81..a39fbb15 100644 --- a/assets/javascripts/views/misc/news.coffee +++ b/assets/javascripts/views/misc/news.coffee @@ -4,7 +4,7 @@ class app.views.News extends app.views.Notif @className += ' _notif-news' @defautOptions: - autoHide: null + autoHide: 30000 init: -> @unreadNews = @getUnreadNews() diff --git a/assets/javascripts/views/misc/notif.coffee b/assets/javascripts/views/misc/notif.coffee index 12dea496..93370e11 100644 --- a/assets/javascripts/views/misc/notif.coffee +++ b/assets/javascripts/views/misc/notif.coffee @@ -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() diff --git a/assets/javascripts/views/misc/updates.coffee b/assets/javascripts/views/misc/updates.coffee index 7e01ba0d..e9fc2771 100644 --- a/assets/javascripts/views/misc/updates.coffee +++ b/assets/javascripts/views/misc/updates.coffee @@ -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 diff --git a/assets/stylesheets/components/_notif.scss b/assets/stylesheets/components/_notif.scss index f745c9dd..7feb8cb6 100644 --- a/assets/stylesheets/components/_notif.scss +++ b/assets/stylesheets/components/_notif.scss @@ -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; } } diff --git a/assets/stylesheets/global/_variables.scss b/assets/stylesheets/global/_variables.scss index 60c47df2..5758fad1 100644 --- a/assets/stylesheets/global/_variables.scss +++ b/assets/stylesheets/global/_variables.scss @@ -72,7 +72,7 @@ $labelBackground: #f4f4f4; $notifBackground: rgba(#333, .85); $notifColor: #fff; -$notifColorLight: #bbb; +$notifColorLight: #ccc; $tipBackground: #fffdcd; $tipBorder: #e7dca9; diff --git a/assets/stylesheets/global/variables-dark.scss b/assets/stylesheets/global/variables-dark.scss index 55bb98cd..213ce75f 100644 --- a/assets/stylesheets/global/variables-dark.scss +++ b/assets/stylesheets/global/variables-dark.scss @@ -72,7 +72,7 @@ $labelBackground: #3c3c3e; $notifBackground: rgba(#000, .85); $notifColor: #fff; -$notifColorLight: #bbb; +$notifColorLight: #ccc; $tipBackground: #3d4449; $tipBorder: #566166;