Changeset 4:6979313586cf in OKFNAnnotator (for Zope) for annotator_files/lib/viewer.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/viewer.js

    r3 r4  
     1// Generated by CoffeeScript 1.3.3
    12var LinkParser,
    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.Viewer = (function(_super) {
     
    2930  function Viewer(options) {
    3031    this.onDeleteClick = __bind(this.onDeleteClick, this);
     32
    3133    this.onEditClick = __bind(this.onEditClick, this);
     34
    3235    this.load = __bind(this.load, this);
     36
    3337    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);
    3541    this.item = $(this.html.item)[0];
    3642    this.fields = [];
     
    6167
    6268  Viewer.prototype.load = function(annotations) {
    63     var annotation, controller, controls, del, edit, element, field, item, link, links, list, _i, _j, _len, _len2, _ref, _ref2;
     69    var annotation, controller, controls, del, edit, element, field, item, link, links, list, _i, _j, _len, _len1, _ref, _ref1;
    6470    this.annotations = annotations || [];
    6571    list = this.element.find('ul:first').empty();
     
    99105        };
    100106      }
    101       _ref2 = this.fields;
    102       for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) {
    103         field = _ref2[_j];
     107      _ref1 = this.fields;
     108      for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
     109        field = _ref1[_j];
    104110        element = $(field.element).clone().appendTo(item)[0];
    105111        field.load(element, annotation, controller);
     
    147153  LinkParser.prototype.get = function(rel, cond) {
    148154    var d, k, keys, match, v, _i, _len, _ref, _results;
    149     if (cond == null) cond = {};
     155    if (cond == null) {
     156      cond = {};
     157    }
    150158    cond = $.extend({}, cond, {
    151159      rel: rel
Note: See TracChangeset for help on using the changeset viewer.