Changeset 4:6979313586cf in OKFNAnnotator (for Zope) for annotator_files/lib/notification.js
- Timestamp:
- Aug 27, 2012, 5:05:38 PM (12 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
annotator_files/lib/notification.js
r3 r4 1 // Generated by CoffeeScript 1.3.3 1 2 var Annotator, 2 3 __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; }; 5 6 6 7 Annotator = Annotator || {}; … … 26 27 function Notification(options) { 27 28 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); 29 32 } 30 33 31 34 Notification.prototype.show = function(message, status) { 32 if (status == null) status = Annotator.Notification.INFO; 35 if (status == null) { 36 status = Annotator.Notification.INFO; 37 } 33 38 $(this.element).addClass(this.options.classes.show).addClass(this.options.classes[status]).escape(message || ""); 34 39 setTimeout(this.hide, 5000);
Note: See TracChangeset
for help on using the changeset viewer.