Changeset 4:6979313586cf in OKFNAnnotator (for Zope) for annotator_files/lib/viewer.js
- Timestamp:
- Aug 27, 2012, 5:05:38 PM (12 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
annotator_files/lib/viewer.js
r3 r4 1 // Generated by CoffeeScript 1.3.3 1 2 var LinkParser, 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.Viewer = (function(_super) { … … 29 30 function Viewer(options) { 30 31 this.onDeleteClick = __bind(this.onDeleteClick, this); 32 31 33 this.onEditClick = __bind(this.onEditClick, this); 34 32 35 this.load = __bind(this.load, this); 36 33 37 this.hide = __bind(this.hide, this); 34 this.show = __bind(this.show, this); Viewer.__super__.constructor.call(this, $(this.html.element)[0], options); 38 39 this.show = __bind(this.show, this); 40 Viewer.__super__.constructor.call(this, $(this.html.element)[0], options); 35 41 this.item = $(this.html.item)[0]; 36 42 this.fields = []; … … 61 67 62 68 Viewer.prototype.load = function(annotations) { 63 var annotation, controller, controls, del, edit, element, field, item, link, links, list, _i, _j, _len, _len 2, _ref, _ref2;69 var annotation, controller, controls, del, edit, element, field, item, link, links, list, _i, _j, _len, _len1, _ref, _ref1; 64 70 this.annotations = annotations || []; 65 71 list = this.element.find('ul:first').empty(); … … 99 105 }; 100 106 } 101 _ref 2= this.fields;102 for (_j = 0, _len 2 = _ref2.length; _j < _len2; _j++) {103 field = _ref 2[_j];107 _ref1 = this.fields; 108 for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { 109 field = _ref1[_j]; 104 110 element = $(field.element).clone().appendTo(item)[0]; 105 111 field.load(element, annotation, controller); … … 147 153 LinkParser.prototype.get = function(rel, cond) { 148 154 var d, k, keys, match, v, _i, _len, _ref, _results; 149 if (cond == null) cond = {}; 155 if (cond == null) { 156 cond = {}; 157 } 150 158 cond = $.extend({}, cond, { 151 159 rel: rel
Note: See TracChangeset
for help on using the changeset viewer.