Commit 50e0f71e authored by Randall Leeds's avatar Randall Leeds

include annotator v1.2.4 directly

No more submodule dependency!
parent 90d5120b
/*
** Annotator v1.2.4
** 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: 2012-05-31 10:31:02Z
*/((function(){var a,b,c,d,e=Object.prototype.hasOwnProperty,f=function(a,b){function d(){this.constructor=a}for(var c in b)e.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};c=function(a){var b,c,d,e,f,g;return e="([0-9]{4})(-([0-9]{2})(-([0-9]{2})(T([0-9]{2}):([0-9]{2})(:([0-9]{2})(.([0-9]+))?)?(Z|(([-+])([0-9]{2}):([0-9]{2})))?)?)?)?",b=a.match(new RegExp(e)),d=0,c=new Date(b[1],0,1),b[3]&&c.setMonth(b[3]-1),b[5]&&c.setDate(b[5]),b[7]&&c.setHours(b[7]),b[8]&&c.setMinutes(b[8]),b[10]&&c.setSeconds(b[10]),b[12]&&c.setMilliseconds(Number("0."+b[12])*1e3),b[14]&&(d=Number(b[16])*60+Number(b[17]),d*=(g=b[15]==="-")!=null?g:{1:-1}),d-=c.getTimezoneOffset(),f=Number(c)+d*60*1e3,c.setTime(Number(f)),c},a=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;if(typeof atob!="undefined"&&atob!==null)return atob(a);c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",j=0,b=0,e="",n=[];if(!a)return a;a+="";while(j<a.length)f=c.indexOf(a.charAt(j++)),g=c.indexOf(a.charAt(j++)),h=c.indexOf(a.charAt(j++)),i=c.indexOf(a.charAt(j++)),d=f<<18|g<<12|h<<6|i,k=d>>16&255,l=d>>8&255,m=d&255,h===64?n[b++]=String.fromCharCode(k):i===64?n[b++]=String.fromCharCode(k,l):n[b++]=String.fromCharCode(k,l,m);return n.join("")},b=function(b){var c,d,e;d=b.length%4;if(d!==0)for(c=0,e=4-d;0<=e?c<e:c>e;0<=e?c++:c--)b+="=";return b=b.replace(/-/g,"+"),b=b.replace(/_/g,"/"),a(b)},d=function(a){var c,d,e,f;return f=a.split("."),c=f[0],d=f[1],e=f[2],JSON.parse(b(d))},Annotator.Plugin.Auth=function(a){function b(a,c){b.__super__.constructor.apply(this,arguments),this.waitingForToken=[],this.options.token?this.setToken(this.options.token):this.requestToken()}return f(b,a),b.prototype.options={token:null,tokenUrl:"/auth/token",autoFetch:!0},b.prototype.requestToken=function(){var a=this;return this.requestInProgress=!0,$.ajax({url:this.options.tokenUrl,dataType:"text",xhrFields:{withCredentials:!0}}).done(function(b,c,d){return a.setToken(b)}).fail(function(a,b,c){var d;return d=Annotator._t("Couldn't get auth token:"),console.error(""+d+" "+c,a),Annotator.showNotification(""+d+" "+a.responseText,Annotator.Notification.ERROR)}).always(function(){return a.requestInProgress=!1})},b.prototype.setToken=function(a){var b,c=this;this.token=a,this._unsafeToken=d(a);if(this.haveValidToken()){this.options.autoFetch&&(this.refreshTimeout=setTimeout(function(){return c.requestToken()},(this.timeToExpiry()-2)*1e3)),this.updateHeaders(),b=[];while(this.waitingForToken.length>0)b.push(this.waitingForToken.pop()(this._unsafeToken));return b}console.warn(Annotator._t("Didn't get a valid token."));if(this.options.autoFetch)return console.warn(Annotator._t("Getting a new token in 10s.")),setTimeout(function(){return c.requestToken()},1e4)},b.prototype.haveValidToken=function(){var a;return a=this._unsafeToken&&this._unsafeToken.issuedAt&&this._unsafeToken.ttl&&this._unsafeToken.consumerKey,a&&this.timeToExpiry()>0},b.prototype.timeToExpiry=function(){var a,b,d,e;return d=(new Date).getTime()/1e3,b=c(this._unsafeToken.issuedAt).getTime()/1e3,a=b+this._unsafeToken.ttl,e=a-d,e>0?e:0},b.prototype.updateHeaders=function(){var a;return a=this.element.data("annotator:headers"),this.element.data("annotator:headers",$.extend(a,{"x-annotator-auth-token":this.token}))},b.prototype.withToken=function(a){if(a==null)return;if(this.haveValidToken())return a(this._unsafeToken);this.waitingForToken.push(a);if(!this.requestInProgress)return this.requestToken()},b}(Annotator.Plugin)})).call(this);
\ No newline at end of file
/*
** Annotator v1.2.4
** 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: 2012-05-31 10:30:54Z
*/((function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t=Array.prototype.slice,u=Object.prototype.hasOwnProperty,v=function(a,b){function d(){this.constructor=a}for(var c in b)u.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},w=function(a,b){return function(){return a.apply(b,arguments)}};i=null,typeof Gettext!="undefined"&&Gettext!==null?(l=new Gettext({domain:"annotator"}),i=function(a){return l.gettext(a)}):i=function(a){return a},s=function(a){return i(a)},(typeof jQuery!="undefined"&&jQuery!==null?(q=jQuery.fn)!=null?q.jquery:void 0:void 0)||console.error(s("Annotator requires jQuery: have you included lib/vendor/jquery.js?")),JSON&&JSON.parse&&JSON.stringify||console.error(s("Annotator requires a JSON implementation: have you included lib/vendor/json2.js?")),a=jQuery.sub(),a.flatten=function(b){var c;return c=function(b){var d,e,f,g;e=[];for(f=0,g=b.length;f<g;f++)d=b[f],e=e.concat(d&&a.isArray(d)?c(d):d);return e},c(b)},a.plugin=function(b,c){return jQuery.fn[b]=function(d){var e;return e=Array.prototype.slice.call(arguments,1),this.each(function(){var f;return f=a.data(this,b),f?d&&f[d].apply(f,e):(f=new c(this,d),a.data(this,b,f))})}},a.fn.textNodes=function(){var b;return b=function(a){var c;if(a&&a.nodeType!==3){c=[];if(a.nodeType!==8){a=a.lastChild;while(a)c.push(b(a)),a=a.previousSibling}return c.reverse()}return a},this.map(function(){return a.flatten(b(this))})},a.fn.xpath=function(b){var c;return c=this.map(function(){var c,d,e;e="",c=this;while(c&&c.nodeType===1&&c!==b)d=a(c.parentNode).children(c.tagName).index(c)+1,d="["+d+"]",e="/"+c.tagName.toLowerCase()+d+e,c=c.parentNode;return e}),c.get()},a.escape=function(a){return a.replace(/&(?!\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},a.fn.escape=function(b){return arguments.length?this.html(a.escape(b)):this.html()},a.fn.reverse=[].reverse,g=["log","debug","info","warn","exception","assert","dir","dirxml","trace","group","groupEnd","groupCollapsed","time","timeEnd","profile","profileEnd","count","clear","table","error","notifyFirebug","firebug","userObjects"];if(typeof console!="undefined"&&console!==null){console.group==null&&(console.group=function(a){return console.log("GROUP: ",a)}),console.groupCollapsed==null&&(console.groupCollapsed=console.group);for(m=0,o=g.length;m<o;m++)f=g[m],console[f]==null&&(console[f]=function(){return console.log(s("Not implemented:")+(" console."+name))})}else{this.console={};for(n=0,p=g.length;n<p;n++)f=g[n],this.console[f]=function(){};this.console.error=function(){var a;return a=1<=arguments.length?t.call(arguments,0):[],alert("ERROR: "+a.join(", "))},this.console.warn=function(){var a;return a=1<=arguments.length?t.call(arguments,0):[],alert("WARNING: "+a.join(", "))}}c=function(){function b(b,c){this.options=a.extend(!0,{},this.options,c),this.element=a(b),this.on=this.subscribe,this.addEvents()}return b.prototype.events={},b.prototype.options={},b.prototype.element=null,b.prototype.addEvents=function(){var a,b,c,d,e,f,g,h;f=this.events,h=[];for(c in f)b=f[c],g=c.split(" "),d=2<=g.length?t.call(g,0,e=g.length-1):(e=0,[]),a=g[e++],h.push(this.addEvent(d.join(" "),a,b));return h},b.prototype.addEvent=function(b,c,d){var e,f,g=this;return e=function(){return g[d].apply(g,arguments)},f=typeof b=="string"&&b.replace(/\s+/g,"")==="",f&&(b=this.element),typeof b=="string"?this.element.delegate(b,c,e):this.isCustomEvent(c)?this.subscribe(c,e):a(b).bind(c,e),this},b.prototype.isCustomEvent=function(c){return c=c.split(".")[0],a.inArray(c,b.natives)===-1},b.prototype.publish=function(){return this.element.triggerHandler.apply(this.element,arguments),this},b.prototype.subscribe=function(b,c){var d;return d=function(){return c.apply(this,[].slice.call(arguments,1))},d.guid=c.guid=a.guid+=1,this.element.bind(b,d),this},b.prototype.unsubscribe=function(){return this.element.unbind.apply(this.element,arguments),this},b}(),c.natives=function(){var a,b,c;return b=function(){var b,d;b=jQuery.event.special,d=[];for(a in b){if(!u.call(b,a))continue;c=b[a],d.push(a)}return d}(),"blur focus focusin focusout load resize scroll unload click dblclick\nmousedown mouseup mousemove mouseover mouseout mouseenter mouseleave\nchange select submit keydown keypress keyup error".split(/[^a-z]+/).concat(b)}(),e={},e.sniff=function(a){return a.commonAncestorContainer!=null?new e.BrowserRange(a):typeof a.start=="string"?new e.SerializedRange(a):a.start&&typeof a.start=="object"?new e.NormalizedRange(a):(console.error(s("Could not sniff range type")),!1)},e.nodeFromXPath=function(b,c){var d,e,f,g,h;return c==null&&(c=document),e=function(a,b){return b==null&&(b=null),document.evaluate("."+a,c,b,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue},a.isXMLDoc(document.documentElement)?(d=document.createNSResolver(document.ownerDocument===null?document.documentElement:document.ownerDocument.documentElement),g=e(b,d),g||(b=function(){var a,c,d,e;d=b.split("/"),e=[];for(a=0,c=d.length;a<c;a++)h=d[a],h&&h.indexOf(":")===-1?e.push(h.replace(/^([a-z]+)/,"xhtml:$1")):e.push(h);return e}().join("/"),f=document.lookupNamespaceURI(null),d=function(a){return a==="xhtml"?f:document.documentElement.getAttribute("xmlns:"+a)},g=e(b,d)),g):e(b)},e.RangeError=function(a){function b(a,c,d){this.type=a,this.message=c,this.parent=d!=null?d:null,b.__super__.constructor.call(this,this.message)}return v(b,a),b}(Error),e.BrowserRange=function(){function a(a){this.commonAncestorContainer=a.commonAncestorContainer,this.startContainer=a.startContainer,this.startOffset=a.startOffset,this.endContainer=a.endContainer,this.endOffset=a.endOffset}return a.prototype.normalize=function(a){var b,c,d,f,g,h,i,j,k;if(this.tainted)return console.error(s("You may only call normalize() once on a BrowserRange!")),!1;this.tainted=!0,h={},d={},k=["start","end"];for(i=0,j=k.length;i<j;i++){g=k[i],c=this[g+"Container"],f=this[g+"Offset"];if(c.nodeType===1){b=c.childNodes[f],c=b||c.childNodes[f-1],c.nodeType===1&&!c.firstChild&&(b=null,c=c.previousSibling);while(c.nodeType!==3)c=c.firstChild;f=b?0:c.nodeValue.length}h[g]=c,h[g+"Offset"]=f}d.start=h.startOffset>0?h.start.splitText(h.startOffset):h.start,h.start===h.end?(h.endOffset-h.startOffset<d.start.nodeValue.length&&d.start.splitText(h.endOffset-h.startOffset),d.end=d.start):(h.endOffset<h.end.nodeValue.length&&h.end.splitText(h.endOffset),d.end=h.end),d.commonAncestor=this.commonAncestorContainer;while(d.commonAncestor.nodeType!==1)d.commonAncestor=d.commonAncestor.parentNode;return new e.NormalizedRange(d)},a.prototype.serialize=function(a,b){return this.normalize(a).serialize(a,b)},a}(),e.NormalizedRange=function(){function b(a){this.commonAncestor=a.commonAncestor,this.start=a.start,this.end=a.end}return b.prototype.normalize=function(a){return this},b.prototype.limit=function(b){var c,d,e,f,g,h;c=a.grep(this.textNodes(),function(c){return c.parentNode===b||a.contains(b,c.parentNode)});if(!c.length)return null;this.start=c[0],this.end=c[c.length-1],e=a(this.start).parents(),h=a(this.end).parents();for(f=0,g=h.length;f<g;f++){d=h[f];if(e.index(d)!==-1){this.commonAncestor=d;break}}return this},b.prototype.serialize=function(b,c){var d,f,g;return f=function(d,e){var f,g,h,i,j,k,l,m;c?i=a(d).parents(":not("+c+")").eq(0):i=a(d).parent(),k=i.xpath(b)[0],j=i.textNodes(),g=j.slice(0,j.index(d)),h=0;for(l=0,m=g.length;l<m;l++)f=g[l],h+=f.nodeValue.length;return e?[k,h+d.nodeValue.length]:[k,h]},g=f(this.start),d=f(this.end,!0),new e.SerializedRange({start:g[0],end:d[0],startOffset:g[1],endOffset:d[1]})},b.prototype.text=function(){var a;return function(){var b,c,d,e;d=this.textNodes(),e=[];for(b=0,c=d.length;b<c;b++)a=d[b],e.push(a.nodeValue);return e}.call(this).join("")},b.prototype.textNodes=function(){var b,c,d,e;return d=a(this.commonAncestor).textNodes(),e=[d.index(this.start),d.index(this.end)],c=e[0],b=e[1],a.makeArray(d.slice(c,b+1||9e9))},b.prototype.toRange=function(){var a;return a=document.createRange(),a.setStartBefore(this.start),a.setEndAfter(this.end),a},b}(),e.SerializedRange=function(){function b(a){this.start=a.start,this.startOffset=a.startOffset,this.end=a.end,this.endOffset=a.endOffset}return b.prototype.normalize=function(b){var c,d,f,g,h,i,j,k,l,m,n,o;h={},n=["start","end"];for(j=0,l=n.length;j<l;j++){g=n[j];try{f=e.nodeFromXPath(this[g],b)}catch(p){throw new e.RangeError(g,"Error while finding "+g+" node: "+this[g]+": "+p,p)}if(!f)throw new e.RangeError(g,"Couldn't find "+g+" node: "+this[g]);d=0,o=a(f).textNodes();for(k=0,m=o.length;k<m;k++){i=o[k];if(d+i.nodeValue.length>=this[g+"Offset"]){h[g+"Container"]=i,h[g+"Offset"]=this[g+"Offset"]-d;break}d+=i.nodeValue.length}if(h[g+"Offset"]==null)throw new e.RangeError(""+g+"offset","Couldn't find offset "+this[g+"Offset"]+" in element "+this[g])}return c=document.compareDocumentPosition==null?function(a,b){return a.contains(b)}:function(a,b){return a.compareDocumentPosition(b)&16},a(h.startContainer).parents().reverse().each(function(){if(c(this,h.endContainer))return h.commonAncestorContainer=this,!1}),(new e.BrowserRange(h)).normalize(b)},b.prototype.serialize=function(a,b){return this.normalize(a).serialize(a,b)},b.prototype.toObject=function(){return{start:this.start,startOffset:this.startOffset,end:this.end,endOffset:this.endOffset}},b}(),j={uuid:function(){var a;return a=0,function(){return a++}}(),getGlobal:function(){return function(){return this}()},maxZIndex:function(b){var c,d;return c=function(){var c,e,f;f=[];for(c=0,e=b.length;c<e;c++)d=b[c],a(d).css("position")==="static"?f.push(-1):f.push(parseInt(a(d).css("z-index"),10)||-1);return f}(),Math.max.apply(Math,c)},mousePosition:function(b,c){var d;return d=a(c).offset(),{top:b.pageY-d.top,left:b.pageX-d.left}},preventEventDefault:function(a){return a!=null?typeof a.preventDefault=="function"?a.preventDefault():void 0:void 0}},k=this.Annotator,b=function(b){function c(b,d){this.onDeleteAnnotation=w(this.onDeleteAnnotation,this),this.onEditAnnotation=w(this.onEditAnnotation,this),this.onAdderClick=w(this.onAdderClick,this),this.onAdderMousedown=w(this.onAdderMousedown,this),this.onHighlightMouseover=w(this.onHighlightMouseover,this),this.checkForEndSelection=w(this.checkForEndSelection,this),this.checkForStartSelection=w(this.checkForStartSelection,this),this.clearViewerHideTimer=w(this.clearViewerHideTimer,this),this.startViewerHideTimer=w(this.startViewerHideTimer,this),this.showViewer=w(this.showViewer,this),this.onEditorSubmit=w(this.onEditorSubmit,this),this.onEditorHide=w(this.onEditorHide,this),this.showEditor=w(this.showEditor,this),c.__super__.constructor.apply(this,arguments),this.plugins={};if(!c.supported())return this;this.options.readOnly||this._setupDocumentEvents(),this._setupWrapper()._setupViewer()._setupEditor(),this._setupDynamicStyle(),this.adder=a(this.html.adder).appendTo(this.wrapper).hide()}return v(c,b),c.prototype.events={".annotator-adder button click":"onAdderClick",".annotator-adder button mousedown":"onAdderMousedown",".annotator-hl mouseover":"onHighlightMouseover",".annotator-hl mouseout":"startViewerHideTimer"},c.prototype.html={adder:'<div class="annotator-adder"><button>'+s("Annotate")+"</button></div>",wrapper:'<div class="annotator-wrapper"></div>'},c.prototype.options={readOnly:!1},c.prototype.plugins={},c.prototype.editor=null,c.prototype.viewer=null,c.prototype.selectedRanges=null,c.prototype.mouseIsDown=!1,c.prototype.ignoreMouseup=!1,c.prototype.viewerHideTimer=null,c.prototype._setupWrapper=function(){return this.wrapper=a(this.html.wrapper),this.element.find("script").remove(),this.element.wrapInner(this.wrapper),this.wrapper=this.element.find(".annotator-wrapper"),this},c.prototype._setupViewer=function(){var b=this;return this.viewer=new c.Viewer({readOnly:this.options.readOnly}),this.viewer.hide().on("edit",this.onEditAnnotation).on("delete",this.onDeleteAnnotation).addField({load:function(c,d){return d.text?a(c).escape(d.text):a(c).html("<i>"+s("No Comment")+"</i>"),b.publish("annotationViewerTextField",[c,d])}}).element.appendTo(this.wrapper).bind({mouseover:this.clearViewerHideTimer,mouseout:this.startViewerHideTimer}),this},c.prototype._setupEditor=function(){return this.editor=new c.Editor,this.editor.hide().on("hide",this.onEditorHide).on("save",this.onEditorSubmit).addField({type:"textarea",label:s("Comments")+"…",load:function(b,c){return a(b).find("textarea").val(c.text||"")},submit:function(b,c){return c.text=a(b).find("textarea").val()}}),this.editor.element.appendTo(this.wrapper),this},c.prototype._setupDocumentEvents=function(){return a(document).bind({mouseup:this.checkForEndSelection,mousedown:this.checkForStartSelection}),this},c.prototype._setupDynamicStyle=function(){var b,c,d,e;return d=a("#annotator-dynamic-style"),d.length||(d=a('<style id="annotator-dynamic-style"></style>').appendTo(document.head)),c="*"+function(){var a,b,c,d;c=["adder","outer","notice","filter"],d=[];for(a=0,b=c.length;a<b;a++)e=c[a],d.push(":not(.annotator-"+e+")");return d}().join(""),b=j.maxZIndex(a(document.body).find(c)),b=Math.max(b,1e3),d.text([".annotator-adder, .annotator-outer, .annotator-notice {"," z-index: "+(b+20)+";","}",".annotator-filter {"," z-index: "+(b+10)+";","}"].join("\n")),this},c.prototype.getSelectedRanges=function(){var b,c,d,f,g,h,i,k,l;i=j.getGlobal().getSelection(),g=[],h=[],i.isCollapsed||(g=function(){var a,g;g=[];for(c=0,a=i.rangeCount;0<=a?c<a:c>a;0<=a?c++:c--)f=i.getRangeAt(c),b=new e.BrowserRange(f),d=b.normalize().limit(this.wrapper[0]),d===null&&h.push(f),g.push(d);return g}.call(this),i.removeAllRanges());for(k=0,l=h.length;k<l;k++)f=h[k],i.addRange(f);return a.grep(g,function(a){return a&&i.addRange(a.toRange()),a})},c.prototype.createAnnotation=function(){var a;return a={},this.publish("beforeAnnotationCreated",[a]),a},c.prototype.setupAnnotation=function(b,c){var d,f,g,h,i,j,k,l,m;c==null&&(c=!0),h=this.wrapper[0],b.ranges||(b.ranges=this.selectedRanges),f=[],m=b.ranges;for(i=0,k=m.length;i<k;i++){g=m[i];try{f.push(e.sniff(g).normalize(h))}catch(n){if(!(n instanceof e.RangeError))throw n;this.publish("rangeNormalizeFail",[b,g,n])}}b.quote=[],b.ranges=[],b.highlights=[];for(j=0,l=f.length;j<l;j++)d=f[j],b.quote.push(a.trim(d.text())),b.ranges.push(d.serialize(this.wrapper[0],".annotator-hl")),a.merge(b.highlights,this.highlightRange(d));return b.quote=b.quote.join(" / "),a(b.highlights).data("annotation",b),c&&this.publish("annotationCreated",[b]),b},c.prototype.updateAnnotation=function(a){return this.publish("beforeAnnotationUpdated",[a]),this.publish("annotationUpdated",[a]),a},c.prototype.deleteAnnotation=function(b){var c,d,e,f;f=b.highlights;for(d=0,e=f.length;d<e;d++)c=f[d],a(c).replaceWith(c.childNodes);return this.publish("annotationDeleted",[b]),b},c.prototype.loadAnnotations=function(a){var b,c,d=this;return a==null&&(a=[]),c=function(a){var e,f,g,h;a==null&&(a=[]),f=a.splice(0,10);for(g=0,h=f.length;g<h;g++)e=f[g],d.setupAnnotation(e,!1);return a.length>0?setTimeout(function(){return c(a)},10):d.publish("annotationsLoaded",[b])},b=a.slice(),a.length&&c(a),this},c.prototype.dumpAnnotations=function(){return this.plugins.Store?this.plugins.Store.dumpAnnotations():console.warn(s("Can't dump annotations without Store plugin."))},c.prototype.highlightRange=function(b,c){var d,e,f,g,h,i,j;c==null&&(c="annotator-hl"),f=/^\s*$/,d=a("<span class='"+c+"'></span>"),i=b.textNodes(),j=[];for(g=0,h=i.length;g<h;g++)e=i[g],f.test(e.nodeValue)||j.push(a(e).wrapAll(d).parent().show()[0]);return j},c.prototype.highlightRanges=function(b,c){var d,e,f,g;c==null&&(c="annotator-hl"),d=[];for(f=0,g=b.length;f<g;f++)e=b[f],a.merge(d,this.highlightRange(e,c));return d},c.prototype.addPlugin=function(a,b){var d,e;return this.plugins[a]?console.error(s("You cannot have more than one instance of any plugin.")):(d=c.Plugin[a],typeof d=="function"?(this.plugins[a]=new d(this.element[0],b),this.plugins[a].annotator=this,typeof (e=this.plugins[a]).pluginInit=="function"&&e.pluginInit()):console.error(s("Could not load ")+a+s(" plugin. Have you included the appropriate <script> tag?"))),this},c.prototype.showEditor=function(a,b){return this.editor.element.css(b),this.editor.load(a),this},c.prototype.onEditorHide=function(){return this.publish("annotationEditorHidden",[this.editor]),this.ignoreMouseup=!1},c.prototype.onEditorSubmit=function(a){return this.publish("annotationEditorSubmit",[this.editor,a]),a.ranges===void 0?this.setupAnnotation(a):this.updateAnnotation(a)},c.prototype.showViewer=function(a,b){return this.viewer.element.css(b),this.viewer.load(a),this.publish("annotationViewerShown",[this.viewer,a])},c.prototype.startViewerHideTimer=function(){if(!this.viewerHideTimer)return this.viewerHideTimer=setTimeout(this.viewer.hide,250)},c.prototype.clearViewerHideTimer=function(){return clearTimeout(this.viewerHideTimer),this.viewerHideTimer=!1},c.prototype.checkForStartSelection=function(a){if(!a||!this.isAnnotator(a.target))return this.startViewerHideTimer(),this.mouseIsDown=!0},c.prototype.checkForEndSelection=function(a){var b,c,d,e,f;this.mouseIsDown=!1;if(this.ignoreMouseup)return;this.selectedRanges=this.getSelectedRanges(),f=this.selectedRanges;for(d=0,e=f.length;d<e;d++){c=f[d],b=c.commonAncestor;if(this.isAnnotator(b))return}return a&&this.selectedRanges.length?this.adder.css(j.mousePosition(a,this.wrapper[0])).show():this.adder.hide()},c.prototype.isAnnotator=function(b){return!!a(b).parents().andSelf().filter("[class^=annotator-]").not(this.wrapper).length},c.prototype.onHighlightMouseover=function(b){var c;return this.clearViewerHideTimer(),this.mouseIsDown||this.viewer.isShown()?!1:(c=a(b.target).parents(".annotator-hl").andSelf().map(function(){return a(this).data("annotation")}),this.showViewer(a.makeArray(c),j.mousePosition(b,this.wrapper[0])))},c.prototype.onAdderMousedown=function(a){return a!=null&&a.preventDefault(),this.ignoreMouseup=!0},c.prototype.onAdderClick=function(b){var c,d,f,g;return b!=null&&b.preventDefault(),d=this.adder.position(),this.adder.hide(),this.selectedRanges&&this.selectedRanges.length&&(g=function(){var a,b,c,d;c=this.selectedRanges,d=[];for(a=0,b=c.length;a<b;a++)f=c[a],d.push(e.sniff(f).normalize());return d}.call(this),c=this.highlightRanges(g,"annotator-hl-temporary"),this.editor.element.one("hide",function(){var b,d,e,f;f=[];for(d=0,e=c.length;d<e;d++)b=c[d],f.push(a(b).replaceWith(b.childNodes));return f})),this.showEditor(this.createAnnotation(),d)},c.prototype.onEditAnnotation=function(a){var b;return b=this.viewer.element.position(),this.viewer.hide(),this.showEditor(a,b)},c.prototype.onDeleteAnnotation=function(a){return this.viewer.hide(),this.deleteAnnotation(a)},c}(c),b.Plugin=function(a){function b(a,c){b.__super__.constructor.apply(this,arguments)}return v(b,a),b.prototype.pluginInit=function(){},b}(c),h=j.getGlobal(),((r=h.document)!=null?r.evaluate:void 0)==null&&a.getScript("http://assets.annotateit.org/vendor/xpath.min.js"),h.getSelection==null&&a.getScript("http://assets.annotateit.org/vendor/ierange.min.js"),h.JSON==null&&a.getScript("http://assets.annotateit.org/vendor/json2.min.js"),b.$=a,b.Delegator=c,b.Range=e,b._t=s,b.supported=function(){return function(){return!!this.getSelection}()},b.noConflict=function(){return j.getGlobal().Annotator=k,this},a.plugin("annotator",b),this.Annotator=b,b.Widget=function(c){function d(c,e){d.__super__.constructor.apply(this,arguments),this.classes=a.extend({},b.Widget.prototype.classes,this.classes)}return v(d,c),d.prototype.classes={hide:"annotator-hide",invert:{x:"annotator-invert-x",y:"annotator-invert-y"}},d.prototype.checkOrientation=function(){var b,c,d,e,f;return this.resetOrientation(),f=a(j.getGlobal()),e=this.element.children(":first"),c=e.offset(),d={top:f.scrollTop(),right:f.width()+f.scrollLeft()},b={top:c.top,right:c.left+e.width()},b.top-d.top<0&&this.invertY(),b.right-d.right>0&&this.invertX(),this},d.prototype.resetOrientation=function(){return this.element.removeClass(this.classes.invert.x).removeClass(this.classes.invert.y),this},d.prototype.invertX=function(){return this.element.addClass(this.classes.invert.x),this},d.prototype.invertY=function(){return this.element.addClass(this.classes.invert.y),this},d.prototype.isInvertedY=function(){return this.element.hasClass(this.classes.invert.y)},d.prototype.isInvertedX=function(){return this.element.hasClass(this.classes.invert.x)},d}(c),b.Editor=function(b){function c(b){this.onCancelButtonMouseover=w(this.onCancelButtonMouseover,this),this.processKeypress=w(this.processKeypress,this),this.submit=w(this.submit,this),this.load=w(this.load,this),this.hide=w(this.hide,this),this.show=w(this.show,this),c.__super__.constructor.call(this,a(this.html)[0],b),this.fields=[],this.annotation={}}return v(c,b),c.prototype.events={"form submit":"submit",".annotator-save click":"submit",".annotator-cancel click":"hide",".annotator-cancel mouseover":"onCancelButtonMouseover","textarea keydown":"processKeypress"},c.prototype.classes={hide:"annotator-hide",focus:"annotator-focus"},c.prototype.html='<div class="annotator-outer annotator-editor">\n <form class="annotator-widget">\n <ul class="annotator-listing"></ul>\n <div class="annotator-controls">\n <a href="#cancel" class="annotator-cancel">'+s("Cancel")+'</a>\n<a href="#save" class="annotator-save annotator-focus">'+s("Save")+"</a>\n </div>\n </form>\n</div>",c.prototype.options={},c.prototype.show=function(a){return j.preventEventDefault(a),this.element.removeClass(this.classes.hide),this.element.find(".annotator-save").addClass(this.classes.focus),this.checkOrientation(),this.element.find(":input:first").focus(),this.setupDraggables(),this.publish("show")},c.prototype.hide=function(a){return j.preventEventDefault(a),this.element.addClass(this.classes.hide),this.publish("hide")},c.prototype.load=function(a){var b,c,d,e;this.annotation=a,this.publish("load",[this.annotation]),e=this.fields;for(c=0,d=e.length;c<d;c++)b=e[c],b.load(b.element,this.annotation);return this.show()},c.prototype.submit=function(a){var b,c,d,e;j.preventEventDefault(a),e=this.fields;for(c=0,d=e.length;c<d;c++)b=e[c],b.submit(b.element,this.annotation);return this.publish("save",[this.annotation]),this.hide()},c.prototype.addField=function(b){var c,d,e;d=a.extend({id:"annotator-field-"+j.uuid(),type:"input",label:"",load:function(){},submit:function(){}},b),e=null,c=a('<li class="annotator-item" />'),d.element=c[0];switch(d.type){case"textarea":e=a("<textarea />");break;case"input":case"checkbox":e=a("<input />")}return c.append(e),e.attr({id:d.id,placeholder:d.label}),d.type==="checkbox"&&(e[0].type="checkbox",c.addClass("annotator-checkbox"),c.append(a("<label />",{"for":d.id,html:d.label}))),this.element.find("ul:first").append(c),this.fields.push(d),d.element},c.prototype.checkOrientation=function(){var a,b;return c.__super__.checkOrientation.apply(this,arguments),b=this.element.find("ul"),a=this.element.find(".annotator-controls"),this.element.hasClass(this.classes.invert.y)?a.insertBefore(b):a.is(":first-child")&&a.insertAfter(b),this},c.prototype.processKeypress=function(a){if(a.keyCode===27)return this.hide();if(a.keyCode===13&&!a.shiftKey)return this.submit()},c.prototype.onCancelButtonMouseover=function(){return this.element.find("."+this.classes.focus).removeClass(this.classes.focus)},c.prototype.setupDraggables=function(){var b,c,d,e,f,g,h,i,j,k,l,m=this;return this.element.find(".annotator-resize").remove(),this.element.hasClass(this.classes.invert.y)?d=this.element.find(".annotator-item:last"):d=this.element.find(".annotator-item:first"),d&&a('<span class="annotator-resize"></span>').appendTo(d),f=null,b=this.classes,e=this.element,k=null,j=e.find(".annotator-resize"),c=e.find(".annotator-controls"),l=!1,g=function(b){if(b.target===this)return f={element:this,top:b.pageY,left:b.pageX},k=e.find("textarea:first"),a(window).bind({"mouseup.annotator-editor-resize":i,"mousemove.annotator-editor-resize":h}),b.preventDefault()},i=function(){return f=null,a(window).unbind(".annotator-editor-resize")},h=function(a){var d,g,h,i,m;if(f&&l===!1)return d={top:a.pageY-f.top,left:a.pageX-f.left},f.element===j[0]?(i=k.outerHeight(),m=k.outerWidth(),g=e.hasClass(b.invert.x)?-1:1,h=e.hasClass(b.invert.y)?1:-1,k.height(i+d.top*h),k.width(m+d.left*g),k.outerHeight()!==i&&(f.top=a.pageY),k.outerWidth()!==m&&(f.left=a.pageX)):f.element===c[0]&&(e.css({top:parseInt(e.css("top"),10)+d.top,left:parseInt(e.css("left"),10)+d.left}),f.top=a.pageY,f.left=a.pageX),l=!0,setTimeout(function(){return l=!1},1e3/60)},j.bind("mousedown",g),c.bind("mousedown",g)},c}(b.Widget),b.Viewer=function(b){function c(b){this.onDeleteClick=w(this.onDeleteClick,this),this.onEditClick=w(this.onEditClick,this),this.load=w(this.load,this),this.hide=w(this.hide,this),this.show=w(this.show,this),c.__super__.constructor.call(this,a(this.html.element)[0],b),this.item=a(this.html.item)[0],this.fields=[],this.annotations=[]}return v(c,b),c.prototype.events={".annotator-edit click":"onEditClick",".annotator-delete click":"onDeleteClick"},c.prototype.classes={hide:"annotator-hide",showControls:"annotator-visible"},c.prototype.html={element:'<div class="annotator-outer annotator-viewer">\n <ul class="annotator-widget annotator-listing"></ul>\n</div>',item:'<li class="annotator-annotation annotator-item">\n <span class="annotator-controls">\n <a href="#" title="View as webpage" class="annotator-link">View as webpage</a>\n <button title="Edit" class="annotator-edit">Edit</button>\n <button title="Delete" class="annotator-delete">Delete</button>\n </span>\n</li>'},c.prototype.options={readOnly:!1},c.prototype.show=function(a){var b,c=this;return j.preventEventDefault(a),b=this.element.find(".annotator-controls").addClass(this.classes.showControls),setTimeout(function(){return b.removeClass(c.classes.showControls)},500),this.element.removeClass(this.classes.hide),this.checkOrientation().publish("show")},c.prototype.isShown=function(){return!this.element.hasClass(this.classes.hide)},c.prototype.hide=function(a){return j.preventEventDefault(a),this.element.addClass(this.classes.hide),this.publish("hide")},c.prototype.load=function(b){var c,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;this.annotations=b||[],n=this.element.find("ul:first").empty(),s=this.annotations;for(o=0,q=s.length;o<q;o++){c=s[o],k=a(this.item).clone().appendTo(n).data("annotation",c),f=k.find(".annotator-controls"),l=f.find(".annotator-link"),h=f.find(".annotator-edit"),g=f.find(".annotator-delete"),m=(new d(c.links||[])).get("alternate",{type:"text/html"}),m.length===0||m[0].href==null?l.remove():l.attr("href",m[0].href),this.options.readOnly?(h.remove(),g.remove()):e={showEdit:function(){return h.removeAttr("disabled")},hideEdit:function(){return h.attr("disabled","disabled")},showDelete:function(){return g.removeAttr("disabled")},hideDelete:function(){return g.attr("disabled","disabled")}},t=this.fields;for(p=0,r=t.length;p<r;p++)j=t[p],i=a(j.element).clone().appendTo(k)[0],j.load(i,c,e)}return this.publish("load",[this.annotations]),this.show()},c.prototype.addField=function(b){var c;return c=a.extend({load:function(){}},b),c.element=a("<div />")[0],this.fields.push(c),c.element,this},c.prototype.onEditClick=function(a){return this.onButtonClick(a,"edit")},c.prototype.onDeleteClick=function(a){return this.onButtonClick(a,"delete")},c.prototype.onButtonClick=function(b,c){var d;return d=a(b.target).parents(".annotator-annotation"),this.publish(c,[d.data("annotation")])},c}(b.Widget),d=function(){function b(a){this.data=a}return b.prototype.get=function(b,c){var d,e,f,g,h,i,j,k,l;c==null&&(c={}),c=a.extend({},c,{rel:b}),f=function(){var a;a=[];for(e in c){if(!u.call(c,e))continue;h=c[e],a.push(e)}return a}(),k=this.data,l=[];for(i=0,j=k.length;i<j;i++){d=k[i],g=f.reduce(function(a,b){return a&&d[b]===c[b]},!0);if(!g)continue;l.push(d)}return l},b}(),b=b||{},b.Notification=function(c){function d(b){this.hide=w(this.hide,this),this.show=w(this.show,this),d.__super__.constructor.call(this,a(this.options.html).appendTo(document.body)[0],b)}return v(d,c),d.prototype.events={click:"hide"},d.prototype.options={html:"<div class='annotator-notice'></div>",classes:{show:"annotator-notice-show",info:"annotator-notice-info",success:"annotator-notice-success",error:"annotator-notice-error"}},d.prototype.show=function(c,d){return d==null&&(d=b.Notification.INFO),a(this.element).addClass(this.options.classes.show).addClass(this.options.classes[d]).escape(c||""),setTimeout(this.hide,5e3),this},d.prototype.hide=function(){return a(this.element).removeClass(this.options.classes.show),this},d}(c),b.Notification.INFO="show",b.Notification.SUCCESS="success",b.Notification.ERROR="error",a(function(){var a;return a=new b.Notification,b.showNotification=a.show,b.hideNotification=a.hide})})).call(this);
\ No newline at end of file
/*
** Annotator v1.2.4
** 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: 2012-05-31 10:31:07Z
*/((function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};Annotator.Plugin.Permissions=function(b){function d(b,c){this._setAuthFromToken=a(this._setAuthFromToken,this),this.updateViewer=a(this.updateViewer,this),this.updateAnnotationPermissions=a(this.updateAnnotationPermissions,this),this.updatePermissionsField=a(this.updatePermissionsField,this),this.addFieldsToAnnotation=a(this.addFieldsToAnnotation,this),d.__super__.constructor.apply(this,arguments),this.options.user&&(this.setUser(this.options.user),delete this.options.user)}return c(d,b),d.prototype.events={beforeAnnotationCreated:"addFieldsToAnnotation"},d.prototype.options={showViewPermissionsCheckbox:!0,showEditPermissionsCheckbox:!0,userId:function(a){return a},userString:function(a){return a},userAuthorize:function(a,b,c){var d,e,f,g;if(b.permissions){e=b.permissions[a]||[];if(e.length===0)return!0;for(f=0,g=e.length;f<g;f++){d=e[f];if(this.userId(c)===d)return!0}return!1}return b.user?c&&this.userId(c)===this.userId(b.user):!0},user:"",permissions:{read:[],update:[],"delete":[],admin:[]}},d.prototype.pluginInit=function(){var a,b,c=this;if(!Annotator.supported())return;b=this,a=function(a,c){return function(d,e){return b[a].call(b,c,d,e)}},!this.user&&this.annotator.plugins.Auth&&this.annotator.plugins.Auth.withToken(this._setAuthFromToken),this.options.showViewPermissionsCheckbox===!0&&this.annotator.editor.addField({type:"checkbox",label:Annotator._t("Allow anyone to <strong>view</strong> this annotation"),load:a("updatePermissionsField","read"),submit:a("updateAnnotationPermissions","read")}),this.options.showEditPermissionsCheckbox===!0&&this.annotator.editor.addField({type:"checkbox",label:Annotator._t("Allow anyone to <strong>edit</strong> this annotation"),load:a("updatePermissionsField","update"),submit:a("updateAnnotationPermissions","update")}),this.annotator.viewer.addField({load:this.updateViewer});if(this.annotator.plugins.Filter)return this.annotator.plugins.Filter.addFilter({label:Annotator._t("User"),property:"user",isFiltered:function(a,b){var d,e,f,g;b=c.options.userString(b);if(!a||!b)return!1;g=a.split(/\s*/);for(e=0,f=g.length;e<f;e++){d=g[e];if(b.indexOf(d)===-1)return!1}return!0}})},d.prototype.setUser=function(a){return this.user=a},d.prototype.addFieldsToAnnotation=function(a){if(a){a.permissions=this.options.permissions;if(this.user)return a.user=this.user}},d.prototype.authorize=function(a,b,c){return c===void 0&&(c=this.user),this.options.userAuthorize?this.options.userAuthorize.call(this.options,a,b,c):!0},d.prototype.updatePermissionsField=function(a,b,c){var d;return b=$(b).show(),d=b.find("input").removeAttr("disabled"),this.authorize("admin",c)||b.hide(),this.authorize(a,c||{},null)?d.attr("checked","checked"):d.removeAttr("checked")},d.prototype.updateAnnotationPermissions=function(a,b,c){var d;return c.permissions||(c.permissions=this.options.permissions),d=a+"-permissions",$(b).find("input").is(":checked")?c.permissions[a]=[]:c.permissions[a]=[this.user]},d.prototype.updateViewer=function(a,b,c){var d,e;a=$(a),e=this.options.userString(b.user),b.user&&e&&typeof e=="string"?(d=Annotator.$.escape(this.options.userString(b.user)),a.html(d).addClass("annotator-user")):a.remove(),this.authorize("update",b)||c.hideEdit();if(!this.authorize("delete",b))return c.hideDelete()},d.prototype._setAuthFromToken=function(a){return this.setUser(a.userId)},d}(Annotator.Plugin)})).call(this);
\ No newline at end of file
/*
** Annotator v1.2.4
** 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: 2012-05-31 10:31:09Z
*/((function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a},d=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;b<c;b++)if(b in this&&this[b]===a)return b;return-1};Annotator.Plugin.Store=function(b){function e(b,c){this._onError=a(this._onError,this),this._onLoadAnnotationsFromSearch=a(this._onLoadAnnotationsFromSearch,this),this._onLoadAnnotations=a(this._onLoadAnnotations,this),this._getAnnotations=a(this._getAnnotations,this),e.__super__.constructor.apply(this,arguments),this.annotations=[]}return c(e,b),e.prototype.events={annotationCreated:"annotationCreated",annotationDeleted:"annotationDeleted",annotationUpdated:"annotationUpdated"},e.prototype.options={prefix:"/store",autoFetch:!0,annotationData:{},loadFromSearch:!1,urls:{create:"/annotations",read:"/annotations/:id",update:"/annotations/:id",destroy:"/annotations/:id",search:"/search"}},e.prototype.pluginInit=function(){if(!Annotator.supported())return;return this.annotator.plugins.Auth?this.annotator.plugins.Auth.withToken(this._getAnnotations):this._getAnnotations()},e.prototype._getAnnotations=function(){return this.options.loadFromSearch?this.loadAnnotationsFromSearch(this.options.loadFromSearch):this.loadAnnotations()},e.prototype.annotationCreated=function(a){var b=this;return d.call(this.annotations,a)<0?(this.registerAnnotation(a),this._apiRequest("create",a,function(c){return c.id==null&&console.warn(Annotator._t("Warning: No ID returned from server for annotation "),a),b.updateAnnotation(a,c)})):this.updateAnnotation(a,{})},e.prototype.annotationUpdated=function(a){var b=this;if(d.call(this.annotations,a)>=0)return this._apiRequest("update",a,function(c){return b.updateAnnotation(a,c)})},e.prototype.annotationDeleted=function(a){var b=this;if(d.call(this.annotations,a)>=0)return this._apiRequest("destroy",a,function(){return b.unregisterAnnotation(a)})},e.prototype.registerAnnotation=function(a){return this.annotations.push(a)},e.prototype.unregisterAnnotation=function(a){return this.annotations.splice(this.annotations.indexOf(a),1)},e.prototype.updateAnnotation=function(a,b){return d.call(this.annotations,a)<0?console.error(Annotator._t("Trying to update unregistered annotation!")):$.extend(a,b),$(a.highlights).data("annotation",a)},e.prototype.loadAnnotations=function(){return this._apiRequest("read",null,this._onLoadAnnotations)},e.prototype._onLoadAnnotations=function(a){return a==null&&(a=[]),this.annotations=a,this.annotator.loadAnnotations(a.slice())},e.prototype.loadAnnotationsFromSearch=function(a){return this._apiRequest("search",a,this._onLoadAnnotationsFromSearch)},e.prototype._onLoadAnnotationsFromSearch=function(a){return a==null&&(a={}),this._onLoadAnnotations(a.rows||[])},e.prototype.dumpAnnotations=function(){var a,b,c,d,e;d=this.annotations,e=[];for(b=0,c=d.length;b<c;b++)a=d[b],e.push(JSON.parse(this._dataFor(a)));return e},e.prototype._apiRequest=function(a,b,c){var d,e,f,g;return d=b&&b.id,g=this._urlFor(a,d),e=this._apiRequestOptions(a,b,c),f=$.ajax(g,e),f._id=d,f._action=a,f},e.prototype._apiRequestOptions=function(a,b,c){var d;return d={type:this._methodFor(a),headers:this.element.data("annotator:headers"),dataType:"json",success:c||function(){},error:this._onError},a==="search"?d=$.extend(d,{data:b}):d=$.extend(d,{data:b&&this._dataFor(b),contentType:"application/json; charset=utf-8"}),d},e.prototype._urlFor=function(a,b){var c,d;return c=b!=null?"/"+b:"",d=this.options.prefix||"/",d+=this.options.urls[a],d=d.replace(/\/:id/,c),d},e.prototype._methodFor=function(a){var b;return b={create:"POST",read:"GET",update:"PUT",destroy:"DELETE",search:"GET"},b[a]},e.prototype._dataFor=function(a){var b,c;return c=a.highlights,delete a.highlights,$.extend(a,this.options.annotationData),b=JSON.stringify(a),c&&(a.highlights=c),b},e.prototype._onError=function(a){var b,c;b=a._action,c=Annotator._t("Sorry we could not ")+b+Annotator._t(" this annotation"),a._action==="search"?c=Annotator._t("Sorry we could not search the store for annotations"):a._action==="read"&&!a._id&&(c=Annotator._t("Sorry we could not ")+b+Annotator._t(" the annotations from the store"));switch(a.status){case 401:c=Annotator._t("Sorry you are not allowed to ")+b+Annotator._t(" this annotation");break;case 404:c=Annotator._t("Sorry we could not connect to the annotations store");break;case 500:c=Annotator._t("Sorry something went wrong with the annotation store")}return Annotator.showNotification(c,Annotator.Notification.ERROR),console.error(Annotator._t("API request failed:")+(" '"+a.status+"'"))},e}(Annotator.Plugin)})).call(this);
\ No newline at end of file
......@@ -4,7 +4,7 @@
/* Annotator styles */
.annotator-adder {
background-image: url(../annotator/img/annotator-icon-sprite.png);
background-image: url(../images/annotator-icon-sprite.png);
background-repeat: no-repeat;
margin-top: -48px;
margin-left: -24px;
......
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