mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 20:25:57 +00:00
tweak notifications; use css animations for notifications
This commit is contained in:
@@ -182,11 +182,6 @@ function param_unescape(arg) {
|
||||
return unescape(arg);
|
||||
}
|
||||
|
||||
|
||||
function hide_notify() {
|
||||
Element.hide('notify');
|
||||
}
|
||||
|
||||
function notify_real(msg, no_hide, n_type) {
|
||||
|
||||
var n = $("notify");
|
||||
@@ -198,13 +193,11 @@ function notify_real(msg, no_hide, n_type) {
|
||||
}
|
||||
|
||||
if (msg == "") {
|
||||
if (Element.visible(n)) {
|
||||
notify_hide_timerid = window.setTimeout("hide_notify()", 0);
|
||||
if (n.hasClassName("visible")) {
|
||||
notify_hide_timerid = window.setTimeout(function() {
|
||||
n.removeClassName("visible") }, 0);
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
Element.show(n);
|
||||
new Effect.Highlight(n);
|
||||
}
|
||||
|
||||
/* types:
|
||||
@@ -218,18 +211,18 @@ function notify_real(msg, no_hide, n_type) {
|
||||
|
||||
msg = "<span class=\"msg\"> " + __(msg) + "</span>";
|
||||
|
||||
if (n_type == 1) {
|
||||
n.className = "notify";
|
||||
} else if (n_type == 2) {
|
||||
n.className = "notify progress";
|
||||
if (n_type == 2) {
|
||||
n.className = "notify notify_progress visible";
|
||||
msg = "<span><img src='images/indicator_white.gif'></span>" + msg;
|
||||
no_hide = true;
|
||||
} else if (n_type == 3) {
|
||||
n.className = "notify error";
|
||||
n.className = "notify notify_error visible";
|
||||
msg = "<span><img src='images/alert.png'></span>" + msg;
|
||||
} else if (n_type == 4) {
|
||||
n.className = "notify info";
|
||||
n.className = "notify notify_info visible";
|
||||
msg = "<span><img src='images/information.png'></span>" + msg;
|
||||
} else {
|
||||
n.className = "notify visible";
|
||||
}
|
||||
|
||||
msg += " <span><img src=\"images/cross.png\" class=\"close\" title=\"" +
|
||||
@@ -240,7 +233,8 @@ function notify_real(msg, no_hide, n_type) {
|
||||
n.innerHTML = msg;
|
||||
|
||||
if (!no_hide) {
|
||||
notify_hide_timerid = window.setTimeout("hide_notify()", 5*1000);
|
||||
notify_hide_timerid = window.setTimeout(function() {
|
||||
n.removeClassName("visible") }, 5*1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user