Commit 43b47b06 authored by Rafael Ostertag's avatar Rafael Ostertag
Browse files

Alert.js: improved timer handling and got rid of error messages

parent 231f8baa
......@@ -234,20 +234,16 @@ if (!QfqNS) {
/**
*
* @param event
*
* @private
*/
n.Alert.prototype.removeAlert = function (event) {
if (!event || event.type !== "click") {
// No user click, so it must be a timer event
if (this.timerId) {
window.clearTimeout(this.timerId);
this.timerId = null;
} else {
QfqNS.Log.error("Alert.remove(): Identified timer event, but had no timer id");
}
n.Alert.prototype.removeAlert = function () {
// In case we have an armed timer (or expired timer, for that matter), disarm it.
if (this.timerId) {
window.clearTimeout(this.timerId);
this.timerId = null;
}
var that = this;
this.$alertDiv.slideUp(this.fadeOutDuration, function () {
that.$alertDiv.remove();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment