diff options
author | Art4 <[email protected]> | 2015-02-19 23:17:43 +0100 |
---|---|---|
committer | Art4 <[email protected]> | 2015-02-19 23:17:43 +0100 |
commit | d9c042c4c536f1afbf206aeea09b0b127b7b6418 (patch) | |
tree | 9d7ef18c6d9d4c8f8f4d1c9a5dbfceeb9fd5acf4 /js/functions.js | |
parent | cf42b79120290ee5866136a0c4656e6999f06045 (diff) | |
parent | 4ca621a36016de1fbb5447e1c1de0b607ba94a7c (diff) |
Merge branch 'master' into patch-1
Conflicts:
locale/de_DE/LC_MESSAGES/messages.po
Diffstat (limited to 'js/functions.js')
-rw-r--r-- | js/functions.js | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/js/functions.js b/js/functions.js index 9915e6808..98a531851 100644 --- a/js/functions.js +++ b/js/functions.js @@ -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,30 +211,40 @@ 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) { msg = "<span><img src='images/indicator_white.gif'></span>" + msg; no_hide = true; } else if (n_type == 3) { - n.className = "notify error"; msg = "<span><img src='images/alert.png'></span>" + msg; } else if (n_type == 4) { - n.className = "notify info"; msg = "<span><img src='images/information.png'></span>" + msg; } msg += " <span><img src=\"images/cross.png\" class=\"close\" title=\"" + __("Click to close") + "\" onclick=\"notify('')\"></span>"; -// msg = "<img src='images/live_com_loading.gif'> " + msg; - n.innerHTML = msg; - if (!no_hide) { - notify_hide_timerid = window.setTimeout("hide_notify()", 5*1000); - } + 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 = "<span><img src='images/alert.png'></span>" + 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) { |