1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-15 05:15:57 +00:00

notify system improvements

This commit is contained in:
Andrew Dolgov
2006-05-18 13:37:52 +01:00
parent 4d4200a87b
commit 0530ddd88b
2 changed files with 18 additions and 8 deletions

View File

@@ -93,7 +93,7 @@ function hide_notify() {
}
}
function notify_real(msg, doc, no_hide) {
function notify_real(msg, doc, no_hide, is_err) {
var n = doc.getElementById("notify");
var nb = doc.getElementById("notify_body");
@@ -106,6 +106,16 @@ function notify_real(msg, doc, no_hide) {
n.style.display = "block";
}
if (is_err) {
n.style.backgroundColor = "#ffaaaa";
n.style.color = "white";
n.style.borderColor = "#ff0000";
} else {
n.style.backgroundColor = "#fff7d5";
n.style.borderColor = "#d7c47a";
n.style.color = "black";
}
nb.innerHTML = msg;
if (notify_hide_timerid) {
@@ -120,12 +130,12 @@ function notify_real(msg, doc, no_hide) {
}
}
function p_notify(msg, no_hide) {
notify_real(msg, parent.document, no_hide);
function p_notify(msg, no_hide, is_err) {
notify_real(msg, parent.document, no_hide, is_err);
}
function notify(msg, no_hide) {
notify_real(msg, document, no_hide);
function notify(msg, no_hide, is_err) {
notify_real(msg, document, no_hide, is_err);
}
function printLockingError() {