Changeset 4:6979313586cf in OKFNAnnotator (for Zope) for annotator_files/lib/notification.js


Ignore:
Timestamp:
Aug 27, 2012, 5:05:38 PM (12 years ago)
Author:
casties
Branch:
default
Message:

new version of annotator.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • annotator_files/lib/notification.js

    r3 r4  
     1// Generated by CoffeeScript 1.3.3
    12var Annotator,
    23  __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
    3   __hasProp = Object.prototype.hasOwnProperty,
    4   __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; };
     4  __hasProp = {}.hasOwnProperty,
     5  __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; };
    56
    67Annotator = Annotator || {};
     
    2627  function Notification(options) {
    2728    this.hide = __bind(this.hide, this);
    28     this.show = __bind(this.show, this);    Notification.__super__.constructor.call(this, $(this.options.html).appendTo(document.body)[0], options);
     29
     30    this.show = __bind(this.show, this);
     31    Notification.__super__.constructor.call(this, $(this.options.html).appendTo(document.body)[0], options);
    2932  }
    3033
    3134  Notification.prototype.show = function(message, status) {
    32     if (status == null) status = Annotator.Notification.INFO;
     35    if (status == null) {
     36      status = Annotator.Notification.INFO;
     37    }
    3338    $(this.element).addClass(this.options.classes.show).addClass(this.options.classes[status]).escape(message || "");
    3439    setTimeout(this.hide, 5000);
Note: See TracChangeset for help on using the changeset viewer.