From 0d41fd76d3be37903ee405e03cc7bd2e444c7e91 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 9 Nov 2014 20:31:29 +0300 Subject: [PATCH] notify fixes --- css/tt-rss.css | 10 +++++----- js/functions.js | 29 +++++++++++++++++++---------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/css/tt-rss.css b/css/tt-rss.css index ca0284a6..48f02f92 100644 --- a/css/tt-rss.css +++ b/css/tt-rss.css @@ -148,11 +148,6 @@ a:hover { -webkit-transform: translate(0, -35px); -o-transform: translate(0, -35px); -moz-transform: translate(0, -35px); - - transition: all 0.5s ease-in-out; - -webkit-transition: all 0.5s ease-in-out; - -moz-transition: all 0.5s ease-in-out; - -o-transition: all 0.5s ease-in-out; } #notify { @@ -167,6 +162,11 @@ a:hover { z-index : 99; padding : 5px; box-shadow : 0px -2px 2px rgba(0,0,0,0.1); + + transition: all 0.5s ease-in-out; + -webkit-transition: all 0.5s ease-in-out; + -moz-transition: all 0.5s ease-in-out; + -o-transition: all 0.5s ease-in-out; } #notify img { diff --git a/js/functions.js b/js/functions.js index 720a5654..98a53185 100644 --- a/js/functions.js +++ b/js/functions.js @@ -212,30 +212,39 @@ function notify_real(msg, no_hide, n_type) { msg = " " + __(msg) + ""; if (n_type == 2) { - n.className = "notify notify_progress visible"; msg = "" + msg; no_hide = true; } else if (n_type == 3) { - n.className = "notify notify_error visible"; msg = "" + msg; } else if (n_type == 4) { - n.className = "notify notify_info visible"; msg = "" + msg; - } else { - n.className = "notify visible"; } msg += " "; -// msg = " " + msg; - n.innerHTML = msg; - if (!no_hide) { - notify_hide_timerid = window.setTimeout(function() { + window.setTimeout(function() { + // goddamnit firefox + if (n_type == 2) { + n.className = "notify notify_progress visible"; + } else if (n_type == 3) { + n.className = "notify notify_error visible"; + msg = "" + msg; + } else if (n_type == 4) { + n.className = "notify notify_info visible"; + } else { + n.className = "notify visible"; + } + + if (!no_hide) { + notify_hide_timerid = window.setTimeout(function() { n.removeClassName("visible") }, 5*1000); - } + } + + }, 10); + } function notify(msg, no_hide) { -- 2.39.5