diff annotator_files/lib/notification.js @ 4:6979313586cf

new version of annotator.
author casties
date Mon, 27 Aug 2012 19:05:38 +0200
parents 6356e78ccf5c
children
line wrap: on
line diff
--- a/annotator_files/lib/notification.js	Thu Apr 05 19:37:27 2012 +0200
+++ b/annotator_files/lib/notification.js	Mon Aug 27 19:05:38 2012 +0200
@@ -1,7 +1,8 @@
+// Generated by CoffeeScript 1.3.3
 var Annotator,
   __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
-  __hasProp = Object.prototype.hasOwnProperty,
-  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
 
 Annotator = Annotator || {};
 
@@ -25,11 +26,15 @@
 
   function Notification(options) {
     this.hide = __bind(this.hide, this);
-    this.show = __bind(this.show, this);    Notification.__super__.constructor.call(this, $(this.options.html).appendTo(document.body)[0], options);
+
+    this.show = __bind(this.show, this);
+    Notification.__super__.constructor.call(this, $(this.options.html).appendTo(document.body)[0], options);
   }
 
   Notification.prototype.show = function(message, status) {
-    if (status == null) status = Annotator.Notification.INFO;
+    if (status == null) {
+      status = Annotator.Notification.INFO;
+    }
     $(this.element).addClass(this.options.classes.show).addClass(this.options.classes[status]).escape(message || "");
     setTimeout(this.hide, 5000);
     return this;