Commit bdd41a19 authored by csillag's avatar csillag

Update Annotator to 6b6cb4ba (from typed-packaging branch)

parent 187281e7
......@@ -53,9 +53,10 @@ class Annotator.Notification extends Delegator
#
# Returns itself.
show: (message, status=Annotator.Notification.INFO) =>
@currentStatus = status
$(@element)
.addClass(@options.classes.show)
.addClass(@options.classes[status])
.addClass(@options.classes[@currentStatus])
.html(Util.escape(message || ""))
setTimeout this.hide, 5000
......@@ -70,7 +71,10 @@ class Annotator.Notification extends Delegator
#
# Returns itself.
hide: =>
$(@element).removeClass(@options.classes.show)
@currentStatus ?= Annotator.Notification.INFO
$(@element)
.removeClass(@options.classes.show)
.removeClass(@options.classes[@currentStatus])
this
# Constants for controlling the display of the notification. Each constant
......
// Generated by CoffeeScript 1.6.3
/*
** Annotator 1.2.6-dev-af15c86
** Annotator 1.2.6-dev-6b6cb4b
** https://github.com/okfn/annotator/
**
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE
**
** Built at: 2014-04-14 22:36:40Z
** Built at: 2014-05-08 11:26:20Z
*/
......@@ -2330,13 +2330,17 @@
if (status == null) {
status = Annotator.Notification.INFO;
}
$(this.element).addClass(this.options.classes.show).addClass(this.options.classes[status]).html(Util.escape(message || ""));
this.currentStatus = status;
$(this.element).addClass(this.options.classes.show).addClass(this.options.classes[this.currentStatus]).html(Util.escape(message || ""));
setTimeout(this.hide, 5000);
return this;
};
Notification.prototype.hide = function() {
$(this.element).removeClass(this.options.classes.show);
if (this.currentStatus == null) {
this.currentStatus = Annotator.Notification.INFO;
}
$(this.element).removeClass(this.options.classes.show).removeClass(this.options.classes[this.currentStatus]);
return this;
};
......
This diff is collapsed.
Markdown is supported
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