Commit 2faa71be authored by Ujvari Gergely's avatar Ujvari Gergely

Refresh annotator to 03c98690249e464318b2b9856d2559b73b8f3d18 in typed-packaging

parent 076e87d6
......@@ -40,6 +40,7 @@ class Annotator.Plugin.Document extends Annotator.Plugin
this._getPrism()
this._getTwitter()
this._getFavicon()
this._getDocOwners()
# extract out/normalize some things
this._getTitle()
......@@ -139,9 +140,18 @@ class Annotator.Plugin.Document extends Annotator.Plugin
for link in $("link")
if $(link).prop("rel") in ["shortcut icon", "icon"]
@metadata["favicon"] = this._absoluteUrl(link.href)
_getDocOwners: =>
@metadata.reply_to = []
for a in $("a")
if a.rel is 'reply-to'
if a.href.toLowerCase().slice(0,7) is "mailto:"
@metadata.reply_to.push a.href[7..]
else
@metadata.reply_to.push a.href
# hack to get a absolute url from a possibly relative one
_absoluteUrl: (url) ->
img = $("<img src='#{ url }'></img>")
url = img.prop('src')
......
......@@ -58,10 +58,9 @@ class window.PDFTextMapper extends window.PageTextMapperCore
# Must be a cross-page selection.
if data.start? and data.end?
startPage = @getPageForNode data.start
@_updateMap @pageInfo[startPage.index]
endPage = @getPageForNode data.end
for index in [ startPage.index .. endPage.index ]
#console.log "Should rescan page #" + index
@_updateMap @pageInfo[index]
@_updateMap @pageInfo[endPage.index]
$(PDFView.container).on 'scroll', => @_onScroll()
......
......@@ -176,7 +176,10 @@ class Annotator.Plugin.Store extends Annotator.Plugin
# Returns nothing.
annotationDeleted: (annotation) ->
if annotation in this.annotations
this._apiRequest 'destroy', annotation, (() => this.unregisterAnnotation(annotation))
if annotation._clientdeleteonly?
this.unregisterAnnotation annotation
else
this._apiRequest 'destroy', annotation, (() => this.unregisterAnnotation(annotation))
# Public: Registers an annotation with the Store. Used to check whether an
# annotation has already been created when using Store#annotationCreated().
......
// Generated by CoffeeScript 1.6.3
/*
** Annotator 1.2.6-dev-272fa6d
** Annotator 1.2.6-dev-5352913
** https://github.com/okfn/annotator/
**
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE
**
** Built at: 2013-11-14 10:14:18Z
** Built at: 2013-12-16 13:46:44Z
*/
......
// Generated by CoffeeScript 1.6.3
/*
** Annotator 1.2.6-dev-272fa6d
** Annotator 1.2.6-dev-3cbddbb
** https://github.com/okfn/annotator/
**
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE
**
** Built at: 2013-11-14 10:14:18Z
** Built at: 2014-02-17 14:21:09Z
*/
......@@ -29,6 +29,7 @@
__extends(Document, _super);
function Document() {
this._getDocOwners = __bind(this._getDocOwners, this);
this._getFavicon = __bind(this._getFavicon, this);
this._getLinks = __bind(this._getLinks, this);
this._getTitle = __bind(this._getTitle, this);
......@@ -103,6 +104,7 @@
this._getPrism();
this._getTwitter();
this._getFavicon();
this._getDocOwners();
this._getTitle();
this._getLinks();
return this.metadata;
......@@ -261,6 +263,26 @@
return _results;
};
Document.prototype._getDocOwners = function() {
var a, _i, _len, _ref1, _results;
this.metadata.reply_to = [];
_ref1 = $("a");
_results = [];
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
a = _ref1[_i];
if (a.rel === 'reply-to') {
if (a.href.toLowerCase().slice(0, 7) === "mailto:") {
_results.push(this.metadata.reply_to.push(a.href.slice(7)));
} else {
_results.push(this.metadata.reply_to.push(a.href));
}
} else {
_results.push(void 0);
}
}
return _results;
};
Document.prototype._absoluteUrl = function(url) {
var img;
img = $("<img src='" + url + "'></img>");
......
{"version":3,"file":"annotator.document.js","sources":["_preamble.coffee","_annotator_mapsrc/src/plugin/document.coffee"],"names":[],"mappings":";AAAA;;;;;;;;;;CAAA;CAAA;;;;;;;ACAA;CAAA,GAAA,EAAA;KAAA;;oSAAA;;CAAA,CAAM,IAAgB,GAAP;CAEb,OAAA;;CAAA;;;;;;;;;;;;;;;;;;;CAAA;;CAAA,EAAI,CAAJ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gBADF;CAAA;;CADF;MAAA,IAAA;CAAA;UADF;CAAA;uBAjCS;CAhGX,IAgGW;;CAhGX,EAuIa,MAAA,EAAb;CACE,SAAA,4BAAA;CAAA;CAAA;YAAA,gCAAA;0BAAA;CACE,EAAG,CAAA,CAAA,CAAH,EAAA,OAAG;CACD,EAAuB,CAAtB,IAAS,CAAA,GAAa;MADzB,IAAA;CAAA;UADF;CAAA;uBADW;CAvIb,IAuIa;;CAvIb,EA8Ic,MAAC,GAAf;CACE,EAAA,OAAA;CAAA,EAAA,GAAA,IAAM,EAAG;CAAT,EACA,CAAM,CAAA,CAAN;CADA,CAEgB,CAAb,CAAH,CAAA,CAAA;CACA,EAAA,UAAO;CAlJT,IA8Ic;;CA9Id;;CAFsC,QAAS;CAAjD"}
\ No newline at end of file
{"version":3,"file":"annotator.document.js","sources":["_preamble.coffee","_annotator_mapsrc/src/plugin/document.coffee"],"names":[],"mappings":";AAAA;;;;;;;;;;CAAA;CAAA;;;;;;;ACAA;CAAA,GAAA,EAAA;KAAA;;oSAAA;;CAAA,CAAM,IAAgB,GAAP;CAEb,OAAA;;CAAA;;;;;;;;;;;;;;;;;;;;CAAA;;CAAA,EAAI,CAAJ,KAAa;;CAAb,EAGE,GADF;CACE,CAA2B,IAA3B,mBAAA;CAHF,KAAA;;CAAA,EAKY,MAAA,CAAZ;CACO,GAAD,SAAJ,MAAA;CANF,IAKY;;CALZ,EAUA,MAAK;CACH,SAAA,gBAAA;CAAA,EAAA,CAAM,EAAN,EAAiC,UAA3B;CACN;CAAA,UAAA,iCAAA;0BAAA;CACE,EAAG,CAAA,CAAY,GAAf,GAAA;CACE,EAAA,CAAU,MAAV;UAFJ;CAAA,MADA;CAIA,EAAA,UAAO;CAfT,IAUK;;CAVL,EAmBM,CAAN,KAAM;CACJ,SAAA,6BAAA;CAAA,CAAA,CAAa,GAAb,IAAA;CACA;CAAA,UAAA,iCAAA;0BAAA;CACE,GAAgC,IAAhC;CAAA,EAAwB,CAAT,MAAf;U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ACD,GAAC,IAAQ,CAAT;MADF,MAAA;CAGE,GAAC,IAAQ;YAJb;MAAA,IAAA;CAAA;UADF;CAAA;uBAHa;CA7If,IA6Ie;;CA7If,EAwJc,MAAC,GAAf;CACE,EAAA,OAAA;CAAA,EAAA,GAAA,IAAM,EAAG;CAAT,EACA,CAAM,CAAA,CAAN;CADA,CAEgB,CAAb,CAAH,CAAA,CAAA;CACA,EAAA,UAAO;CA5JT,IAwJc;;CAxJd;;CAFsC,QAAS;CAAjD"}
\ No newline at end of file
// Generated by CoffeeScript 1.6.3
/*
** Annotator 1.2.6-dev-eabb32a
** Annotator 1.2.6-dev-3cbddbb
** https://github.com/okfn/annotator/
**
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE
**
** Built at: 2013-11-26 12:46:19Z
** Built at: 2014-02-17 13:39:52Z
*/
......
// Generated by CoffeeScript 1.6.3
/*
** Annotator 1.2.6-dev-fbfefb3
** Annotator 1.2.6-dev-3cbddbb
** https://github.com/okfn/annotator/
**
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE
**
** Built at: 2013-12-03 20:14:22Z
** Built at: 2014-02-17 13:39:47Z
*/
......
// Generated by CoffeeScript 1.6.3
/*
** Annotator 1.2.6-dev-6bedfd2
** Annotator 1.2.6-dev-3cbddbb
** https://github.com/okfn/annotator/
**
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE
**
** Built at: 2013-11-28 18:04:55Z
** Built at: 2014-02-17 13:39:53Z
*/
......@@ -81,19 +81,16 @@
});
viewer = document.getElementById("viewer");
viewer.addEventListener("domChange", function(event) {
var data, endPage, index, node, startPage, _i, _ref, _ref1, _results;
var data, endPage, node, startPage;
node = event.srcElement;
data = event.data;
if ("viewer" === (typeof node.getAttribute === "function" ? node.getAttribute("id") : void 0)) {
console.log("Detected cross-page change event.");
if ((data.start != null) && (data.end != null)) {
startPage = _this.getPageForNode(data.start);
_this._updateMap(_this.pageInfo[startPage.index]);
endPage = _this.getPageForNode(data.end);
_results = [];
for (index = _i = _ref = startPage.index, _ref1 = endPage.index; _ref <= _ref1 ? _i <= _ref1 : _i >= _ref1; index = _ref <= _ref1 ? ++_i : --_i) {
_results.push(_this._updateMap(_this.pageInfo[index]));
}
return _results;
return _this._updateMap(_this.pageInfo[endPage.index]);
}
}
});
......
{"version":3,"file":"annotator.pdf.js","sources":["_preamble.coffee","_annotator_mapsrc/src/plugin/pdf.coffee"],"names":[],"mappings":";AAAA;;;;;;;;;;CAAA;CAAA;;;;;;;ACCA;CAAA,GAAA,EAAA;KAAA;;oSAAA;;CAAA,CAAM,IAAM;CAGV;;CAAA,EAAa,CAAb,KAAa,CAAb,GAAC;CAAe,GAAA,MAAA;CAAH,EAA0B;CAAvC,IAAa;;CAAb,EAE4B,CAF5B,sBAEA;;CAFA,EAKc,MAAA,GAAd;CAAyB,IAAK,EAAN,MAAP;CALjB,IAKc;;CALd,EAQc,MAAA,GAAd;CAAyB,EAAO,CAAf,GAAO,MAAP;CARjB,IAQc;;CARd,EAWc,EAAA,IAAC,GAAf;CAAiC,EAAO,CAAf,CAAe,EAAR,MAAP;CAXzB,IAWc;;CAXd,EAciB,EAAA,IAAC,MAAlB;CACE,SAAA,CAAA;CAAA,IAAsC,CAAtC;CAfF,IAciB;;CAdjB,EAkBoB,EAAA,IAAC,SAArB;CACU,IAAM,EAAP,EAAuB,IAA9B;CAnBF,IAkBoB;;CAGP,EAAA,CAAA,mBAAA;CACX,gDAAA;CAAA,gEAAA;CAAA,GAAC,EAAD,GAAA;CAtBF,IAqBa;;CArBb,EAyBW,MAAX;CAEE,KAAA,IAAA;SAAA,GAAA;CAAA,CAA+B,CAAA,GAA/B,GAAgC,GAAhC,I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,CACQ,IAAR,EAAA,KADA;CAPQ,OAKV;CALF,IAAY;;CAAZ;;CAFiC,QAAS;CAlJ5C"}
\ No newline at end of file
// Generated by CoffeeScript 1.6.3
/*
** Annotator 1.2.6-dev-92fb6e4
** Annotator 1.2.6-dev-5352913
** https://github.com/okfn/annotator/
**
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE
**
** Built at: 2013-11-18 12:15:22Z
** Built at: 2013-12-16 13:46:48Z
*/
......
// Generated by CoffeeScript 1.6.3
/*
** Annotator 1.2.6-dev-59c78a6
** Annotator 1.2.6-dev-7017d90
** https://github.com/okfn/annotator/
**
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE
**
** Built at: 2013-11-27 18:11:54Z
** Built at: 2014-01-11 13:34:18Z
*/
......@@ -101,9 +101,13 @@
Store.prototype.annotationDeleted = function(annotation) {
var _this = this;
if (__indexOf.call(this.annotations, annotation) >= 0) {
return this._apiRequest('destroy', annotation, (function() {
return _this.unregisterAnnotation(annotation);
}));
if (annotation._clientdeleteonly != null) {
return this.unregisterAnnotation(annotation);
} else {
return this._apiRequest('destroy', annotation, (function() {
return _this.unregisterAnnotation(annotation);
}));
}
}
};
......
This diff is collapsed.
// Generated by CoffeeScript 1.6.3
/*
** Annotator 1.2.6-dev-dd6f102
** Annotator 1.2.6-dev-3cbddbb
** https://github.com/okfn/annotator/
**
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE
**
** Built at: 2013-11-28 13:26:36Z
** Built at: 2014-02-17 13:39:51Z
*/
......
// Generated by CoffeeScript 1.6.3
/*
** Annotator 1.2.6-dev-c90ac7c
** Annotator 1.2.6-dev-3cbddbb
** https://github.com/okfn/annotator/
**
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE
**
** Built at: 2013-12-09 23:42:19Z
** Built at: 2014-02-17 13:39:50Z
*/
......
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