Commit 4dcdd7ab authored by csillag's avatar csillag

Update Annotator

... to b8c75146 (typed-packaging branch)

Fixes the shortlink problem with the Document plugin for #1760.

(Also brings in some dead code removal)
parent 44c4fe91
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-9e0eff3 ** Annotator 1.2.6-dev-b8c7514
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-09-25 22:40:55Z ** Built at: 2014-12-15 12:18:02Z
*/ */
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
var _ref, var _ref,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__hasProp = {}.hasOwnProperty, __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; }; __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; },
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
Annotator.Plugin.Document = (function(_super) { Annotator.Plugin.Document = (function(_super) {
var $; var $;
...@@ -176,7 +177,7 @@ ...@@ -176,7 +177,7 @@
}; };
Document.prototype._getLinks = function() { Document.prototype._getLinks = function() {
var doi, href, id, l, link, name, rel, type, url, values, _i, _j, _k, _len, _len1, _len2, _ref1, _ref2, _ref3, _results; var doi, dropTypes, href, id, l, link, name, rel, relTypes, type, url, values, _i, _j, _k, _len, _len1, _len2, _ref1, _ref2, _ref3, _results;
this.metadata.link = [ this.metadata.link = [
{ {
href: document.location.href href: document.location.href
...@@ -189,7 +190,9 @@ ...@@ -189,7 +190,9 @@
href = this._absoluteUrl(l.prop('href')); href = this._absoluteUrl(l.prop('href'));
rel = l.prop('rel'); rel = l.prop('rel');
type = l.prop('type'); type = l.prop('type');
if ((rel === "alternate" || rel === "canonical" || rel === "bookmark") && (type !== "application/rss+xml" && type !== "application/atom+xml")) { relTypes = ["alternate", "canonical", "bookmark", "shortlink"];
dropTypes = ["application/rss+xml", "application/atom+xml"];
if (__indexOf.call(relTypes, rel) >= 0 && __indexOf.call(dropTypes, type) < 0) {
this.metadata.link.push({ this.metadata.link.push({
href: href, href: href,
rel: rel, rel: rel,
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-6623b2c ** Annotator 1.2.6-dev-b8c7514
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-12-11 01:33:32Z ** Built at: 2014-12-15 12:17:59Z
*/ */
...@@ -930,13 +930,6 @@ ...@@ -930,13 +930,6 @@
throw "Operation not implemented."; throw "Operation not implemented.";
}; };
Highlight.prototype.setActive = function(value, batch) {
if (batch == null) {
batch = false;
}
throw "Operation not implemented.";
};
Highlight.prototype.setFocused = function(value, batch) { Highlight.prototype.setFocused = function(value, batch) {
if (batch == null) { if (batch == null) {
batch = false; batch = false;
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-95b7a09 ** Annotator 1.2.6-dev-b8c7514
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-12-03 11:41:09Z ** Built at: 2014-12-15 12:18:04Z
*/ */
...@@ -113,14 +113,6 @@ ...@@ -113,14 +113,6 @@
} }
}; };
TextHighlight.prototype.setActive = function(value) {
if (value) {
return this.$(this._highlights).addClass('annotator-hl-active');
} else {
return this.$(this._highlights).removeClass('annotator-hl-active');
}
};
TextHighlight.prototype.setFocused = function(value) { TextHighlight.prototype.setFocused = function(value) {
if (value) { if (value) {
return this.$(this._highlights).addClass('annotator-hl-focused'); return this.$(this._highlights).addClass('annotator-hl-focused');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment