summaryrefslogtreecommitdiff
path: root/functions.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-05-19 06:44:23 +0100
committerAndrew Dolgov <[email protected]>2006-05-19 06:44:23 +0100
commit0655a1d5967a167c9c016380d0149da37d255acc (patch)
tree0bc43c4491d6e507ecdbef8d278e6ab4629a25aa /functions.js
parent6b9bf6c2f6ff2fa899528c1e211c4c664d4bc2c7 (diff)
notify w/blank message now fades existing notify out
Diffstat (limited to 'functions.js')
-rw-r--r--functions.js21
1 files changed, 12 insertions, 9 deletions
diff --git a/functions.js b/functions.js
index 817946c39..ee26d0a92 100644
--- a/functions.js
+++ b/functions.js
@@ -85,7 +85,7 @@ function hide_notify() {
var n = notify_last_doc.getElementById("notify");
if (browser_has_opacity()) {
if (notify_opacity >= 0) {
- notify_opacity = notify_opacity - 0.2;
+ notify_opacity = notify_opacity - 0.1;
n.style.opacity = notify_opacity;
notify_hide_timerid = window.setTimeout("hide_notify()", 20);
} else {
@@ -105,8 +105,18 @@ function notify_real(msg, doc, no_hide, is_err) {
if (!n || !nb) return;
+ if (notify_hide_timerid) {
+ window.clearTimeout(notify_hide_timerid);
+ }
+
+ notify_last_doc = doc;
+ notify_opacity = 1;
+
if (msg == "") {
- n.style.display = "none";
+ if (n.style.display == "block") {
+ notify_hide_timerid = window.setTimeout("hide_notify()", 0);
+ }
+ return;
} else {
n.style.display = "block";
}
@@ -123,13 +133,6 @@ function notify_real(msg, doc, no_hide, is_err) {
nb.innerHTML = msg;
- if (notify_hide_timerid) {
- window.clearTimeout(notify_hide_timerid);
- }
-
- notify_last_doc = doc;
- notify_opacity = 1;
-
if (!no_hide) {
notify_hide_timerid = window.setTimeout("hide_notify()", 3000);
}