Index: /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator-full.min.js
===================================================================
--- /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator-full.min.js	(revision 24776)
+++ /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator-full.min.js	(revision 24776)
@@ -0,0 +1,1 @@
+(function(){var h,o,b,p,n,i,l,a,e,d,c,r,s,j;var m=Array.prototype.slice,g=function(t,u){return function(){return t.apply(u,arguments)}},k=Object.prototype.hasOwnProperty,q=function(w,u){for(var t in u){if(k.call(u,t)){w[t]=u[t]}}function v(){this.constructor=w}v.prototype=u.prototype;w.prototype=new v;w.__super__=u.prototype;return w},f=Array.prototype.indexOf||function(v){for(var u=0,t=this.length;u<t;u++){if(this[u]===v){return u}}return -1};if(!(typeof jQuery!=="undefined"&&jQuery!==null?(j=jQuery.fn)!=null?j.jquery:void 0:void 0)){console.error("Annotator requires jQuery: have you included lib/vendor/jquery.js?")}if(!(JSON&&JSON.parse&&JSON.stringify)){console.error("Annotator requires a JSON implementation: have you included lib/vendor/json2.js?")}h=jQuery.sub();h.flatten=function(u){var t;t=function(w){var x,z,y,v;z=[];for(y=0,v=w.length;y<v;y++){x=w[y];z=z.concat(x&&h.isArray(x)?t(x):x)}return z};return t(u)};h.plugin=function(u,t){return jQuery.fn[u]=function(w){var v;v=Array.prototype.slice.call(arguments,1);return this.each(function(){var x;x=h.data(this,u);if(x){return w&&x[w].apply(x,v)}else{x=new t(this,w);return h.data(this,u,x)}})}};h.fn.textNodes=function(){var t;t=function(v){var u;if(v&&v.nodeType!==3){u=[];if(v.nodeType!==8){v=v.lastChild;while(v){u.push(t(v));v=v.previousSibling}}return u.reverse()}else{return v}};return this.map(function(){return h.flatten(t(this))})};h.fn.xpath=function(t){var u;u=this.map(function(){var w,v,x;x="";w=this;while(w&&w.nodeType===1&&w!==t){v=h(w.parentNode).children(w.tagName).index(w)+1;v=v>1?"["+v+"]":"";x="/"+w.tagName.toLowerCase()+v+x;w=w.parentNode}return x});return u.get()};h.escape=function(t){return t.replace(/&(?!\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")};h.fn.escape=function(t){if(arguments.length){return this.html(h.escape(t))}return this.html()};l=["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){if(!(console.group!=null)){console.group=function(t){return console.log("GROUP: ",t)}}if(!(console.groupCollapsed!=null)){console.groupCollapsed=console.group}for(d=0,r=l.length;d<r;d++){i=l[d];if(!(console[i]!=null)){console[i]=function(){return console.log("Not implemented: console."+name)}}}}else{this.console={};for(c=0,s=l.length;c<s;c++){i=l[c];this.console[i]=function(){}}this.console.error=function(){var t;t=1<=arguments.length?m.call(arguments,0):[];return alert("ERROR: "+(t.join(", ")))};this.console.warn=function(){var t;t=1<=arguments.length?m.call(arguments,0):[];return alert("WARNING: "+(t.join(", ")))}}b=(function(){t.prototype.events={};t.prototype.options={};t.prototype.element=null;function t(v,u){this.options=h.extend(true,{},this.options,u);this.element=h(v);this.on=this.subscribe;this.addEvents()}t.prototype.addEvents=function(){var x,z,y,u,w,B,A,v;B=this.events;v=[];for(y in B){z=B[y];A=y.split(" "),u=2<=A.length?m.call(A,0,w=A.length-1):(w=0,[]),x=A[w++];v.push(this.addEvent(u.join(" "),x,z))}return v};t.prototype.addEvent=function(u,w,x){var y,v;y=g(function(){return this[x].apply(this,arguments)},this);v=typeof u==="string"&&u.replace(/\s+/g,"")==="";if(v){u=this.element}if(typeof u==="string"){this.element.delegate(u,w,y)}else{if(this.isCustomEvent(w)){this.subscribe(w,y)}else{h(u).bind(w,y)}}return this};t.prototype.isCustomEvent=function(v){var u;u="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]+/);v=v.split(".")[0];return h.inArray(v,u)===-1};t.prototype.publish=function(){this.element.triggerHandler.apply(this.element,arguments);return this};t.prototype.subscribe=function(u,w){var v;v=function(){return w.apply(this,[].slice.call(arguments,1))};v.guid=w.guid=(h.guid+=1);this.element.bind(u,v);return this};t.prototype.unsubscribe=function(){this.element.unbind.apply(this.element,arguments);return this};return t})();p={};p.sniff=function(t){if(t.commonAncestorContainer!=null){return new p.BrowserRange(t)}else{if(typeof t.start==="string"){return new p.SerializedRange(t)}else{if(t.start&&typeof t.start==="object"){return new p.NormalizedRange(t)}else{console.error("Couldn't not sniff range type");return false}}}};p.BrowserRange=(function(){function t(u){this.commonAncestorContainer=u.commonAncestorContainer;this.startContainer=u.startContainer;this.startOffset=u.startOffset;this.endContainer=u.endContainer;this.endOffset=u.endOffset}t.prototype.normalize=function(C){var B,x,D,A,w,v,z,u,y;if(this.tainted){console.error("You may only call normalize() once on a BrowserRange!");return false}else{this.tainted=true}v={};D={};y=["start","end"];for(z=0,u=y.length;z<u;z++){w=y[z];x=this[w+"Container"];A=this[w+"Offset"];if(x.nodeType===1){B=x.childNodes[A];x=B||x.childNodes[A-1];while(x.nodeType!==3){x=x.firstChild}A=B?0:x.nodeValue.length}v[w]=x;v[w+"Offset"]=A}D.start=v.startOffset>0?v.start.splitText(v.startOffset):v.start;if(v.start===v.end){if((v.endOffset-v.startOffset)<D.start.nodeValue.length){D.start.splitText(v.endOffset-v.startOffset)}D.end=D.start}else{if(v.endOffset<v.end.nodeValue.length){v.end.splitText(v.endOffset)}D.end=v.end}D.commonAncestor=this.commonAncestorContainer;while(D.commonAncestor.nodeType!==1){D.commonAncestor=D.commonAncestor.parentNode}return new p.NormalizedRange(D)};t.prototype.serialize=function(u,v){return this.normalize(u).serialize(u,v)};return t})();p.NormalizedRange=(function(){function t(u){this.commonAncestor=u.commonAncestor;this.start=u.start;this.end=u.end}t.prototype.normalize=function(u){return this};t.prototype.limit=function(y){var u,x,v,w,A,z;u=h.grep(this.textNodes(),function(B){return B.parentNode===y||h.contains(y,B.parentNode)});if(!u.length){return null}this.start=u[0];this.end=u[u.length-1];v=h(this.start).parents();z=h(this.end).parents();for(w=0,A=z.length;w<A;w++){x=z[w];if(v.index(x)!==-1){this.commonAncestor=x;break}}return this};t.prototype.serialize=function(w,x){var v,u,y;u=function(D,C){var B,A,F,I,H,G,E,z;if(x){I=h(D).parents(":not("+x+")").eq(0)}else{I=h(D).parent()}G=I.xpath(w)[0];H=I.textNodes();A=H.slice(0,H.index(D));F=0;for(E=0,z=A.length;E<z;E++){B=A[E];F+=B.nodeValue.length}if(C){return[G,F+D.nodeValue.length]}else{return[G,F]}};y=u(this.start);v=u(this.end,true);return new p.SerializedRange({start:y[0],end:v[0],startOffset:y[1],endOffset:v[1]})};t.prototype.text=function(){var u;return((function(){var w,y,x,v;x=this.textNodes();v=[];for(w=0,y=x.length;w<y;w++){u=x[w];v.push(u.nodeValue)}return v}).call(this)).join("")};t.prototype.textNodes=function(){var u,x,v,w;v=h(this.commonAncestor).textNodes();w=[v.index(this.start),v.index(this.end)],x=w[0],u=w[1];return h.makeArray(v.slice(x,(u+1)||9000000000))};return t})();p.SerializedRange=(function(){function t(u){this.start=u.start;this.startOffset=u.startOffset;this.end=u.end;this.endOffset=u.endOffset}t.prototype._nodeFromXPath=function(u){var z,y,v,x,w;y=function(B,A){if(A==null){A=null}return document.evaluate(B,document,A,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue};if(!h.isXMLDoc(document.documentElement)){return y(u)}else{z=document.createNSResolver(document.ownerDocument===null?document.documentElement:document.ownerDocument.documentElement);x=y(u,z);if(!x){u=((function(){var B,D,C,A;C=u.split("/");A=[];for(B=0,D=C.length;B<D;B++){w=C[B];A.push(w&&w.indexOf(":")===-1?w.replace(/^([a-z]+)/,"xhtml:$1"):w)}return A})()).join("/");v=document.lookupNamespaceURI(null);z=function(A){if(A==="xhtml"){return v}else{return document.documentElement.getAttribute("xmlns:"+A)}};x=y(u,z)}return x}};t.prototype.normalize=function(G){var K,D,C,I,A,F,H,E,B,z,v,u,L,J,y,x,w;H=h(G).xpath()[0];B=this.start.split("/");C=this.end.split("/");D=[];E={};for(I=0,y=B.length;0<=y?I<y:I>y;0<=y?I++:I--){if(B[I]===C[I]){D.push(B[I])}else{break}}K=H+D.join("/");E.commonAncestorContainer=this._nodeFromXPath(K);if(!E.commonAncestorContainer){console.error("Error deserializing range: can't find XPath '"+K+"'. Is this the right document?");return null}x=["start","end"];for(v=0,L=x.length;v<L;v++){F=x[v];A=0;w=h(this._nodeFromXPath(H+this[F])).textNodes();for(u=0,J=w.length;u<J;u++){z=w[u];if(A+z.nodeValue.length>=this[F+"Offset"]){E[F+"Container"]=z;E[F+"Offset"]=this[F+"Offset"]-A;break}else{A+=z.nodeValue.length}}}return new p.BrowserRange(E).normalize(G)};t.prototype.serialize=function(u,v){return this.normalize(u).serialize(u,v)};t.prototype.toObject=function(){return{start:this.start,startOffset:this.startOffset,end:this.end,endOffset:this.endOffset}};return t})();a={getGlobal:function(){return(function(){return this})()},mousePosition:function(t,v){var u;u=h(v).offset();return{top:t.pageY-u.top,left:t.pageX-u.left}}};e=this.Annotator;o=(function(){q(t,b);t.prototype.events={".annotator-adder button click":"onAdderClick",".annotator-adder button mousedown":"onAdderMousedown",".annotator-hl mouseover":"onHighlightMouseover",".annotator-hl mouseout":"startViewerHideTimer"};t.prototype.html={hl:'<span class="annotator-hl"></span>',adder:'<div class="annotator-adder"><button>Annotate</button></div>',wrapper:'<div class="annotator-wrapper"></div>'};t.prototype.options={};t.prototype.plugins={};t.prototype.editor=null;t.prototype.viewer=null;t.prototype.selectedRanges=null;t.prototype.mouseIsDown=false;t.prototype.ignoreMouseup=false;t.prototype.viewerHideTimer=null;function t(w,v){this.onDeleteAnnotation=g(this.onDeleteAnnotation,this);this.onEditAnnotation=g(this.onEditAnnotation,this);this.onAdderClick=g(this.onAdderClick,this);this.onAdderMousedown=g(this.onAdderMousedown,this);this.onHighlightMouseover=g(this.onHighlightMouseover,this);this.checkForEndSelection=g(this.checkForEndSelection,this);this.checkForStartSelection=g(this.checkForStartSelection,this);this.clearViewerHideTimer=g(this.clearViewerHideTimer,this);this.startViewerHideTimer=g(this.startViewerHideTimer,this);this.showViewer=g(this.showViewer,this);this.onEditorSubmit=g(this.onEditorSubmit,this);this.onEditorHide=g(this.onEditorHide,this);this.showEditor=g(this.showEditor,this);var u,x,y;t.__super__.constructor.apply(this,arguments);this.plugins={};if(!t.supported()){return this}this._setupDocumentEvents()._setupWrapper()._setupViewer()._setupEditor();y=this.html;for(u in y){x=y[u];if(u!=="wrapper"){this[u]=h(x).appendTo(this.wrapper).hide()}}}t.prototype._setupWrapper=function(){this.wrapper=h(this.html.wrapper);this.element.find("script").remove();this.element.wrapInner(this.wrapper);this.wrapper=this.element.find(".annotator-wrapper");return this};t.prototype._setupViewer=function(){this.viewer=new t.Viewer();this.viewer.hide().on("edit",this.onEditAnnotation).on("delete",this.onDeleteAnnotation).addField({load:g(function(v,u){h(v).escape(u.text||"");return this.publish("annotationViewerTextField",[v,u])},this)}).element.appendTo(this.wrapper).bind({mouseover:this.clearViewerHideTimer,mouseout:this.startViewerHideTimer});return this};t.prototype._setupEditor=function(){this.editor=new t.Editor();this.editor.hide().on("hide",this.onEditorHide).on("save",this.onEditorSubmit).addField({type:"textarea",label:"Comments\u2026",load:function(v,u){return h(v).find("textarea").val(u.text||"")},submit:function(v,u){return u.text=h(v).find("textarea").val()}});this.editor.element.appendTo(this.wrapper);return this};t.prototype._setupDocumentEvents=function(){h(document).bind({mouseup:this.checkForEndSelection,mousedown:this.checkForStartSelection});return this};t.prototype.getSelectedRanges=function(){var x,v,u,w;w=a.getGlobal().getSelection();u=[];if(!w.isCollapsed){u=(function(){var z,y;y=[];for(v=0,z=w.rangeCount;0<=z?v<z:v>z;0<=z?v++:v--){x=new p.BrowserRange(w.getRangeAt(v));y.push(x.normalize().limit(this.wrapper[0]))}return y}).call(this)}return h.grep(u,function(y){return y})};t.prototype.createAnnotation=function(){var u;u={};this.publish("beforeAnnotationCreated",[u]);return u};t.prototype.setupAnnotation=function(u,w){var v,A,z,x,y,B;if(w==null){w=true}u.ranges||(u.ranges=this.selectedRanges);A=(function(){var D,F,E,C;E=u.ranges;C=[];for(D=0,F=E.length;D<F;D++){z=E[D];x=p.sniff(z);C.push(x.normalize(this.wrapper[0]))}return C}).call(this);A=h.grep(A,function(C){return C!==null});u.quote=[];u.ranges=[];u.highlights=[];for(y=0,B=A.length;y<B;y++){v=A[y];u.quote.push(h.trim(v.text()));u.ranges.push(v.serialize(this.wrapper[0],".annotator-hl"));h.merge(u.highlights,this.highlightRange(v))}u.quote=u.quote.join(" / ");h(u.highlights).data("annotation",u);if(w){this.publish("annotationCreated",[u])}return u};t.prototype.updateAnnotation=function(u){this.publish("beforeAnnotationUpdated",[u]);this.publish("annotationUpdated",[u]);return u};t.prototype.deleteAnnotation=function(u){var w,v,y,x;x=u.highlights;for(v=0,y=x.length;v<y;v++){w=x[v];h(w).replaceWith(w.childNodes)}this.publish("annotationDeleted",[u]);return u};t.prototype.loadAnnotations=function(v){var w,u;if(v==null){v=[]}u=g(function(z){var B,x,y,A;if(z==null){z=[]}x=z.splice(0,10);for(y=0,A=x.length;y<A;y++){B=x[y];this.setupAnnotation(B,false)}if(z.length>0){return setTimeout((function(){return u(z)}),100)}else{return this.publish("annotationsLoaded",[w])}},this);w=v.slice();if(v.length){u(v)}return this};t.prototype.dumpAnnotations=function(){if(this.plugins.Store){return this.plugins.Store.dumpAnnotations()}else{return console.warn("Can't dump annotations without Store plugin.")}};t.prototype.highlightRange=function(v){var u,w,x;return u=(function(){var z,B,A,y;A=v.textNodes();y=[];for(z=0,B=A.length;z<B;z++){w=A[z];x=this.hl.clone().show();y.push(h(w).wrap(x).parent().get(0))}return y}).call(this)};t.prototype.addPlugin=function(w,v){var u,x;if(this.plugins[w]){console.error("You cannot have more than one instance of any plugin.")}else{u=t.Plugin[w];if(typeof u==="function"){this.plugins[w]=new u(this.element[0],v);this.plugins[w].annotator=this;if(typeof(x=this.plugins[w]).pluginInit==="function"){x.pluginInit()}}else{console.error("Could not load "+w+" plugin. Have you included the appropriate <script> tag?")}}return this};t.prototype.showEditor=function(u,v){this.editor.element.css(v);this.editor.load(u);return this};t.prototype.onEditorHide=function(){this.publish("annotationEditorHidden",[this.editor]);return this.ignoreMouseup=false};t.prototype.onEditorSubmit=function(u){this.publish("annotationEditorSubmit",[this.editor,u]);if(u.ranges===void 0){return this.setupAnnotation(u)}else{return this.updateAnnotation(u)}};t.prototype.showViewer=function(v,u){this.viewer.element.css(u);this.viewer.load(v);return this.publish("annotationViewerShown",[this.viewer,v])};t.prototype.startViewerHideTimer=function(){if(!this.viewerHideTimer){return this.viewerHideTimer=setTimeout(h.proxy(this.viewer.hide,this.viewer),250)}};t.prototype.clearViewerHideTimer=function(){clearTimeout(this.viewerHideTimer);return this.viewerHideTimer=false};t.prototype.checkForStartSelection=function(u){if(!(u&&this.isAnnotator(u.target))){this.startViewerHideTimer();return this.mouseIsDown=true}};t.prototype.checkForEndSelection=function(x){var u,v,w,z,y;this.mouseIsDown=false;if(this.ignoreMouseup){return}this.selectedRanges=this.getSelectedRanges();y=this.selectedRanges;for(w=0,z=y.length;w<z;w++){v=y[w];u=v.commonAncestor;if(this.isAnnotator(u)){return}}if(x&&this.selectedRanges.length){return this.adder.css(a.mousePosition(x,this.wrapper[0])).show()}else{return this.adder.hide()}};t.prototype.isAnnotator=function(u){return !!h(u).parents().andSelf().filter("[class^=annotator-]").not(this.wrapper).length};t.prototype.onHighlightMouseover=function(u){var v;this.clearViewerHideTimer();if(this.mouseIsDown||this.viewer.isShown()){return false}v=h(u.target).parents(".annotator-hl").andSelf().map(function(){return h(this).data("annotation")});return this.showViewer(h.makeArray(v),a.mousePosition(u,this.wrapper[0]))};t.prototype.onAdderMousedown=function(u){if(u!=null){u.preventDefault()}return this.ignoreMouseup=true};t.prototype.onAdderClick=function(v){var u;if(v!=null){v.preventDefault()}u=this.adder.position();this.adder.hide();return this.showEditor(this.createAnnotation(),u)};t.prototype.onEditAnnotation=function(u){var v;v=this.viewer.element.position();this.viewer.hide();return this.showEditor(u,v)};t.prototype.onDeleteAnnotation=function(u){this.viewer.hide();return this.deleteAnnotation(u)};return t})();o.Plugin=(function(){q(t,b);function t(v,u){t.__super__.constructor.apply(this,arguments)}t.prototype.pluginInit=function(){};return t})();o.$=h;o.supported=function(){return(function(){return !!this.getSelection})()};o.noConflict=function(){a.getGlobal().Annotator=e;return this};h.plugin("annotator",o);this.Annotator=o;o.Widget=(function(){q(t,b);t.prototype.classes={hide:"annotator-hide",invert:{x:"annotator-invert-x",y:"annotator-invert-y"}};function t(v,u){t.__super__.constructor.apply(this,arguments);this.classes=h.extend({},o.Widget.prototype.classes,this.classes)}t.prototype.checkOrientation=function(){var x,y,u,w,v;this.resetOrientation();v=h(a.getGlobal());w=this.element.children(":first");y=w.offset();u={top:v.scrollTop(),right:v.width()+v.scrollLeft()};x={top:y.top,right:y.left+w.width()};if((x.top-u.top)<0){this.invertY()}if((x.right-u.right)>0){this.invertX()}return this};t.prototype.resetOrientation=function(){this.element.removeClass(this.classes.invert.x).removeClass(this.classes.invert.y);return this};t.prototype.invertX=function(){this.element.addClass(this.classes.invert.x);return this};t.prototype.invertY=function(){this.element.addClass(this.classes.invert.y);return this};return t})();o.Editor=(function(){q(t,o.Widget);t.prototype.events={"form submit":"submit",".annotator-save click":"submit",".annotator-cancel click":"hide",".annotator-cancel mouseover":"onCancelButtonMouseover","textarea keydown":"processKeypress"};t.prototype.classes={hide:"annotator-hide",focus:"annotator-focus"};t.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">Cancel</a>\n      <a href="#save" class="annotator-save annotator-focus">Save</a>\n    </div>\n    <span class="annotator-resize"></span>\n  </form>\n</div>';t.prototype.options={};function t(u){this.onCancelButtonMouseover=g(this.onCancelButtonMouseover,this);this.processKeypress=g(this.processKeypress,this);this.submit=g(this.submit,this);this.load=g(this.load,this);this.hide=g(this.hide,this);this.show=g(this.show,this);t.__super__.constructor.call(this,h(this.html)[0],u);this.fields=[];this.annotation={};this.setupDragabbles()}t.prototype.show=function(u){if(u!=null){u.preventDefault()}this.element.removeClass(this.classes.hide);this.element.find(".annotator-save").addClass(this.classes.focus);this.element.find(":input:first").focus();return this.checkOrientation().publish("show")};t.prototype.hide=function(u){if(u!=null){u.preventDefault()}this.element.addClass(this.classes.hide);return this.publish("hide")};t.prototype.load=function(u){var w,v,y,x;this.annotation=u;this.publish("load",[this.annotation]);x=this.fields;for(v=0,y=x.length;v<y;v++){w=x[v];w.load(w.element,this.annotation)}return this.show()};t.prototype.submit=function(v){var w,u,y,x;if(v!=null){v.preventDefault()}x=this.fields;for(u=0,y=x.length;u<y;u++){w=x[u];w.submit(w.element,this.annotation)}this.publish("save",[this.annotation]);return this.hide()};t.prototype.addField=function(v){var w,x,u;x=h.extend({id:"annotator-field-"+(new Date()).getTime(),type:"input",label:"",load:function(){},submit:function(){}},v);u=null;w=h('<li class="annotator-item" />');x.element=w[0];switch(x.type){case"textarea":u=h("<textarea />");break;case"input":case"checkbox":u=h("<input />")}w.append(u);u.attr({id:x.id,placeholder:x.label});if(x.type==="checkbox"){u[0].type="checkbox";w.addClass("annotator-checkbox");w.append(h("<label />",{"for":x.id,html:x.label}))}this.element.find("ul:first").append(w);this.fields.push(x);return x.element};t.prototype.checkOrientation=function(){var u,w,v;t.__super__.checkOrientation.apply(this,arguments);v=this.element.find("ul");u=this.element.find(".annotator-controls");w=function(){return v.children().each(function(){return h(this).parent().prepend(this)})};if(this.element.hasClass(this.classes.invert.y)&&v.is(":first-child")){u.insertBefore(v);w()}else{if(u.is(":first-child")){u.insertAfter(v);w()}}return this};t.prototype.processKeypress=function(u){if(u.keyCode===27){return this.hide()}else{if(u.keyCode===13&&!u.shiftKey){return this.submit()}}};t.prototype.onCancelButtonMouseover=function(){return this.element.find("."+this.classes.focus).removeClass(this.classes.focus)};t.prototype.setupDragabbles=function(){var w,D,z,u,y,B,x,v,A,C;u=null;w=this.classes;z=this.element;A=null;v=z.find(".annotator-resize");D=z.find(".annotator-controls");C=false;y=function(E){if(E.target===this){u={element:this,top:E.pageY,left:E.pageX};A=z.find("textarea:first");h(window).bind({"mouseup.annotator-editor-resize":x,"mousemove.annotator-editor-resize":B});return E.preventDefault()}};x=function(){u=null;return h(window).unbind(".annotator-editor-resize")};B=g(function(I){var J,G,F,E,H;if(u&&C===false){J={top:I.pageY-u.top,left:I.pageX-u.left};if(u.element===v[0]){E=A.outerHeight();H=A.outerWidth();G=z.hasClass(w.invert.x)?-1:1;F=z.hasClass(w.invert.y)?1:-1;A.height(E+(J.top*F));A.width(H+(J.left*G));if(A.outerHeight()!==E){u.top=I.pageY}if(A.outerWidth()!==H){u.left=I.pageX}}else{if(u.element===D[0]){z.css({top:parseInt(z.css("top"),10)+J.top,left:parseInt(z.css("left"),10)+J.left});u.top=I.pageY;u.left=I.pageX}}C=true;return setTimeout(function(){return C=false},1000/60)}},this);v.bind("mousedown",y);return D.bind("mousedown",y)};return t})();o.Viewer=(function(){q(t,o.Widget);t.prototype.events={".annotator-edit click":"onEditClick",".annotator-delete click":"onDeleteClick"};t.prototype.classes={hide:"annotator-hide",showControls:"annotator-visible"};t.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    <button class="annotator-edit">Edit</button>\n    <button class="annotator-delete">Delete</button>\n  </span>\n</li>'};function t(u){this.onDeleteClick=g(this.onDeleteClick,this);this.onEditClick=g(this.onEditClick,this);this.load=g(this.load,this);this.hide=g(this.hide,this);this.show=g(this.show,this);t.__super__.constructor.call(this,h(this.html.element)[0],u);this.item=h(this.html.item)[0];this.fields=[];this.annotations=[]}t.prototype.show=function(v){var u;if(v!=null){v.preventDefault()}u=this.element.find(".annotator-controls").addClass(this.classes.showControls);setTimeout((g(function(){return u.removeClass(this.classes.showControls)},this)),500);this.element.removeClass(this.classes.hide);return this.checkOrientation().publish("show")};t.prototype.isShown=function(){return !this.element.hasClass(this.classes.hide)};t.prototype.hide=function(u){if(u!=null){u.preventDefault()}this.element.addClass(this.classes.hide);return this.publish("hide")};t.prototype.load=function(C){var z,B,G,H,F,A,E,I,D,y,w,u,J,x,v;this.annotations=C||[];D=this.element.find("ul:first").empty();x=this.annotations;for(y=0,u=x.length;y<u;y++){z=x[y];I=h(this.item).clone().appendTo(D).data("annotation",z);G=I.find(".annotator-controls");F=G.find(".annotator-edit");H=G.find(".annotator-delete");B={showEdit:function(){return F.removeAttr("disabled")},hideEdit:function(){return F.attr("disabled","disabled")},showDelete:function(){return H.removeAttr("disabled")},hideDelete:function(){return H.attr("disabled","disabled")}};v=this.fields;for(w=0,J=v.length;w<J;w++){E=v[w];A=h(E.element).clone().appendTo(I)[0];E.load(A,z,B)}}this.publish("load",[this.annotations]);return this.show()};t.prototype.addField=function(u){var v;v=h.extend({load:function(){}},u);v.element=h("<div />")[0];this.fields.push(v);v.element;return this};t.prototype.onEditClick=function(u){return this.onButtonClick(u,"edit")};t.prototype.onDeleteClick=function(u){return this.onButtonClick(u,"delete")};t.prototype.onButtonClick=function(w,u){var v;v=h(w.target).parents(".annotator-annotation");return this.publish(u,[v.data("annotation")])};return t})();o=o||{};o.Notification=(function(){q(t,b);t.prototype.events={click:"hide"};t.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"}};function t(u){this.hide=g(this.hide,this);this.show=g(this.show,this);t.__super__.constructor.call(this,h(this.options.html).appendTo(document.body)[0],u)}t.prototype.show=function(v,u){if(u==null){u=o.Notification.INFO}h(this.element).addClass(this.options.classes.show).addClass(this.options.classes[u]).escape(v||"");setTimeout(this.hide,5000);return this};t.prototype.hide=function(){h(this.element).removeClass(this.options.classes.show);return this};return t})();o.Notification.INFO="show";o.Notification.SUCCESS="success";o.Notification.ERROR="error";h(function(){var t;t=new o.Notification;o.showNotification=t.show;return o.hideNotification=t.hide});o.Plugin.Tags=(function(){q(t,o.Plugin);function t(){this.setAnnotationTags=g(this.setAnnotationTags,this);this.updateField=g(this.updateField,this);t.__super__.constructor.apply(this,arguments)}t.prototype.field=null;t.prototype.input=null;t.prototype.pluginInit=function(){if(!o.supported()){return}this.field=this.annotator.editor.addField({label:"Add some tags here\u2026",load:this.updateField,submit:this.setAnnotationTags});this.annotator.viewer.addField({load:this.updateViewer});if(this.annotator.plugins.Filter){this.annotator.plugins.Filter.addFilter({label:"Tag",property:"tags",isFiltered:o.Plugin.Tags.filterCallback})}return this.input=h(this.field).find(":input")};t.prototype.parseTags=function(v){var u;v=h.trim(v);u=[];if(v){u=v.split(/\s+/)}return u};t.prototype.stringifyTags=function(u){return u.join(" ")};t.prototype.updateField=function(w,u){var v;v="";if(u.tags){v=this.stringifyTags(u.tags)}return this.input.val(v)};t.prototype.setAnnotationTags=function(v,u){return u.tags=this.parseTags(this.input.val())};t.prototype.updateViewer=function(v,u){v=h(v);if(u.tags&&h.isArray(u.tags)&&u.tags.length){return v.addClass("annotator-tags").html(function(){var w;return w=h.map(u.tags,function(x){return'<span class="annotator-tag">'+o.$.escape(x)+"</span>"}).join(" ")})}else{return v.remove()}};return t})();o.Plugin.Tags.filterCallback=function(z,B){var y,x,w,C,v,u,t,A;if(B==null){B=[]}w=0;x=[];if(z){x=z.split(/\s+/g);for(v=0,t=x.length;v<t;v++){y=x[v];if(B.length){for(u=0,A=B.length;u<A;u++){C=B[u];if(C.indexOf(y)!==-1){w+=1}}}}}return w===x.length};n=function(u){var y,t,x,v,w,z;v="([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})))?)?)?)?";y=u.match(new RegExp(v));x=0;t=new Date(y[1],0,1);if(y[3]){t.setMonth(y[3]-1)}if(y[5]){t.setDate(y[5])}if(y[7]){t.setHours(y[7])}if(y[8]){t.setMinutes(y[8])}if(y[10]){t.setSeconds(y[10])}if(y[12]){t.setMilliseconds(Number("0."+y[12])*1000)}if(y[14]){x=(Number(y[16])*60)+Number(y[17]);x*=(z=y[15]==="-")!=null?z:{1:-1}}x-=t.getTimezoneOffset();w=Number(t)+(x*60*1000);t.setTime(Number(w));return t};o.Plugin.Auth=(function(){q(t,o.Plugin);t.prototype.options={token:null,tokenUrl:"/auth/token",autoFetch:true};function t(v,u){this.haveValidToken=g(this.haveValidToken,this);t.__super__.constructor.apply(this,arguments);this.element.data("annotator:auth",this);this.waitingForToken=[];if(this.options.token){this.setToken(this.options.token)}else{this.requestToken()}}t.prototype.requestToken=function(){this.requestInProgress=true;return h.getJSON(this.options.tokenUrl,g(function(v,u,w){if(u!=="success"){return console.error("Couldn't get auth token: "+u,w)}else{this.setToken(v);return this.requestInProgress=false}},this))};t.prototype.setToken=function(v){var u;this.token=v;if(this.haveValidToken()){if(this.options.autoFetch){this.refreshTimeout=setTimeout((g(function(){return this.requestToken()},this)),(this.timeToExpiry()-2)*1000)}this.updateHeaders();u=[];while(this.waitingForToken.length>0){u.push(this.waitingForToken.pop().apply())}return u}else{console.warn("Didn't get a valid token.");if(this.options.autoFetch){console.warn("Getting a new token in 10s.");return setTimeout((g(function(){return this.requestToken()},this)),10*1000)}}};t.prototype.haveValidToken=function(){var u;u=this.token&&this.token.authToken&&this.token.authTokenIssueTime&&this.token.authTokenTTL&&this.token.accountId&&this.token.userId;return u&&this.timeToExpiry()>0};t.prototype.timeToExpiry=function(){var w,u,v,x;v=new Date().getTime()/1000;u=n(this.token.authTokenIssueTime).getTime()/1000;w=u+this.token.authTokenTTL;x=w-v;if(x>0){return x}else{return 0}};t.prototype.updateHeaders=function(){var u;u=this.element.data("annotator:headers");return this.element.data("annotator:headers",h.extend(u,{"x-annotator-auth-token":this.token.authToken,"x-annotator-auth-token-issue-time":this.token.authTokenIssueTime,"x-annotator-auth-token-ttl":this.token.authTokenTTL,"x-annotator-account-id":this.token.accountId,"x-annotator-user-id":this.token.userId}))};t.prototype.withToken=function(u){if(!(u!=null)){return}if(this.haveValidToken()){return u()}else{this.waitingForToken.push(u);if(!this.requestInProgress){return this.requestToken()}}};return t})();o.Plugin.Store=(function(){q(t,o.Plugin);t.prototype.events={annotationCreated:"annotationCreated",annotationDeleted:"annotationDeleted",annotationUpdated:"annotationUpdated"};t.prototype.options={prefix:"/store",autoFetch:true,annotationData:{},loadFromSearch:false,urls:{create:"/annotations",read:"/annotations/:id",update:"/annotations/:id",destroy:"/annotations/:id",search:"/search"}};function t(v,u){this._onError=g(this._onError,this);this._onBeforeSend=g(this._onBeforeSend,this);this._onLoadAnnotationsFromSearch=g(this._onLoadAnnotationsFromSearch,this);this._onLoadAnnotations=g(this._onLoadAnnotations,this);this._getAnnotations=g(this._getAnnotations,this);t.__super__.constructor.apply(this,arguments);this.annotations=[]}t.prototype.pluginInit=function(){var u;if(!o.supported()){return}u=this.element.data("annotator:auth");if(u){return u.withToken(this._getAnnotations)}else{return this._getAnnotations()}};t.prototype._getAnnotations=function(){if(this.options.loadFromSearch){return this.loadAnnotationsFromSearch(this.options.loadFromSearch)}else{return this.loadAnnotations()}};t.prototype.annotationCreated=function(u){if(f.call(this.annotations,u)<0){this.registerAnnotation(u);return this._apiRequest("create",u,g(function(v){if(!(v.id!=null)){console.warn("Warning: No ID returned from server for annotation ",u)}return this.updateAnnotation(u,v)},this))}else{return this.updateAnnotation(u,{})}};t.prototype.annotationUpdated=function(u){if(f.call(this.annotations,u)>=0){return this._apiRequest("update",u,(g(function(v){return this.updateAnnotation(u,v)},this)))}};t.prototype.annotationDeleted=function(u){if(f.call(this.annotations,u)>=0){return this._apiRequest("destroy",u,(g(function(){return this.unregisterAnnotation(u)},this)))}};t.prototype.registerAnnotation=function(u){return this.annotations.push(u)};t.prototype.unregisterAnnotation=function(u){return this.annotations.splice(this.annotations.indexOf(u),1)};t.prototype.updateAnnotation=function(u,v){if(f.call(this.annotations,u)<0){console.error("Trying to update unregistered annotation!")}else{h.extend(u,v)}return h(u.highlights).data("annotation",u)};t.prototype.loadAnnotations=function(){return this._apiRequest("read",null,this._onLoadAnnotations)};t.prototype._onLoadAnnotations=function(u){if(u==null){u=[]}this.annotations=u;return this.annotator.loadAnnotations(u.slice())};t.prototype.loadAnnotationsFromSearch=function(u){return this._apiRequest("search",u,this._onLoadAnnotationsFromSearch)};t.prototype._onLoadAnnotationsFromSearch=function(u){if(u==null){u={}}return this._onLoadAnnotations(u.rows||[])};t.prototype.dumpAnnotations=function(){var w,v,y,x,u;x=this.annotations;u=[];for(v=0,y=x.length;v<y;v++){w=x[v];u.push(JSON.parse(this._dataFor(w)))}return u};t.prototype._apiRequest=function(x,y,z){var A,v,w,u;A=y&&y.id;u=this._urlFor(x,A);v=this._apiRequestOptions(x,y,z);w=h.ajax(u,v);w._id=A;w._action=x;return w};t.prototype._apiRequestOptions=function(v,w,x){var u;u={type:this._methodFor(v),beforeSend:this._onBeforeSend,dataType:"json",success:x||function(){},error:this._onError};if(v==="search"){u=h.extend(u,{data:w})}else{u=h.extend(u,{data:w&&this._dataFor(w),contentType:"application/json; charset=utf-8"})}return u};t.prototype._urlFor=function(w,x){var u,v;u=x!=null?"/"+x:"";v=this.options.prefix||"/";v+=this.options.urls[w];v=v.replace(/\/:id/,u);return v};t.prototype._methodFor=function(v){var u;u={create:"POST",read:"GET",update:"PUT",destroy:"DELETE",search:"GET"};return u[v]};t.prototype._dataFor=function(u){var v,w;w=u.highlights;delete u.highlights;h.extend(u,this.options.annotationData);v=JSON.stringify(u);if(w){u.highlights=w}return v};t.prototype._onBeforeSend=function(y){var x,v,w,u;x=this.element.data("annotator:headers");if(x){u=[];for(v in x){w=x[v];u.push(y.setRequestHeader(v,w))}return u}};t.prototype._onError=function(w){var v,u;v=w._action;u="Sorry we could not "+v+" this annotation";if(w._action==="search"){u="Sorry we could not search the store for annotations"}else{if(w._action==="read"&&!w._id){u="Sorry we could not "+v+" the annotations from the store"}}switch(w.status){case 401:u="Sorry you are not allowed to "+v+" this annotation";break;case 404:u="Sorry we could not connect to the annotations store";break;case 500:u="Sorry something went wrong with the annotation store"}o.showNotification(u,o.Notification.ERROR);return console.error("API request failed: '"+w.status+"'")};return t})();o.Plugin.Filter=(function(){q(t,o.Plugin);t.prototype.events={".annotator-filter-property input focus":"_onFilterFocus",".annotator-filter-property input blur":"_onFilterBlur",".annotator-filter-property input keyup":"_onFilterKeyup",".annotator-filter-previous click":"_onPreviousClick",".annotator-filter-next click":"_onNextClick",".annotator-filter-clear click":"_onClearClick"};t.prototype.classes={active:"annotator-filter-active",hl:{hide:"annotator-hl-filtered",active:"annotator-hl-active"}};t.prototype.html={element:'<div class="annotator-filter">\n  <strong>Navigate:</strong>\n  <span class="annotator-filter-navigation">\n    <button class="annotator-filter-previous">Previous</button>\n    <button class="annotator-filter-next">Next</button>\n  </span>\n  <strong>Filter by:</strong>\n</div>',filter:'<span class="annotator-filter-property">\n  <label></label>\n  <input/>\n  <button class="annotator-filter-clear">Clear</button>\n</span>'};t.prototype.options={appendTo:"body",filters:[],addAnnotationFilter:true,isFiltered:function(v,x){var u,w,z,y;if(!(v&&x)){return false}y=v.split(/\s*/);for(w=0,z=y.length;w<z;w++){u=y[w];if(x.indexOf(u)===-1){return false}}return true}};function t(v,u){this._onPreviousClick=g(this._onPreviousClick,this);this._onNextClick=g(this._onNextClick,this);this._onFilterKeyup=g(this._onFilterKeyup,this);this._onFilterBlur=g(this._onFilterBlur,this);this._onFilterFocus=g(this._onFilterFocus,this);this.updateHighlights=g(this.updateHighlights,this);v=h(this.html.element).appendTo(this.options.appendTo);t.__super__.constructor.call(this,v,u);this.filter=h(this.html.filter);this.filters=[];this.current=0}t.prototype.pluginInit=function(){var v,u,x,w;w=this.options.filters;for(u=0,x=w.length;u<x;u++){v=w[u];this.addFilter(v)}this.updateHighlights();this._setupListeners()._insertSpacer();if(this.options.addAnnotationFilter===true){return this.addFilter({label:"Annotation",property:"text"})}};t.prototype._insertSpacer=function(){var v,u;u=h("html");v=parseInt(u.css("padding-top"),10)||0;u.css("padding-top",v+this.element.outerHeight());return this};t.prototype._setupListeners=function(){var w,u,v,x;u=["annotationsLoaded","annotationCreated","annotationUpdated","annotationDeleted"];for(v=0,x=u.length;v<x;v++){w=u[v];this.annotator.subscribe(w,this.updateHighlights)}return this};t.prototype.addFilter=function(u){var w,v;v=h.extend({label:"",property:"",isFiltered:this.options.isFiltered},u);if(!((function(){var y,A,z,x;z=this.filters;x=[];for(y=0,A=z.length;y<A;y++){w=z[y];if(w.property===v.property){x.push(w)}}return x}).call(this)).length){v.id="annotator-filter-"+v.property;v.annotations=[];v.element=this.filter.clone().appendTo(this.element);v.element.find("label").html(v.label).attr("for",v.id);v.element.find("input").attr({id:v.id,placeholder:"Filter by "+v.label+"\u2026"});v.element.find("button").hide();v.element.data("filter",v);this.filters.push(v)}return this};t.prototype.updateFilter=function(x){var u,z,v,y,w,B,A;x.annotations=[];this.updateHighlights();this.resetHighlights();v=h.trim(x.element.find("input").val());if(v){z=this.highlights.map(function(){return h(this).data("annotation")});A=h.makeArray(z);for(w=0,B=A.length;w<B;w++){u=A[w];y=u[x.property];if(x.isFiltered(v,y)){x.annotations.push(u)}}return this.filterHighlights()}};t.prototype.updateHighlights=function(){this.highlights=this.annotator.element.find(".annotator-hl:visible");return this.filtered=this.highlights.not(this.classes.hl.hide)};t.prototype.filterHighlights=function(){var v,x,y,B,z,A,C,u,w;v=h.grep(this.filters,function(D){return !!D.annotations.length});B=((w=v[0])!=null?w.annotations:void 0)||[];if(v.length>1){y=[];h.each(v,function(){return h.merge(y,this.annotations)});C=[];B=[];h.each(y,function(){if(h.inArray(this,C)===-1){return C.push(this)}else{return B.push(this)}})}z=this.highlights;for(A=0,u=B.length;A<u;A++){x=B[A];z=z.not(x.highlights)}z.addClass(this.classes.hl.hide);this.filtered=this.highlights.not(this.classes.hl.hide);return this};t.prototype.resetHighlights=function(){this.highlights.removeClass(this.classes.hl.hide);this.filtered=this.highlights;return this};t.prototype._onFilterFocus=function(v){var u;u=h(v.target);u.parent().addClass(this.classes.active);return u.next("button").show()};t.prototype._onFilterBlur=function(v){var u;if(!v.target.value){u=h(v.target);u.parent().removeClass(this.classes.active);return u.next("button").hide()}};t.prototype._onFilterKeyup=function(v){var u;u=h(v.target).parent().data("filter");if(u){return this.updateFilter(u)}};t.prototype._findNextHighlight=function(z){var v,w,B,A,y,x,u,C;if(!this.highlights.length){return this}x=z?0:-1;C=z?-1:0;u=z?"lt":"gt";v=this.highlights.not("."+this.classes.hl.hide);B=v.filter("."+this.classes.hl.active);if(!B.length){B=v.eq(x)}w=B.data("annotation");A=v.index(B[0]);y=v.filter(":"+u+"("+A+")").not(w.highlights).eq(C);if(!y.length){y=v.eq(C)}return this._scrollToHighlight(y.data("annotation").highlights)};t.prototype._onNextClick=function(u){return this._findNextHighlight()};t.prototype._onPreviousClick=function(u){return this._findNextHighlight(true)};t.prototype._scrollToHighlight=function(u){u=h(u);this.highlights.removeClass(this.classes.hl.active);u.addClass(this.classes.hl.active);return h("html, body").animate({scrollTop:u.offset().top-(this.element.height()+20)},150)};t.prototype._onClearClick=function(u){return h(u.target).prev("input").val("").keyup().blur()};return t})();o.Plugin.Markdown=(function(){q(t,o.Plugin);t.prototype.events={annotationViewerTextField:"updateTextField"};function t(v,u){this.updateTextField=g(this.updateTextField,this);if((typeof Showdown!=="undefined"&&Showdown!==null?Showdown.converter:void 0)!=null){t.__super__.constructor.apply(this,arguments);this.converter=new Showdown.converter()}else{console.error("To use the Markdown plugin, you must include Showdown into the page first.")}}t.prototype.updateTextField=function(v,u){var w;w=o.$.escape(u.text||"");return h(v).html(this.convert(w))};t.prototype.convert=function(u){return this.converter.makeHtml(u)};return t})();o.Plugin.Unsupported=(function(){q(t,o.Plugin);function t(){t.__super__.constructor.apply(this,arguments)}t.prototype.options={message:"Sorry your current browser does not support the Annotator"};t.prototype.pluginInit=function(){if(!o.supported()){return h(g(function(){o.showNotification(this.options.message);if((window.XMLHttpRequest===void 0)&&(ActiveXObject!==void 0)){return h("html").addClass("ie6")}},this))}};return t})();o.Plugin.Permissions=(function(){q(t,o.Plugin);t.prototype.events={beforeAnnotationCreated:"addFieldsToAnnotation"};t.prototype.options={showViewPermissionsCheckbox:true,showEditPermissionsCheckbox:true,userId:function(u){return u},userString:function(u){return u},userAuthorize:function(u,v){return this.userId(u)===v},user:"",permissions:{read:[],update:[],"delete":[],admin:[]}};function t(v,u){this.updateViewer=g(this.updateViewer,this);this.updateAnnotationPermissions=g(this.updateAnnotationPermissions,this);this.updatePermissionsField=g(this.updatePermissionsField,this);this.addFieldsToAnnotation=g(this.addFieldsToAnnotation,this);t.__super__.constructor.apply(this,arguments);if(this.options.user){this.setUser(this.options.user);delete this.options.user}}t.prototype.pluginInit=function(){var u,v;if(!o.supported()){return}v=this;u=function(x,w){return function(z,y){return v[x].call(v,w,z,y)}};if(this.options.showViewPermissionsCheckbox===true){this.annotator.editor.addField({type:"checkbox",label:"Allow anyone to <strong>view</strong> this annotation",load:u("updatePermissionsField","read"),submit:u("updateAnnotationPermissions","read")})}if(this.options.showEditPermissionsCheckbox===true){this.annotator.editor.addField({type:"checkbox",label:"Allow anyone to <strong>edit</strong> this annotation",load:u("updatePermissionsField","update"),submit:u("updateAnnotationPermissions","update")})}this.annotator.viewer.addField({load:this.updateViewer});if(this.annotator.plugins.Filter){return this.annotator.plugins.Filter.addFilter({label:"User",property:"user",isFiltered:g(function(y,x){var w,z,B,A;x=this.options.userString(x);if(!(y&&x)){return false}A=y.split(/\s*/);for(z=0,B=A.length;z<B;z++){w=A[z];if(x.indexOf(w)===-1){return false}}return true},this)})}};t.prototype.setUser=function(u){return this.user=u};t.prototype.addFieldsToAnnotation=function(u){if(u){u.permissions=this.options.permissions;if(this.user){return u.user=this.user}}};t.prototype.authorize=function(y,u,v){var w,z,x,A;if(v===void 0){v=this.user}if(u.permissions){z=u.permissions[y]||[];if(z.length===0){return true}for(x=0,A=z.length;x<A;x++){w=z[x];if(this.options.userAuthorize.call(this.options,v,w)){return true}}return false}else{if(u.user){return v&&this.options.userId(v)===u.user}}return true};t.prototype.updatePermissionsField=function(w,y,u){var x,v;y=h(y).show();v=y.find("input").removeAttr("disabled");if(!this.authorize("admin",u)){y.hide()}if(this.authorize(w,u||{},null)){v.attr("checked","checked");x={permissions:this.options.permissions};if(this.authorize(w,x,null)){return v.attr("disabled","disabled")}}else{return v.removeAttr("checked")}};t.prototype.updateAnnotationPermissions=function(w,x,u){var y,v;if(!u.permissions){u.permissions=this.options.permissions}y=w+"-permissions";if(h(x).find("input").is(":checked")){h.data(u,y,u.permissions[w]);return u.permissions[w]=[]}else{v=h.data(u,y);if(v){return u.permissions[w]=v}}};t.prototype.updateViewer=function(x,u,w){var v,y;x=h(x);y=this.options.userString(u.user);if(u.user&&y&&typeof y==="string"){v=o.$.escape(this.options.userString(u.user));x.html(v).addClass("annotator-user")}else{x.remove()}if(u.permissions){if(!this.authorize("update",u)){w.hideEdit()}if(!this.authorize("delete",u)){return w.hideDelete()}}else{if(u.user&&!this.authorize(null,u)){w.hideEdit();return w.hideDelete()}}};return t})();o.prototype.setupPlugins=function(w,E){var B,D,u,t,y,v,A,C,z,x;if(w==null){w={}}if(E==null){E={}}z=a.getGlobal();y={Tags:{},Filter:{filters:[{label:"User",property:"user"},{label:"Tags",property:"tags"}]},Unsupported:{}};if(z.Showdown){y.Markdown={}}A=w.userId,C=w.userName,B=w.accountId,D=w.authToken;if(A&&C&&B&&D){v=z.location.href.split(/#|\?/).shift()||"";h.extend(y,{Store:{prefix:w.storeUri||"http://annotateit.org/api",annotationData:{uri:v},loadFromSearch:{uri:v,all_fields:1}},Permissions:{user:{id:w.userId,name:w.userName},permissions:{read:[w.userId],update:[w.userId],"delete":[w.userId],admin:[w.userId]},userId:function(F){if(F!=null?F.id:void 0){return F.id}else{return""}},userString:function(F){if(F!=null?F.name:void 0){return F.name}else{return""}}}});this.element.data({"annotator:headers":{"X-Annotator-User-Id":w.userId,"X-Annotator-Account-Id":w.accountId,"X-Annotator-Auth-Token":w.authToken}})}h.extend(y,E);x=[];for(u in y){if(!k.call(y,u)){continue}t=y[u];if(t!==null&&t!==false){x.push(this.addPlugin(u,t))}}return x}}).call(this);
Index: /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.auth.min.js
===================================================================
--- /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.auth.min.js	(revision 24776)
+++ /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.auth.min.js	(revision 24776)
@@ -0,0 +1,142 @@
+(function() {
+  var createDateFromISO8601;
+  var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.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;
+  };
+  createDateFromISO8601 = function(string) {
+    var d, date, offset, regexp, time, _ref;
+    regexp = "([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})))?)?)?)?";
+    d = string.match(new RegExp(regexp));
+    offset = 0;
+    date = new Date(d[1], 0, 1);
+    if (d[3]) {
+      date.setMonth(d[3] - 1);
+    }
+    if (d[5]) {
+      date.setDate(d[5]);
+    }
+    if (d[7]) {
+      date.setHours(d[7]);
+    }
+    if (d[8]) {
+      date.setMinutes(d[8]);
+    }
+    if (d[10]) {
+      date.setSeconds(d[10]);
+    }
+    if (d[12]) {
+      date.setMilliseconds(Number("0." + d[12]) * 1000);
+    }
+    if (d[14]) {
+      offset = (Number(d[16]) * 60) + Number(d[17]);
+      offset *= (_ref = d[15] === '-') != null ? _ref : {
+        1: -1
+      };
+    }
+    offset -= date.getTimezoneOffset();
+    time = Number(date) + (offset * 60 * 1000);
+    date.setTime(Number(time));
+    return date;
+  };
+  Annotator.Plugin.Auth = (function() {
+    __extends(Auth, Annotator.Plugin);
+    Auth.prototype.options = {
+      token: null,
+      tokenUrl: '/auth/token',
+      autoFetch: true
+    };
+    function Auth(element, options) {
+      this.haveValidToken = __bind(this.haveValidToken, this);      Auth.__super__.constructor.apply(this, arguments);
+      this.element.data('annotator:auth', this);
+      this.waitingForToken = [];
+      if (this.options.token) {
+        this.setToken(this.options.token);
+      } else {
+        this.requestToken();
+      }
+    }
+    Auth.prototype.requestToken = function() {
+      this.requestInProgress = true;
+      return $.getJSON(this.options.tokenUrl, __bind(function(data, status, xhr) {
+        if (status !== 'success') {
+          return console.error("Couldn't get auth token: " + status, xhr);
+        } else {
+          this.setToken(data);
+          return this.requestInProgress = false;
+        }
+      }, this));
+    };
+    Auth.prototype.setToken = function(token) {
+      var _results;
+      this.token = token;
+      if (this.haveValidToken()) {
+        if (this.options.autoFetch) {
+          this.refreshTimeout = setTimeout((__bind(function() {
+            return this.requestToken();
+          }, this)), (this.timeToExpiry() - 2) * 1000);
+        }
+        this.updateHeaders();
+        _results = [];
+        while (this.waitingForToken.length > 0) {
+          _results.push(this.waitingForToken.pop().apply());
+        }
+        return _results;
+      } else {
+        console.warn("Didn't get a valid token.");
+        if (this.options.autoFetch) {
+          console.warn("Getting a new token in 10s.");
+          return setTimeout((__bind(function() {
+            return this.requestToken();
+          }, this)), 10 * 1000);
+        }
+      }
+    };
+    Auth.prototype.haveValidToken = function() {
+      var allFields;
+      allFields = this.token && this.token.authToken && this.token.authTokenIssueTime && this.token.authTokenTTL && this.token.accountId && this.token.userId;
+      return allFields && this.timeToExpiry() > 0;
+    };
+    Auth.prototype.timeToExpiry = function() {
+      var expiry, issue, now, timeToExpiry;
+      now = new Date().getTime() / 1000;
+      issue = createDateFromISO8601(this.token.authTokenIssueTime).getTime() / 1000;
+      expiry = issue + this.token.authTokenTTL;
+      timeToExpiry = expiry - now;
+      if (timeToExpiry > 0) {
+        return timeToExpiry;
+      } else {
+        return 0;
+      }
+    };
+    Auth.prototype.updateHeaders = function() {
+      var current;
+      current = this.element.data('annotator:headers');
+      return this.element.data('annotator:headers', $.extend(current, {
+        'x-annotator-auth-token': this.token.authToken,
+        'x-annotator-auth-token-issue-time': this.token.authTokenIssueTime,
+        'x-annotator-auth-token-ttl': this.token.authTokenTTL,
+        'x-annotator-account-id': this.token.accountId,
+        'x-annotator-user-id': this.token.userId
+      }));
+    };
+    Auth.prototype.withToken = function(callback) {
+      if (!(callback != null)) {
+        return;
+      }
+      if (this.haveValidToken()) {
+        return callback();
+      } else {
+        this.waitingForToken.push(callback);
+        if (!this.requestInProgress) {
+          return this.requestToken();
+        }
+      }
+    };
+    return Auth;
+  })();
+}).call(this);
Index: /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.filter.min.js
===================================================================
--- /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.filter.min.js	(revision 24776)
+++ /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.filter.min.js	(revision 24776)
@@ -0,0 +1,248 @@
+(function() {
+  var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.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;
+  };
+  Annotator.Plugin.Filter = (function() {
+    __extends(Filter, Annotator.Plugin);
+    Filter.prototype.events = {
+      ".annotator-filter-property input focus": "_onFilterFocus",
+      ".annotator-filter-property input blur": "_onFilterBlur",
+      ".annotator-filter-property input keyup": "_onFilterKeyup",
+      ".annotator-filter-previous click": "_onPreviousClick",
+      ".annotator-filter-next click": "_onNextClick",
+      ".annotator-filter-clear click": "_onClearClick"
+    };
+    Filter.prototype.classes = {
+      active: 'annotator-filter-active',
+      hl: {
+        hide: 'annotator-hl-filtered',
+        active: 'annotator-hl-active'
+      }
+    };
+    Filter.prototype.html = {
+      element: "<div class=\"annotator-filter\">\n  <strong>Navigate:</strong>\n  <span class=\"annotator-filter-navigation\">\n    <button class=\"annotator-filter-previous\">Previous</button>\n    <button class=\"annotator-filter-next\">Next</button>\n  </span>\n  <strong>Filter by:</strong>\n</div>",
+      filter: "<span class=\"annotator-filter-property\">\n  <label></label>\n  <input/>\n  <button class=\"annotator-filter-clear\">Clear</button>\n</span>"
+    };
+    Filter.prototype.options = {
+      appendTo: 'body',
+      filters: [],
+      addAnnotationFilter: true,
+      isFiltered: function(input, property) {
+        var keyword, _i, _len, _ref;
+        if (!(input && property)) {
+          return false;
+        }
+        _ref = input.split(/\s*/);
+        for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+          keyword = _ref[_i];
+          if (property.indexOf(keyword) === -1) {
+            return false;
+          }
+        }
+        return true;
+      }
+    };
+    function Filter(element, options) {
+      this._onPreviousClick = __bind(this._onPreviousClick, this);
+      this._onNextClick = __bind(this._onNextClick, this);
+      this._onFilterKeyup = __bind(this._onFilterKeyup, this);
+      this._onFilterBlur = __bind(this._onFilterBlur, this);
+      this._onFilterFocus = __bind(this._onFilterFocus, this);
+      this.updateHighlights = __bind(this.updateHighlights, this);      element = $(this.html.element).appendTo(this.options.appendTo);
+      Filter.__super__.constructor.call(this, element, options);
+      this.filter = $(this.html.filter);
+      this.filters = [];
+      this.current = 0;
+    }
+    Filter.prototype.pluginInit = function() {
+      var filter, _i, _len, _ref;
+      _ref = this.options.filters;
+      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+        filter = _ref[_i];
+        this.addFilter(filter);
+      }
+      this.updateHighlights();
+      this._setupListeners()._insertSpacer();
+      if (this.options.addAnnotationFilter === true) {
+        return this.addFilter({
+          label: 'Annotation',
+          property: 'text'
+        });
+      }
+    };
+    Filter.prototype._insertSpacer = function() {
+      var currentMargin, html;
+      html = $('html');
+      currentMargin = parseInt(html.css('padding-top'), 10) || 0;
+      html.css('padding-top', currentMargin + this.element.outerHeight());
+      return this;
+    };
+    Filter.prototype._setupListeners = function() {
+      var event, events, _i, _len;
+      events = ['annotationsLoaded', 'annotationCreated', 'annotationUpdated', 'annotationDeleted'];
+      for (_i = 0, _len = events.length; _i < _len; _i++) {
+        event = events[_i];
+        this.annotator.subscribe(event, this.updateHighlights);
+      }
+      return this;
+    };
+    Filter.prototype.addFilter = function(options) {
+      var f, filter;
+      filter = $.extend({
+        label: '',
+        property: '',
+        isFiltered: this.options.isFiltered
+      }, options);
+      if (!((function() {
+        var _i, _len, _ref, _results;
+        _ref = this.filters;
+        _results = [];
+        for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+          f = _ref[_i];
+          if (f.property === filter.property) {
+            _results.push(f);
+          }
+        }
+        return _results;
+      }).call(this)).length) {
+        filter.id = 'annotator-filter-' + filter.property;
+        filter.annotations = [];
+        filter.element = this.filter.clone().appendTo(this.element);
+        filter.element.find('label').html(filter.label).attr('for', filter.id);
+        filter.element.find('input').attr({
+          id: filter.id,
+          placeholder: 'Filter by ' + filter.label + '\u2026'
+        });
+        filter.element.find('button').hide();
+        filter.element.data('filter', filter);
+        this.filters.push(filter);
+      }
+      return this;
+    };
+    Filter.prototype.updateFilter = function(filter) {
+      var annotation, annotations, input, property, _i, _len, _ref;
+      filter.annotations = [];
+      this.updateHighlights();
+      this.resetHighlights();
+      input = $.trim(filter.element.find('input').val());
+      if (input) {
+        annotations = this.highlights.map(function() {
+          return $(this).data('annotation');
+        });
+        _ref = $.makeArray(annotations);
+        for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+          annotation = _ref[_i];
+          property = annotation[filter.property];
+          if (filter.isFiltered(input, property)) {
+            filter.annotations.push(annotation);
+          }
+        }
+        return this.filterHighlights();
+      }
+    };
+    Filter.prototype.updateHighlights = function() {
+      this.highlights = this.annotator.element.find('.annotator-hl:visible');
+      return this.filtered = this.highlights.not(this.classes.hl.hide);
+    };
+    Filter.prototype.filterHighlights = function() {
+      var activeFilters, annotation, annotations, filtered, highlights, index, uniques, _len, _ref;
+      activeFilters = $.grep(this.filters, function(filter) {
+        return !!filter.annotations.length;
+      });
+      filtered = ((_ref = activeFilters[0]) != null ? _ref.annotations : void 0) || [];
+      if (activeFilters.length > 1) {
+        annotations = [];
+        $.each(activeFilters, function() {
+          return $.merge(annotations, this.annotations);
+        });
+        uniques = [];
+        filtered = [];
+        $.each(annotations, function() {
+          if ($.inArray(this, uniques) === -1) {
+            return uniques.push(this);
+          } else {
+            return filtered.push(this);
+          }
+        });
+      }
+      highlights = this.highlights;
+      for (index = 0, _len = filtered.length; index < _len; index++) {
+        annotation = filtered[index];
+        highlights = highlights.not(annotation.highlights);
+      }
+      highlights.addClass(this.classes.hl.hide);
+      this.filtered = this.highlights.not(this.classes.hl.hide);
+      return this;
+    };
+    Filter.prototype.resetHighlights = function() {
+      this.highlights.removeClass(this.classes.hl.hide);
+      this.filtered = this.highlights;
+      return this;
+    };
+    Filter.prototype._onFilterFocus = function(event) {
+      var input;
+      input = $(event.target);
+      input.parent().addClass(this.classes.active);
+      return input.next('button').show();
+    };
+    Filter.prototype._onFilterBlur = function(event) {
+      var input;
+      if (!event.target.value) {
+        input = $(event.target);
+        input.parent().removeClass(this.classes.active);
+        return input.next('button').hide();
+      }
+    };
+    Filter.prototype._onFilterKeyup = function(event) {
+      var filter;
+      filter = $(event.target).parent().data('filter');
+      if (filter) {
+        return this.updateFilter(filter);
+      }
+    };
+    Filter.prototype._findNextHighlight = function(previous) {
+      var active, annotation, current, index, next, offset, operator, resetOffset;
+      if (!this.highlights.length) {
+        return this;
+      }
+      offset = previous ? 0 : -1;
+      resetOffset = previous ? -1 : 0;
+      operator = previous ? 'lt' : 'gt';
+      active = this.highlights.not('.' + this.classes.hl.hide);
+      current = active.filter('.' + this.classes.hl.active);
+      if (!current.length) {
+        current = active.eq(offset);
+      }
+      annotation = current.data('annotation');
+      index = active.index(current[0]);
+      next = active.filter(":" + operator + "(" + index + ")").not(annotation.highlights).eq(resetOffset);
+      if (!next.length) {
+        next = active.eq(resetOffset);
+      }
+      return this._scrollToHighlight(next.data('annotation').highlights);
+    };
+    Filter.prototype._onNextClick = function(event) {
+      return this._findNextHighlight();
+    };
+    Filter.prototype._onPreviousClick = function(event) {
+      return this._findNextHighlight(true);
+    };
+    Filter.prototype._scrollToHighlight = function(highlight) {
+      highlight = $(highlight);
+      this.highlights.removeClass(this.classes.hl.active);
+      highlight.addClass(this.classes.hl.active);
+      return $('html, body').animate({
+        scrollTop: highlight.offset().top - (this.element.height() + 20)
+      }, 150);
+    };
+    Filter.prototype._onClearClick = function(event) {
+      return $(event.target).prev('input').val('').keyup().blur();
+    };
+    return Filter;
+  })();
+}).call(this);
Index: /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.markdown.min.js
===================================================================
--- /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.markdown.min.js	(revision 24776)
+++ /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.markdown.min.js	(revision 24776)
@@ -0,0 +1,33 @@
+(function() {
+  var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.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;
+  };
+  Annotator.Plugin.Markdown = (function() {
+    __extends(Markdown, Annotator.Plugin);
+    Markdown.prototype.events = {
+      'annotationViewerTextField': 'updateTextField'
+    };
+    function Markdown(element, options) {
+      this.updateTextField = __bind(this.updateTextField, this);      if ((typeof Showdown !== "undefined" && Showdown !== null ? Showdown.converter : void 0) != null) {
+        Markdown.__super__.constructor.apply(this, arguments);
+        this.converter = new Showdown.converter();
+      } else {
+        console.error("To use the Markdown plugin, you must include Showdown into the page first.");
+      }
+    }
+    Markdown.prototype.updateTextField = function(field, annotation) {
+      var text;
+      text = Annotator.$.escape(annotation.text || '');
+      return $(field).html(this.convert(text));
+    };
+    Markdown.prototype.convert = function(text) {
+      return this.converter.makeHtml(text);
+    };
+    return Markdown;
+  })();
+}).call(this);
Index: /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.min.css
===================================================================
--- /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.min.css	(revision 24776)
+++ /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.min.css	(revision 24776)
@@ -0,0 +1,1 @@
+.annotator-notice,.annotator-filter *,.annotator-widget *{font-family:"Helvetica Neue",Arial,Helvetica,sans-serif;font-weight:normal;text-align:left;margin:0;padding:0;background:none;-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none;-moz-box-shadow:none;-webkit-box-shadow:none;-o-box-shadow:none;box-shadow:none;color:#909090;}.annotator-adder{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAA3CAYAAADuQbOpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94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9XmyWIQSn+4KMWEYLOhRCjRfWd4yAL9q3FIfP5twpHB9MoQy41ZiuB0QpCUFkqUPThQbqGItd9iyOE1frW4ujkCv0d5ou5pKBAMjio5IPMoS7INHMypjdUZldpZhOSUHLk8sVc9x2OAP3CdYX3JQ6lgaG45z2IYIGVcjK+PrCRYH+uBiSU/9ZMqBAE63UcwZMNLTtIg4L6XsWxYuR89v/VV3dCE7HkOjTAikmQ/2FWXmaEQCFWkEJNWyMlUyj3GGDF7gmOLpAplHu8pzj8ZAqn6LUgUnCTwbMULgBQ8AiTA9NpVHQnoTS4yW7H0c2EkiUZ6WxqNXoUhxZCyQbvWgkmo0So9aXAwLBXSKVgxbodxz0gVSe31BM4IiFVxMRSIJeoAEjuXM6X31NSqZCryzjuJalUyNVlHJGSqkvEkiEXZPy0UsZW7Ml4qovk6hKO3iCVArm6hKMrpOoysUK4RbmpbK+7vwjcYtg4epNUYbjFsHF0lVSag3eNqQktpLwvikJqQtOM834oAakATTi6g1D+8n8CDADkHvNxLFOPmwAAAABJRU5ErkJggg==');background-repeat:no-repeat;}.annotator-resize,.annotator-widget::after,.annotator-editor a::after,.annotator-viewer .annotator-controls button,.annotator-filter .annotator-filter-navigation button::after,.annotator-filter .annotator-filter-property .annotator-filter-clear{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAEiCAYAAAD0w4JOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6c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WOtE2QSSNKDjqFsxNiZt10goqNfag7QgTM2YTySlNKI+ZGsc6wZBtGqOmSr5A9Q6LsRe3v7TXK5/N2mpqYHOLXSZJCvr+9iS0vLLWVlZXaSP4kJDAw8WVlZ6d9mGx04cMBq0aJFN6ysrBrbBIJNPgoODr559OjRDDTxflsTLVvIckhKZmZm4pgxY75oa37kBtnQHoO2c177FUEyQ67RFo3o1ergtjSNBvCg2bNnv5mdnb1eahP7DBw4cJZKpYprbGysq66uLtK1SqHTs7F5HDlyZCf/exFJIPz5RLh+LRUkhyymjzTaBBK871drh2Y+kAziAenjki9MBbWbQyo6w8jvOrBhDqMXvOGQjRkZGeWSNTp27Bh9A0qfet5GRrIYIpcEsra2fpXbp9fOuyBXAPNvDxtRmD0JWGibQI6OjrUBAQEfwV6RkjI2c3Pz5mnTpl2fN2/eEhcXl2STjVRaWnoG+VFhenp6CL2PlJJAaCLkRkhPqYDObKTDpjWmzCQs5930+atZm1RKSEhwyMrKOubh4UGvnPsKtTTas1NSUuhleEt9fX1FfHz8LhsbG/onix6SQbzPPX/asWMHJVpubQLxtlBTQGKfnf0EWSqTyY5JikfML1/z0BeakYDUSHk6os876JOPfsYsC0lKa0xxyM60phPUCeoEdYI6QZ2gXxP0PwEGANR2B3IwRjuYAAAAAElFTkSuQmCC');background-repeat:no-repeat;}.annotator-hl{background:rgba(255,255,10,0.3);}.annotator-wrapper{position:relative;}.annotator-adder,.annotator-outer,.annotator-notice{z-index:9999;}.annotator-adder,.annotator-outer,.annotator-widget,.annotator-notice{position:absolute;font-size:10px;line-height:1;}.annotator-hide{display:none;visibility:hidden;}.annotator-adder{margin-top:-41px;margin-left:-25px;width:50px;height:55px;background-position:left top;}.annotator-adder:hover{background-position:center top;}.annotator-adder:active{background-position:center right;}.annotator-adder button{display:block;width:36px;height:41px;margin:0 auto;border:none;background:none;text-indent:-999em;cursor:pointer;}.annotator-outer{width:0;height:0;}.annotator-widget{margin:0;padding:0;bottom:8px;left:-18px;min-width:265px;background-color:rgba(251,251,251,0.98);border:1px solid rgba(122,122,122,0.6);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:0 5px 15px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 15px rgba(0,0,0,0.2);-o-box-shadow:0 5px 15px rgba(0,0,0,0.2);box-shadow:0 5px 15px rgba(0,0,0,0.2);}.annotator-invert-x .annotator-widget{left:auto;right:-18px;}.annotator-invert-y .annotator-widget{bottom:auto;top:8px;}.annotator-widget strong{font-weight:bold;}.annotator-widget .annotator-listing,.annotator-widget .annotator-item{padding:0;margin:0;list-style:none;}.annotator-widget::after{content:"";display:block;width:18px;height:10px;background-position:0 0;position:absolute;bottom:-10px;left:8px;}.annotator-invert-x .annotator-widget::after{left:auto;right:8px;}.annotator-invert-y .annotator-widget::after{background-position:0 -15px;bottom:auto;top:-9px;}.annotator-widget .annotator-item,.annotator-editor .annotator-item input,.annotator-editor .annotator-item textarea{position:relative;font-size:12px;}.annotator-viewer .annotator-item{border-top:2px solid rgba(122,122,122,0.2);}.annotator-widget .annotator-item:first-child{border-top:none;}.annotator-editor .annotator-item,.annotator-viewer div{border-top:1px solid rgba(133,133,133,0.11);}.annotator-viewer div{padding:6px 6px;}.annotator-viewer .annotator-item ol,.annotator-viewer .annotator-item ul{padding:4px 16px;}.annotator-viewer div:first-of-type,.annotator-editor .annotator-item:first-child textarea{padding-top:12px;padding-bottom:12px;color:#3c3c3c;font-size:13px;font-style:italic;line-height:1.3;border-top:none;}.annotator-viewer .annotator-controls{position:relative;top:5px;right:5px;padding-left:5px;opacity:0;-webkit-transition:opacity .2s ease-in;-moz-transition:opacity .2s ease-in;-o-transition:opacity .2s ease-in;transition:opacity .2s ease-in;float:right;}.annotator-viewer li:hover .annotator-controls,.annotator-viewer li .annotator-controls.annotator-visible{opacity:1;}.annotator-viewer .annotator-controls button{cursor:pointer;display:inline-block;width:13px;height:13px;margin-left:2px;border:none;opacity:.2;text-indent:-900em;background-color:transparent;outline:none;}.annotator-viewer .annotator-controls button:hover,.annotator-viewer .annotator-controls button:focus{opacity:.9;}.annotator-viewer .annotator-controls button:active{opacity:1;}.annotator-viewer .annotator-controls button[disabled]{display:none;}.annotator-viewer .annotator-controls .annotator-edit{background-position:0 -60px;}.annotator-viewer .annotator-controls .annotator-delete{background-position:0 -75px;}.annotator-editor .annotator-item{position:relative;}.annotator-editor .annotator-item label{top:0;display:inline;cursor:pointer;}.annotator-editor .annotator-item input,.annotator-editor .annotator-item textarea{display:block;min-width:100%;padding:10px 8px;border:none;margin:0;color:#3c3c3c;background:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;resize:none;}.annotator-editor .annotator-item textarea::-webkit-scrollbar{height:8px;width:8px;}.annotator-editor .annotator-item textarea::-webkit-scrollbar-track-piece{margin:13px 0 3px;background-color:#e5e5e5;-webkit-border-radius:4px;}.annotator-editor .annotator-item textarea::-webkit-scrollbar-thumb:vertical{height:25px;background-color:#ccc;-webkit-border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.1);}.annotator-editor .annotator-item textarea::-webkit-scrollbar-thumb:horizontal{width:25px;background-color:#ccc;-webkit-border-radius:4px;}.annotator-editor .annotator-item:first-child textarea{min-height:5.5em;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;-o-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0;}.annotator-editor .annotator-item input:focus,.annotator-editor .annotator-item textarea:focus{background-color:#f3f3f3;outline:none;}.annotator-editor .annotator-item input[type=radio],.annotator-editor .annotator-item input[type=checkbox]{width:auto;min-width:0;padding:0;display:inline;margin:0 4px 0 0;cursor:pointer;}.annotator-editor .annotator-checkbox{padding:8px 6px;}.annotator-filter,.annotator-filter .annotator-filter-navigation button,.annotator-editor .annotator-controls{text-align:right;padding:3px;border-top:1px solid #d4d4d4;background-color:#d4d4d4;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),color-stop(0.6,#dcdcdc),to(#d2d2d2));background-image:-moz-linear-gradient(-90deg,#f5f5f5,#dcdcdc 60%,#d2d2d2);background-image:-webkit-linear-gradient(-90deg,#f5f5f5,#dcdcdc 60%,#d2d2d2);background-image:linear-gradient(-90deg,#f5f5f5,#dcdcdc 60%,#d2d2d2);-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.7),inset -1px 0 0 rgba(255,255,255,0.7),inset 0 1px 0 rgba(255,255,255,0.7);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.7),inset -1px 0 0 rgba(255,255,255,0.7),inset 0 1px 0 rgba(255,255,255,0.7);-o-box-shadow:inset 1px 0 0 rgba(255,255,255,0.7),inset -1px 0 0 rgba(255,255,255,0.7),inset 0 1px 0 rgba(255,255,255,0.7);box-shadow:inset 1px 0 0 rgba(255,255,255,0.7),inset -1px 0 0 rgba(255,255,255,0.7),inset 0 1px 0 rgba(255,255,255,0.7);-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;-o-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;}.annotator-invert-y .annotator-controls{border-top:none;border-bottom:1px solid #b4b4b4;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;-o-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0;}.annotator-editor a,.annotator-filter .annotator-filter-property label{position:relative;display:inline-block;padding:0 6px 0 22px;color:#363636;text-shadow:0 1px 0 rgba(255,255,255,0.75);text-decoration:none;line-height:24px;font-size:12px;font-weight:bold;border:1px solid #a2a2a2;background-color:#d4d4d4;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),color-stop(0.5,#d2d2d2),color-stop(0.5,#bebebe),to(#d2d2d2));background-image:-moz-linear-gradient(-90deg,#f5f5f5,#d2d2d2 50%,#bebebe 50%,#d2d2d2);background-image:-webkit-linear-gradient(-90deg,#f5f5f5,#d2d2d2 50%,#bebebe 50%,#d2d2d2);background-image:linear-gradient(-90deg,#f5f5f5,#d2d2d2 50%,#bebebe 50%,#d2d2d2);-webkit-box-shadow:inset 0 0 5px rgba(255,255,255,0.2),inset 0 0 1px rgba(255,255,255,0.8);-moz-box-shadow:inset 0 0 5px rgba(255,255,255,0.2),inset 0 0 1px rgba(255,255,255,0.8);-o-box-shadow:inset 0 0 5px rgba(255,255,255,0.2),inset 0 0 1px rgba(255,255,255,0.8);box-shadow:inset 0 0 5px rgba(255,255,255,0.2),inset 0 0 1px rgba(255,255,255,0.8);-webkit-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;}.annotator-editor a::after{position:absolute;top:50%;left:5px;display:block;content:"";width:15px;height:15px;margin-top:-7px;background-position:0 -90px;}.annotator-editor a:hover,.annotator-editor a:focus,.annotator-editor a.annotator-focus,.annotator-filter .annotator-filter-active label,.annotator-filter .annotator-filter-navigation button:hover{outline:none;border-color:#435aa0;background-color:#3865f9;background-image:-webkit-gradient(linear,left top,left bottom,from(#7691fb),color-stop(0.5,#5075fb),color-stop(0.5,#3865f9),to(#3665fa));background-image:-moz-linear-gradient(-90deg,#7691fb,#5075fb 50%,#3865f9 50%,#3665fa);background-image:-webkit-linear-gradient(-90deg,#7691fb,#5075fb 50%,#3865f9 50%,#3665fa);background-image:linear-gradient(-90deg,#7691fb,#5075fb 50%,#3865f9 50%,#3665fa);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.42);}.annotator-editor a:hover::after,.annotator-editor a:focus::after{margin-top:-8px;background-position:0 -105px;}.annotator-editor a:active,.annotator-filter .annotator-filter-navigation button:active{border-color:#700c49;background-color:#d12e8e;background-image:-webkit-gradient(linear,left top,left bottom,from(#fc7cca),color-stop(0.5,#e85db2),color-stop(0.5,#d12e8e),to(#ff009c));background-image:-moz-linear-gradient(-90deg,#fc7cca,#e85db2 50%,#d12e8e 50%,#ff009c);background-image:-webkit-linear-gradient(-90deg,#fc7cca,#e85db2 50%,#d12e8e 50%,#ff009c);background-image:linear-gradient(-90deg,#fc7cca,#e85db2 50%,#d12e8e 50%,#ff009c);}.annotator-editor a.annotator-save::after{background-position:0 -120px;}.annotator-editor a.annotator-save:hover::after,.annotator-editor a.annotator-save:focus::after,.annotator-editor a.annotator-save.annotator-focus::after{margin-top:-8px;background-position:0 -135px;}.annotator-editor .annotator-widget::after{background-position:0 -30px;}.annotator-editor.annotator-invert-y .annotator-widget .annotator-controls{background-color:#f2f2f2;}.annotator-editor.annotator-invert-y .annotator-widget::after{background-position:0 -45px;height:11px;}.annotator-resize{position:absolute;top:0;right:0;width:12px;height:12px;background-position:2px -150px;}.annotator-invert-x .annotator-resize{right:auto;left:0;background-position:0 -195px;}.annotator-invert-y .annotator-resize{top:auto;bottom:0;background-position:2px -165px;}.annotator-invert-y.annotator-invert-x .annotator-resize{background-position:0 -180px;}.annotator-notice{color:#fff;position:absolute;position:fixed;top:-54px;left:0;width:100%;font-size:14px;line-height:50px;text-align:center;background:black;background:rgba(0,0,0,0.9);border-bottom:4px solid #d4d4d4;-webkit-transition:top .4s ease-out;-moz-transition:top .4s ease-out;-o-transition:top .4s ease-out;transition:top .4s ease-out;}.ie6 .annotator-notice{position:absolute;}.annotator-notice-success{border-color:#3665f9;}.annotator-notice-error{border-color:#ff7e00;}.annotator-notice p{margin:0;}.annotator-notice a{color:#fff;}.annotator-notice-show{top:0;}.annotator-tags{margin-bottom:-2px;}.annotator-tags .annotator-tag{display:inline-block;padding:0 8px;margin-bottom:2px;line-height:1.6;font-weight:bold;background-color:#e6e6e6;-webkit-border-radius:8px;-moz-border-radius:8px;-o-border-radius:8px;border-radius:8px;}.annotator-filter{z-index:10000;position:fixed;top:0;right:0;left:0;text-align:left;line-height:0;border:none;border-bottom:1px solid #878787;padding-left:10px;padding-right:10px;-webkit-border-radius:0;-moz-border-radius:0;-o-border-radius:0;border-radius:0;-webkit-box-shadow:inset 0 -1px 0 rgba(255,255,255,0.3);-moz-box-shadow:inset 0 -1px 0 rgba(255,255,255,0.3);-o-box-shadow:inset 0 -1px 0 rgba(255,255,255,0.3);box-shadow:inset 0 -1px 0 rgba(255,255,255,0.3);}.annotator-filter strong{font-size:12px;font-weight:bold;color:#3c3c3c;text-shadow:0 1px 0 rgba(255,255,255,0.7);position:relative;top:-9px;}.annotator-filter .annotator-filter-property,.annotator-filter .annotator-filter-navigation{position:relative;display:inline-block;overflow:hidden;line-height:10px;padding:2px 0;margin-right:8px;}.annotator-filter .annotator-filter-property label,.annotator-filter .annotator-filter-navigation button{text-align:left;display:block;float:left;line-height:20px;-webkit-border-radius:10px 0 0 10px;-moz-border-radius:10px 0 0 10px;-o-border-radius:10px 0 0 10px;border-radius:10px 0 0 10px;}.annotator-filter .annotator-filter-property label{padding-left:8px;}.annotator-filter .annotator-filter-property input{display:block;float:right;-webkit-appearance:none;background-color:#fff;border:1px solid #878787;border-left:none;padding:2px 4px;line-height:16px;min-height:16px;font-size:12px;width:150px;color:#333;background-color:#f8f8f8;-webkit-border-radius:0 10px 10px 0;-moz-border-radius:0 10px 10px 0;-o-border-radius:0 10px 10px 0;border-radius:0 10px 10px 0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.2);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.2);-o-box-shadow:inset 0 1px 1px rgba(0,0,0,0.2);box-shadow:inset 0 1px 1px rgba(0,0,0,0.2);}.annotator-filter .annotator-filter-property input:focus{outline:none;background-color:#fff;}.annotator-filter .annotator-filter-clear{position:absolute;right:3px;top:6px;border:none;text-indent:-900em;width:15px;height:15px;background-position:0 -90px;opacity:.4;}.annotator-filter .annotator-filter-clear:hover,.annotator-filter .annotator-filter-clear:focus{opacity:.8;}.annotator-filter .annotator-filter-clear:active{opacity:1;}.annotator-filter .annotator-filter-navigation button{border:1px solid #a2a2a2;padding:0;text-indent:-900px;width:20px;min-height:22px;-webkit-box-shadow:inset 0 0 5px rgba(255,255,255,0.2),inset 0 0 1px rgba(255,255,255,0.8);-moz-box-shadow:inset 0 0 5px rgba(255,255,255,0.2),inset 0 0 1px rgba(255,255,255,0.8);-o-box-shadow:inset 0 0 5px rgba(255,255,255,0.2),inset 0 0 1px rgba(255,255,255,0.8);box-shadow:inset 0 0 5px rgba(255,255,255,0.2),inset 0 0 1px rgba(255,255,255,0.8);}.annotator-filter .annotator-filter-navigation button,.annotator-filter .annotator-filter-navigation button:hover,.annotator-filter .annotator-filter-navigation button:focus{color:transparent;}.annotator-filter .annotator-filter-navigation button::after{position:absolute;top:9px;left:8px;content:"";display:block;width:7px;height:7px;background-position:0 -210px;}.annotator-filter .annotator-filter-navigation button:hover::after{background-position:0 -225px;}.annotator-filter .annotator-filter-navigation .annotator-filter-next{-webkit-border-radius:0 10px 10px 0;-moz-border-radius:0 10px 10px 0;-o-border-radius:0 10px 10px 0;border-radius:0 10px 10px 0;border-left:none;}.annotator-filter .annotator-filter-navigation .annotator-filter-next::after{left:auto;right:9px;background-position:0 -240px;}.annotator-filter .annotator-filter-navigation .annotator-filter-next:hover::after{background-position:0 -256px;}.annotator-hl-active{background:rgba(255,255,10,0.8);}.annotator-hl-filtered{background-color:transparent;}
Index: /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.min.js
===================================================================
--- /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.min.js	(revision 24776)
+++ /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.min.js	(revision 24776)
@@ -0,0 +1,1 @@
+(function(){var k,g,b,c,p,j,m,d,h,f,q,a,i;var l=Array.prototype.slice,n=function(r,s){return function(){return r.apply(s,arguments)}},o=Object.prototype.hasOwnProperty,e=function(u,s){for(var r in s){if(o.call(s,r)){u[r]=s[r]}}function t(){this.constructor=u}t.prototype=s.prototype;u.prototype=new t;u.__super__=s.prototype;return u};if(!(typeof jQuery!=="undefined"&&jQuery!==null?(i=jQuery.fn)!=null?i.jquery:void 0:void 0)){console.error("Annotator requires jQuery: have you included lib/vendor/jquery.js?")}if(!(JSON&&JSON.parse&&JSON.stringify)){console.error("Annotator requires a JSON implementation: have you included lib/vendor/json2.js?")}k=jQuery.sub();k.flatten=function(s){var r;r=function(u){var v,x,w,t;x=[];for(w=0,t=u.length;w<t;w++){v=u[w];x=x.concat(v&&k.isArray(v)?r(v):v)}return x};return r(s)};k.plugin=function(s,r){return jQuery.fn[s]=function(u){var t;t=Array.prototype.slice.call(arguments,1);return this.each(function(){var v;v=k.data(this,s);if(v){return u&&v[u].apply(v,t)}else{v=new r(this,u);return k.data(this,s,v)}})}};k.fn.textNodes=function(){var r;r=function(t){var s;if(t&&t.nodeType!==3){s=[];if(t.nodeType!==8){t=t.lastChild;while(t){s.push(r(t));t=t.previousSibling}}return s.reverse()}else{return t}};return this.map(function(){return k.flatten(r(this))})};k.fn.xpath=function(r){var s;s=this.map(function(){var u,t,v;v="";u=this;while(u&&u.nodeType===1&&u!==r){t=k(u.parentNode).children(u.tagName).index(u)+1;t=t>1?"["+t+"]":"";v="/"+u.tagName.toLowerCase()+t+v;u=u.parentNode}return v});return s.get()};k.escape=function(r){return r.replace(/&(?!\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")};k.fn.escape=function(r){if(arguments.length){return this.html(k.escape(r))}return this.html()};j=["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){if(!(console.group!=null)){console.group=function(r){return console.log("GROUP: ",r)}}if(!(console.groupCollapsed!=null)){console.groupCollapsed=console.group}for(h=0,q=j.length;h<q;h++){p=j[h];if(!(console[p]!=null)){console[p]=function(){return console.log("Not implemented: console."+name)}}}}else{this.console={};for(f=0,a=j.length;f<a;f++){p=j[f];this.console[p]=function(){}}this.console.error=function(){var r;r=1<=arguments.length?l.call(arguments,0):[];return alert("ERROR: "+(r.join(", ")))};this.console.warn=function(){var r;r=1<=arguments.length?l.call(arguments,0):[];return alert("WARNING: "+(r.join(", ")))}}b=(function(){r.prototype.events={};r.prototype.options={};r.prototype.element=null;function r(t,s){this.options=k.extend(true,{},this.options,s);this.element=k(t);this.on=this.subscribe;this.addEvents()}r.prototype.addEvents=function(){var v,x,w,s,u,z,y,t;z=this.events;t=[];for(w in z){x=z[w];y=w.split(" "),s=2<=y.length?l.call(y,0,u=y.length-1):(u=0,[]),v=y[u++];t.push(this.addEvent(s.join(" "),v,x))}return t};r.prototype.addEvent=function(s,u,v){var w,t;w=n(function(){return this[v].apply(this,arguments)},this);t=typeof s==="string"&&s.replace(/\s+/g,"")==="";if(t){s=this.element}if(typeof s==="string"){this.element.delegate(s,u,w)}else{if(this.isCustomEvent(u)){this.subscribe(u,w)}else{k(s).bind(u,w)}}return this};r.prototype.isCustomEvent=function(t){var s;s="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]+/);t=t.split(".")[0];return k.inArray(t,s)===-1};r.prototype.publish=function(){this.element.triggerHandler.apply(this.element,arguments);return this};r.prototype.subscribe=function(s,u){var t;t=function(){return u.apply(this,[].slice.call(arguments,1))};t.guid=u.guid=(k.guid+=1);this.element.bind(s,t);return this};r.prototype.unsubscribe=function(){this.element.unbind.apply(this.element,arguments);return this};return r})();c={};c.sniff=function(s){if(s.commonAncestorContainer!=null){return new c.BrowserRange(s)}else{if(typeof s.start==="string"){return new c.SerializedRange(s)}else{if(s.start&&typeof s.start==="object"){return new c.NormalizedRange(s)}else{console.error("Couldn't not sniff range type");return false}}}};c.BrowserRange=(function(){function r(s){this.commonAncestorContainer=s.commonAncestorContainer;this.startContainer=s.startContainer;this.startOffset=s.startOffset;this.endContainer=s.endContainer;this.endOffset=s.endOffset}r.prototype.normalize=function(A){var z,v,B,y,u,t,x,s,w;if(this.tainted){console.error("You may only call normalize() once on a BrowserRange!");return false}else{this.tainted=true}t={};B={};w=["start","end"];for(x=0,s=w.length;x<s;x++){u=w[x];v=this[u+"Container"];y=this[u+"Offset"];if(v.nodeType===1){z=v.childNodes[y];v=z||v.childNodes[y-1];while(v.nodeType!==3){v=v.firstChild}y=z?0:v.nodeValue.length}t[u]=v;t[u+"Offset"]=y}B.start=t.startOffset>0?t.start.splitText(t.startOffset):t.start;if(t.start===t.end){if((t.endOffset-t.startOffset)<B.start.nodeValue.length){B.start.splitText(t.endOffset-t.startOffset)}B.end=B.start}else{if(t.endOffset<t.end.nodeValue.length){t.end.splitText(t.endOffset)}B.end=t.end}B.commonAncestor=this.commonAncestorContainer;while(B.commonAncestor.nodeType!==1){B.commonAncestor=B.commonAncestor.parentNode}return new c.NormalizedRange(B)};r.prototype.serialize=function(s,t){return this.normalize(s).serialize(s,t)};return r})();c.NormalizedRange=(function(){function r(s){this.commonAncestor=s.commonAncestor;this.start=s.start;this.end=s.end}r.prototype.normalize=function(s){return this};r.prototype.limit=function(w){var s,v,t,u,y,x;s=k.grep(this.textNodes(),function(z){return z.parentNode===w||k.contains(w,z.parentNode)});if(!s.length){return null}this.start=s[0];this.end=s[s.length-1];t=k(this.start).parents();x=k(this.end).parents();for(u=0,y=x.length;u<y;u++){v=x[u];if(t.index(v)!==-1){this.commonAncestor=v;break}}return this};r.prototype.serialize=function(u,v){var t,s,w;s=function(B,A){var z,y,D,G,F,E,C,x;if(v){G=k(B).parents(":not("+v+")").eq(0)}else{G=k(B).parent()}E=G.xpath(u)[0];F=G.textNodes();y=F.slice(0,F.index(B));D=0;for(C=0,x=y.length;C<x;C++){z=y[C];D+=z.nodeValue.length}if(A){return[E,D+B.nodeValue.length]}else{return[E,D]}};w=s(this.start);t=s(this.end,true);return new c.SerializedRange({start:w[0],end:t[0],startOffset:w[1],endOffset:t[1]})};r.prototype.text=function(){var s;return((function(){var u,w,v,t;v=this.textNodes();t=[];for(u=0,w=v.length;u<w;u++){s=v[u];t.push(s.nodeValue)}return t}).call(this)).join("")};r.prototype.textNodes=function(){var s,v,t,u;t=k(this.commonAncestor).textNodes();u=[t.index(this.start),t.index(this.end)],v=u[0],s=u[1];return k.makeArray(t.slice(v,(s+1)||9000000000))};return r})();c.SerializedRange=(function(){function r(s){this.start=s.start;this.startOffset=s.startOffset;this.end=s.end;this.endOffset=s.endOffset}r.prototype._nodeFromXPath=function(s){var x,w,t,v,u;w=function(z,y){if(y==null){y=null}return document.evaluate(z,document,y,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue};if(!k.isXMLDoc(document.documentElement)){return w(s)}else{x=document.createNSResolver(document.ownerDocument===null?document.documentElement:document.ownerDocument.documentElement);v=w(s,x);if(!v){s=((function(){var z,B,A,y;A=s.split("/");y=[];for(z=0,B=A.length;z<B;z++){u=A[z];y.push(u&&u.indexOf(":")===-1?u.replace(/^([a-z]+)/,"xhtml:$1"):u)}return y})()).join("/");t=document.lookupNamespaceURI(null);x=function(y){if(y==="xhtml"){return t}else{return document.documentElement.getAttribute("xmlns:"+y)}};v=w(s,x)}return v}};r.prototype.normalize=function(E){var I,B,A,G,y,D,F,C,z,x,t,s,J,H,w,v,u;F=k(E).xpath()[0];z=this.start.split("/");A=this.end.split("/");B=[];C={};for(G=0,w=z.length;0<=w?G<w:G>w;0<=w?G++:G--){if(z[G]===A[G]){B.push(z[G])}else{break}}I=F+B.join("/");C.commonAncestorContainer=this._nodeFromXPath(I);if(!C.commonAncestorContainer){console.error("Error deserializing range: can't find XPath '"+I+"'. Is this the right document?");return null}v=["start","end"];for(t=0,J=v.length;t<J;t++){D=v[t];y=0;u=k(this._nodeFromXPath(F+this[D])).textNodes();for(s=0,H=u.length;s<H;s++){x=u[s];if(y+x.nodeValue.length>=this[D+"Offset"]){C[D+"Container"]=x;C[D+"Offset"]=this[D+"Offset"]-y;break}else{y+=x.nodeValue.length}}}return new c.BrowserRange(C).normalize(E)};r.prototype.serialize=function(s,t){return this.normalize(s).serialize(s,t)};r.prototype.toObject=function(){return{start:this.start,startOffset:this.startOffset,end:this.end,endOffset:this.endOffset}};return r})();m={getGlobal:function(){return(function(){return this})()},mousePosition:function(r,t){var s;s=k(t).offset();return{top:r.pageY-s.top,left:r.pageX-s.left}}};d=this.Annotator;g=(function(){e(r,b);r.prototype.events={".annotator-adder button click":"onAdderClick",".annotator-adder button mousedown":"onAdderMousedown",".annotator-hl mouseover":"onHighlightMouseover",".annotator-hl mouseout":"startViewerHideTimer"};r.prototype.html={hl:'<span class="annotator-hl"></span>',adder:'<div class="annotator-adder"><button>Annotate</button></div>',wrapper:'<div class="annotator-wrapper"></div>'};r.prototype.options={};r.prototype.plugins={};r.prototype.editor=null;r.prototype.viewer=null;r.prototype.selectedRanges=null;r.prototype.mouseIsDown=false;r.prototype.ignoreMouseup=false;r.prototype.viewerHideTimer=null;function r(u,t){this.onDeleteAnnotation=n(this.onDeleteAnnotation,this);this.onEditAnnotation=n(this.onEditAnnotation,this);this.onAdderClick=n(this.onAdderClick,this);this.onAdderMousedown=n(this.onAdderMousedown,this);this.onHighlightMouseover=n(this.onHighlightMouseover,this);this.checkForEndSelection=n(this.checkForEndSelection,this);this.checkForStartSelection=n(this.checkForStartSelection,this);this.clearViewerHideTimer=n(this.clearViewerHideTimer,this);this.startViewerHideTimer=n(this.startViewerHideTimer,this);this.showViewer=n(this.showViewer,this);this.onEditorSubmit=n(this.onEditorSubmit,this);this.onEditorHide=n(this.onEditorHide,this);this.showEditor=n(this.showEditor,this);var s,v,w;r.__super__.constructor.apply(this,arguments);this.plugins={};if(!r.supported()){return this}this._setupDocumentEvents()._setupWrapper()._setupViewer()._setupEditor();w=this.html;for(s in w){v=w[s];if(s!=="wrapper"){this[s]=k(v).appendTo(this.wrapper).hide()}}}r.prototype._setupWrapper=function(){this.wrapper=k(this.html.wrapper);this.element.find("script").remove();this.element.wrapInner(this.wrapper);this.wrapper=this.element.find(".annotator-wrapper");return this};r.prototype._setupViewer=function(){this.viewer=new r.Viewer();this.viewer.hide().on("edit",this.onEditAnnotation).on("delete",this.onDeleteAnnotation).addField({load:n(function(t,s){k(t).escape(s.text||"");return this.publish("annotationViewerTextField",[t,s])},this)}).element.appendTo(this.wrapper).bind({mouseover:this.clearViewerHideTimer,mouseout:this.startViewerHideTimer});return this};r.prototype._setupEditor=function(){this.editor=new r.Editor();this.editor.hide().on("hide",this.onEditorHide).on("save",this.onEditorSubmit).addField({type:"textarea",label:"Comments\u2026",load:function(t,s){return k(t).find("textarea").val(s.text||"")},submit:function(t,s){return s.text=k(t).find("textarea").val()}});this.editor.element.appendTo(this.wrapper);return this};r.prototype._setupDocumentEvents=function(){k(document).bind({mouseup:this.checkForEndSelection,mousedown:this.checkForStartSelection});return this};r.prototype.getSelectedRanges=function(){var v,t,s,u;u=m.getGlobal().getSelection();s=[];if(!u.isCollapsed){s=(function(){var x,w;w=[];for(t=0,x=u.rangeCount;0<=x?t<x:t>x;0<=x?t++:t--){v=new c.BrowserRange(u.getRangeAt(t));w.push(v.normalize().limit(this.wrapper[0]))}return w}).call(this)}return k.grep(s,function(w){return w})};r.prototype.createAnnotation=function(){var s;s={};this.publish("beforeAnnotationCreated",[s]);return s};r.prototype.setupAnnotation=function(s,u){var t,y,x,v,w,z;if(u==null){u=true}s.ranges||(s.ranges=this.selectedRanges);y=(function(){var B,D,C,A;C=s.ranges;A=[];for(B=0,D=C.length;B<D;B++){x=C[B];v=c.sniff(x);A.push(v.normalize(this.wrapper[0]))}return A}).call(this);y=k.grep(y,function(A){return A!==null});s.quote=[];s.ranges=[];s.highlights=[];for(w=0,z=y.length;w<z;w++){t=y[w];s.quote.push(k.trim(t.text()));s.ranges.push(t.serialize(this.wrapper[0],".annotator-hl"));k.merge(s.highlights,this.highlightRange(t))}s.quote=s.quote.join(" / ");k(s.highlights).data("annotation",s);if(u){this.publish("annotationCreated",[s])}return s};r.prototype.updateAnnotation=function(s){this.publish("beforeAnnotationUpdated",[s]);this.publish("annotationUpdated",[s]);return s};r.prototype.deleteAnnotation=function(s){var u,t,w,v;v=s.highlights;for(t=0,w=v.length;t<w;t++){u=v[t];k(u).replaceWith(u.childNodes)}this.publish("annotationDeleted",[s]);return s};r.prototype.loadAnnotations=function(t){var u,s;if(t==null){t=[]}s=n(function(x){var z,v,w,y;if(x==null){x=[]}v=x.splice(0,10);for(w=0,y=v.length;w<y;w++){z=v[w];this.setupAnnotation(z,false)}if(x.length>0){return setTimeout((function(){return s(x)}),100)}else{return this.publish("annotationsLoaded",[u])}},this);u=t.slice();if(t.length){s(t)}return this};r.prototype.dumpAnnotations=function(){if(this.plugins.Store){return this.plugins.Store.dumpAnnotations()}else{return console.warn("Can't dump annotations without Store plugin.")}};r.prototype.highlightRange=function(t){var s,u,v;return s=(function(){var x,z,y,w;y=t.textNodes();w=[];for(x=0,z=y.length;x<z;x++){u=y[x];v=this.hl.clone().show();w.push(k(u).wrap(v).parent().get(0))}return w}).call(this)};r.prototype.addPlugin=function(u,t){var s,v;if(this.plugins[u]){console.error("You cannot have more than one instance of any plugin.")}else{s=r.Plugin[u];if(typeof s==="function"){this.plugins[u]=new s(this.element[0],t);this.plugins[u].annotator=this;if(typeof(v=this.plugins[u]).pluginInit==="function"){v.pluginInit()}}else{console.error("Could not load "+u+" plugin. Have you included the appropriate <script> tag?")}}return this};r.prototype.showEditor=function(s,t){this.editor.element.css(t);this.editor.load(s);return this};r.prototype.onEditorHide=function(){this.publish("annotationEditorHidden",[this.editor]);return this.ignoreMouseup=false};r.prototype.onEditorSubmit=function(s){this.publish("annotationEditorSubmit",[this.editor,s]);if(s.ranges===void 0){return this.setupAnnotation(s)}else{return this.updateAnnotation(s)}};r.prototype.showViewer=function(t,s){this.viewer.element.css(s);this.viewer.load(t);return this.publish("annotationViewerShown",[this.viewer,t])};r.prototype.startViewerHideTimer=function(){if(!this.viewerHideTimer){return this.viewerHideTimer=setTimeout(k.proxy(this.viewer.hide,this.viewer),250)}};r.prototype.clearViewerHideTimer=function(){clearTimeout(this.viewerHideTimer);return this.viewerHideTimer=false};r.prototype.checkForStartSelection=function(s){if(!(s&&this.isAnnotator(s.target))){this.startViewerHideTimer();return this.mouseIsDown=true}};r.prototype.checkForEndSelection=function(v){var s,t,u,x,w;this.mouseIsDown=false;if(this.ignoreMouseup){return}this.selectedRanges=this.getSelectedRanges();w=this.selectedRanges;for(u=0,x=w.length;u<x;u++){t=w[u];s=t.commonAncestor;if(this.isAnnotator(s)){return}}if(v&&this.selectedRanges.length){return this.adder.css(m.mousePosition(v,this.wrapper[0])).show()}else{return this.adder.hide()}};r.prototype.isAnnotator=function(s){return !!k(s).parents().andSelf().filter("[class^=annotator-]").not(this.wrapper).length};r.prototype.onHighlightMouseover=function(s){var t;this.clearViewerHideTimer();if(this.mouseIsDown||this.viewer.isShown()){return false}t=k(s.target).parents(".annotator-hl").andSelf().map(function(){return k(this).data("annotation")});return this.showViewer(k.makeArray(t),m.mousePosition(s,this.wrapper[0]))};r.prototype.onAdderMousedown=function(s){if(s!=null){s.preventDefault()}return this.ignoreMouseup=true};r.prototype.onAdderClick=function(t){var s;if(t!=null){t.preventDefault()}s=this.adder.position();this.adder.hide();return this.showEditor(this.createAnnotation(),s)};r.prototype.onEditAnnotation=function(s){var t;t=this.viewer.element.position();this.viewer.hide();return this.showEditor(s,t)};r.prototype.onDeleteAnnotation=function(s){this.viewer.hide();return this.deleteAnnotation(s)};return r})();g.Plugin=(function(){e(r,b);function r(t,s){r.__super__.constructor.apply(this,arguments)}r.prototype.pluginInit=function(){};return r})();g.$=k;g.supported=function(){return(function(){return !!this.getSelection})()};g.noConflict=function(){m.getGlobal().Annotator=d;return this};k.plugin("annotator",g);this.Annotator=g;g.Widget=(function(){e(r,b);r.prototype.classes={hide:"annotator-hide",invert:{x:"annotator-invert-x",y:"annotator-invert-y"}};function r(t,s){r.__super__.constructor.apply(this,arguments);this.classes=k.extend({},g.Widget.prototype.classes,this.classes)}r.prototype.checkOrientation=function(){var v,w,s,u,t;this.resetOrientation();t=k(m.getGlobal());u=this.element.children(":first");w=u.offset();s={top:t.scrollTop(),right:t.width()+t.scrollLeft()};v={top:w.top,right:w.left+u.width()};if((v.top-s.top)<0){this.invertY()}if((v.right-s.right)>0){this.invertX()}return this};r.prototype.resetOrientation=function(){this.element.removeClass(this.classes.invert.x).removeClass(this.classes.invert.y);return this};r.prototype.invertX=function(){this.element.addClass(this.classes.invert.x);return this};r.prototype.invertY=function(){this.element.addClass(this.classes.invert.y);return this};return r})();g.Editor=(function(){e(r,g.Widget);r.prototype.events={"form submit":"submit",".annotator-save click":"submit",".annotator-cancel click":"hide",".annotator-cancel mouseover":"onCancelButtonMouseover","textarea keydown":"processKeypress"};r.prototype.classes={hide:"annotator-hide",focus:"annotator-focus"};r.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">Cancel</a>\n      <a href="#save" class="annotator-save annotator-focus">Save</a>\n    </div>\n    <span class="annotator-resize"></span>\n  </form>\n</div>';r.prototype.options={};function r(s){this.onCancelButtonMouseover=n(this.onCancelButtonMouseover,this);this.processKeypress=n(this.processKeypress,this);this.submit=n(this.submit,this);this.load=n(this.load,this);this.hide=n(this.hide,this);this.show=n(this.show,this);r.__super__.constructor.call(this,k(this.html)[0],s);this.fields=[];this.annotation={};this.setupDragabbles()}r.prototype.show=function(s){if(s!=null){s.preventDefault()}this.element.removeClass(this.classes.hide);this.element.find(".annotator-save").addClass(this.classes.focus);this.element.find(":input:first").focus();return this.checkOrientation().publish("show")};r.prototype.hide=function(s){if(s!=null){s.preventDefault()}this.element.addClass(this.classes.hide);return this.publish("hide")};r.prototype.load=function(s){var u,t,w,v;this.annotation=s;this.publish("load",[this.annotation]);v=this.fields;for(t=0,w=v.length;t<w;t++){u=v[t];u.load(u.element,this.annotation)}return this.show()};r.prototype.submit=function(t){var u,s,w,v;if(t!=null){t.preventDefault()}v=this.fields;for(s=0,w=v.length;s<w;s++){u=v[s];u.submit(u.element,this.annotation)}this.publish("save",[this.annotation]);return this.hide()};r.prototype.addField=function(t){var u,v,s;v=k.extend({id:"annotator-field-"+(new Date()).getTime(),type:"input",label:"",load:function(){},submit:function(){}},t);s=null;u=k('<li class="annotator-item" />');v.element=u[0];switch(v.type){case"textarea":s=k("<textarea />");break;case"input":case"checkbox":s=k("<input />")}u.append(s);s.attr({id:v.id,placeholder:v.label});if(v.type==="checkbox"){s[0].type="checkbox";u.addClass("annotator-checkbox");u.append(k("<label />",{"for":v.id,html:v.label}))}this.element.find("ul:first").append(u);this.fields.push(v);return v.element};r.prototype.checkOrientation=function(){var s,u,t;r.__super__.checkOrientation.apply(this,arguments);t=this.element.find("ul");s=this.element.find(".annotator-controls");u=function(){return t.children().each(function(){return k(this).parent().prepend(this)})};if(this.element.hasClass(this.classes.invert.y)&&t.is(":first-child")){s.insertBefore(t);u()}else{if(s.is(":first-child")){s.insertAfter(t);u()}}return this};r.prototype.processKeypress=function(s){if(s.keyCode===27){return this.hide()}else{if(s.keyCode===13&&!s.shiftKey){return this.submit()}}};r.prototype.onCancelButtonMouseover=function(){return this.element.find("."+this.classes.focus).removeClass(this.classes.focus)};r.prototype.setupDragabbles=function(){var u,B,x,s,w,z,v,t,y,A;s=null;u=this.classes;x=this.element;y=null;t=x.find(".annotator-resize");B=x.find(".annotator-controls");A=false;w=function(C){if(C.target===this){s={element:this,top:C.pageY,left:C.pageX};y=x.find("textarea:first");k(window).bind({"mouseup.annotator-editor-resize":v,"mousemove.annotator-editor-resize":z});return C.preventDefault()}};v=function(){s=null;return k(window).unbind(".annotator-editor-resize")};z=n(function(G){var H,E,D,C,F;if(s&&A===false){H={top:G.pageY-s.top,left:G.pageX-s.left};if(s.element===t[0]){C=y.outerHeight();F=y.outerWidth();E=x.hasClass(u.invert.x)?-1:1;D=x.hasClass(u.invert.y)?1:-1;y.height(C+(H.top*D));y.width(F+(H.left*E));if(y.outerHeight()!==C){s.top=G.pageY}if(y.outerWidth()!==F){s.left=G.pageX}}else{if(s.element===B[0]){x.css({top:parseInt(x.css("top"),10)+H.top,left:parseInt(x.css("left"),10)+H.left});s.top=G.pageY;s.left=G.pageX}}A=true;return setTimeout(function(){return A=false},1000/60)}},this);t.bind("mousedown",w);return B.bind("mousedown",w)};return r})();g.Viewer=(function(){e(r,g.Widget);r.prototype.events={".annotator-edit click":"onEditClick",".annotator-delete click":"onDeleteClick"};r.prototype.classes={hide:"annotator-hide",showControls:"annotator-visible"};r.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    <button class="annotator-edit">Edit</button>\n    <button class="annotator-delete">Delete</button>\n  </span>\n</li>'};function r(s){this.onDeleteClick=n(this.onDeleteClick,this);this.onEditClick=n(this.onEditClick,this);this.load=n(this.load,this);this.hide=n(this.hide,this);this.show=n(this.show,this);r.__super__.constructor.call(this,k(this.html.element)[0],s);this.item=k(this.html.item)[0];this.fields=[];this.annotations=[]}r.prototype.show=function(t){var s;if(t!=null){t.preventDefault()}s=this.element.find(".annotator-controls").addClass(this.classes.showControls);setTimeout((n(function(){return s.removeClass(this.classes.showControls)},this)),500);this.element.removeClass(this.classes.hide);return this.checkOrientation().publish("show")};r.prototype.isShown=function(){return !this.element.hasClass(this.classes.hide)};r.prototype.hide=function(s){if(s!=null){s.preventDefault()}this.element.addClass(this.classes.hide);return this.publish("hide")};r.prototype.load=function(A){var x,z,E,F,D,y,C,G,B,w,u,s,H,v,t;this.annotations=A||[];B=this.element.find("ul:first").empty();v=this.annotations;for(w=0,s=v.length;w<s;w++){x=v[w];G=k(this.item).clone().appendTo(B).data("annotation",x);E=G.find(".annotator-controls");D=E.find(".annotator-edit");F=E.find(".annotator-delete");z={showEdit:function(){return D.removeAttr("disabled")},hideEdit:function(){return D.attr("disabled","disabled")},showDelete:function(){return F.removeAttr("disabled")},hideDelete:function(){return F.attr("disabled","disabled")}};t=this.fields;for(u=0,H=t.length;u<H;u++){C=t[u];y=k(C.element).clone().appendTo(G)[0];C.load(y,x,z)}}this.publish("load",[this.annotations]);return this.show()};r.prototype.addField=function(s){var t;t=k.extend({load:function(){}},s);t.element=k("<div />")[0];this.fields.push(t);t.element;return this};r.prototype.onEditClick=function(s){return this.onButtonClick(s,"edit")};r.prototype.onDeleteClick=function(s){return this.onButtonClick(s,"delete")};r.prototype.onButtonClick=function(u,s){var t;t=k(u.target).parents(".annotator-annotation");return this.publish(s,[t.data("annotation")])};return r})();g=g||{};g.Notification=(function(){e(r,b);r.prototype.events={click:"hide"};r.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"}};function r(s){this.hide=n(this.hide,this);this.show=n(this.show,this);r.__super__.constructor.call(this,k(this.options.html).appendTo(document.body)[0],s)}r.prototype.show=function(t,s){if(s==null){s=g.Notification.INFO}k(this.element).addClass(this.options.classes.show).addClass(this.options.classes[s]).escape(t||"");setTimeout(this.hide,5000);return this};r.prototype.hide=function(){k(this.element).removeClass(this.options.classes.show);return this};return r})();g.Notification.INFO="show";g.Notification.SUCCESS="success";g.Notification.ERROR="error";k(function(){var r;r=new g.Notification;g.showNotification=r.show;return g.hideNotification=r.hide})}).call(this);
Index: /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.permissions.min.js
===================================================================
--- /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.permissions.min.js	(revision 24776)
+++ /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.permissions.min.js	(revision 24776)
@@ -0,0 +1,189 @@
+(function() {
+  var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.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;
+  };
+  Annotator.Plugin.Permissions = (function() {
+    __extends(Permissions, Annotator.Plugin);
+    Permissions.prototype.events = {
+      'beforeAnnotationCreated': 'addFieldsToAnnotation'
+    };
+    Permissions.prototype.options = {
+      showViewPermissionsCheckbox: true,
+      showEditPermissionsCheckbox: true,
+      userId: function(user) {
+        return user;
+      },
+      userString: function(user) {
+        return user;
+      },
+      userAuthorize: function(user, token) {
+        return this.userId(user) === token;
+      },
+      user: '',
+      permissions: {
+        'read': [],
+        'update': [],
+        'delete': [],
+        'admin': []
+      }
+    };
+    function Permissions(element, options) {
+      this.updateViewer = __bind(this.updateViewer, this);
+      this.updateAnnotationPermissions = __bind(this.updateAnnotationPermissions, this);
+      this.updatePermissionsField = __bind(this.updatePermissionsField, this);
+      this.addFieldsToAnnotation = __bind(this.addFieldsToAnnotation, this);      Permissions.__super__.constructor.apply(this, arguments);
+      if (this.options.user) {
+        this.setUser(this.options.user);
+        delete this.options.user;
+      }
+    }
+    Permissions.prototype.pluginInit = function() {
+      var createCallback, self;
+      if (!Annotator.supported()) {
+        return;
+      }
+      self = this;
+      createCallback = function(method, type) {
+        return function(field, annotation) {
+          return self[method].call(self, type, field, annotation);
+        };
+      };
+      if (this.options.showViewPermissionsCheckbox === true) {
+        this.annotator.editor.addField({
+          type: 'checkbox',
+          label: 'Allow anyone to <strong>view</strong> this annotation',
+          load: createCallback('updatePermissionsField', 'read'),
+          submit: createCallback('updateAnnotationPermissions', 'read')
+        });
+      }
+      if (this.options.showEditPermissionsCheckbox === true) {
+        this.annotator.editor.addField({
+          type: 'checkbox',
+          label: 'Allow anyone to <strong>edit</strong> this annotation',
+          load: createCallback('updatePermissionsField', 'update'),
+          submit: createCallback('updateAnnotationPermissions', 'update')
+        });
+      }
+      this.annotator.viewer.addField({
+        load: this.updateViewer
+      });
+      if (this.annotator.plugins.Filter) {
+        return this.annotator.plugins.Filter.addFilter({
+          label: 'User',
+          property: 'user',
+          isFiltered: __bind(function(input, user) {
+            var keyword, _i, _len, _ref;
+            user = this.options.userString(user);
+            if (!(input && user)) {
+              return false;
+            }
+            _ref = input.split(/\s*/);
+            for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+              keyword = _ref[_i];
+              if (user.indexOf(keyword) === -1) {
+                return false;
+              }
+            }
+            return true;
+          }, this)
+        });
+      }
+    };
+    Permissions.prototype.setUser = function(user) {
+      return this.user = user;
+    };
+    Permissions.prototype.addFieldsToAnnotation = function(annotation) {
+      if (annotation) {
+        annotation.permissions = this.options.permissions;
+        if (this.user) {
+          return annotation.user = this.user;
+        }
+      }
+    };
+    Permissions.prototype.authorize = function(action, annotation, user) {
+      var token, tokens, _i, _len;
+      if (user === void 0) {
+        user = this.user;
+      }
+      if (annotation.permissions) {
+        tokens = annotation.permissions[action] || [];
+        if (tokens.length === 0) {
+          return true;
+        }
+        for (_i = 0, _len = tokens.length; _i < _len; _i++) {
+          token = tokens[_i];
+          if (this.options.userAuthorize.call(this.options, user, token)) {
+            return true;
+          }
+        }
+        return false;
+      } else if (annotation.user) {
+        return user && this.options.userId(user) === annotation.user;
+      }
+      return true;
+    };
+    Permissions.prototype.updatePermissionsField = function(action, field, annotation) {
+      var dummy, input;
+      field = $(field).show();
+      input = field.find('input').removeAttr('disabled');
+      if (!this.authorize('admin', annotation)) {
+        field.hide();
+      }
+      if (this.authorize(action, annotation || {}, null)) {
+        input.attr('checked', 'checked');
+        dummy = {
+          permissions: this.options.permissions
+        };
+        if (this.authorize(action, dummy, null)) {
+          return input.attr('enabled', 'enabled');
+        }
+      } else {
+        return input.removeAttr('checked');
+      }
+    };
+    Permissions.prototype.updateAnnotationPermissions = function(type, field, annotation) {
+      var dataKey, permissions;
+      if (!annotation.permissions) {
+        annotation.permissions = this.options.permissions;
+      }
+      dataKey = type + '-permissions';
+      if ($(field).find('input').is(':checked')) {
+        $.data(annotation, dataKey, annotation.permissions[type]);
+        return annotation.permissions[type] = [];
+      } else {
+        permissions = $.data(annotation, dataKey);
+        if (permissions) {
+          return annotation.permissions[type] = permissions;
+        }
+      }
+    };
+    Permissions.prototype.updateViewer = function(field, annotation, controls) {
+      var user, username;
+      field = $(field);
+      username = this.options.userString(annotation.user);
+      if (annotation.user && username && typeof username === 'string') {
+        user = Annotator.$.escape(this.options.userString(annotation.user));
+        field.html(user).addClass('annotator-user');
+      } else {
+        field.remove();
+      }
+      if (annotation.permissions) {
+        if (!this.authorize('update', annotation)) {
+          controls.hideEdit();
+        }
+        if (!this.authorize('delete', annotation)) {
+          return controls.hideDelete();
+        }
+      } else if (annotation.user && !this.authorize(null, annotation)) {
+        controls.hideEdit();
+        return controls.hideDelete();
+      }
+    };
+    return Permissions;
+  })();
+}).call(this);
Index: /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.store.min.js
===================================================================
--- /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.store.min.js	(revision 24776)
+++ /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.store.min.js	(revision 24776)
@@ -0,0 +1,229 @@
+(function() {
+  var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.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;
+  }, __indexOf = Array.prototype.indexOf || function(item) {
+    for (var i = 0, l = this.length; i < l; i++) {
+      if (this[i] === item) return i;
+    }
+    return -1;
+  };
+  Annotator.Plugin.Store = (function() {
+    __extends(Store, Annotator.Plugin);
+    Store.prototype.events = {
+      'annotationCreated': 'annotationCreated',
+      'annotationDeleted': 'annotationDeleted',
+      'annotationUpdated': 'annotationUpdated'
+    };
+    Store.prototype.options = {
+      prefix: '/store',
+      autoFetch: true,
+      annotationData: {},
+      loadFromSearch: false,
+      urls: {
+        create: '/annotations',
+        read: '/annotations/:id',
+        update: '/annotations/:id',
+        destroy: '/annotations/:id',
+        search: '/search'
+      }
+    };
+    function Store(element, options) {
+      this._onError = __bind(this._onError, this);
+      this._onBeforeSend = __bind(this._onBeforeSend, this);
+      this._onLoadAnnotationsFromSearch = __bind(this._onLoadAnnotationsFromSearch, this);
+      this._onLoadAnnotations = __bind(this._onLoadAnnotations, this);
+      this._getAnnotations = __bind(this._getAnnotations, this);      Store.__super__.constructor.apply(this, arguments);
+      this.annotations = [];
+    }
+    Store.prototype.pluginInit = function() {
+      var auth;
+      if (!Annotator.supported()) {
+        return;
+      }
+      auth = this.element.data('annotator:auth');
+      if (auth) {
+        return auth.withToken(this._getAnnotations);
+      } else {
+        return this._getAnnotations();
+      }
+    };
+    Store.prototype._getAnnotations = function() {
+      if (this.options.loadFromSearch) {
+        return this.loadAnnotationsFromSearch(this.options.loadFromSearch);
+      } else {
+        return this.loadAnnotations();
+      }
+    };
+    Store.prototype.annotationCreated = function(annotation) {
+      if (__indexOf.call(this.annotations, annotation) < 0) {
+        this.registerAnnotation(annotation);
+        return this._apiRequest('create', annotation, __bind(function(data) {
+          if (!(data.id != null)) {
+            console.warn("Warning: No ID returned from server for annotation ", annotation);
+          }
+          return this.updateAnnotation(annotation, data);
+        }, this));
+      } else {
+        return this.updateAnnotation(annotation, {});
+      }
+    };
+    Store.prototype.annotationUpdated = function(annotation) {
+      if (__indexOf.call(this.annotations, annotation) >= 0) {
+        return this._apiRequest('update', annotation, (__bind(function(data) {
+          return this.updateAnnotation(annotation, data);
+        }, this)));
+      }
+    };
+    Store.prototype.annotationDeleted = function(annotation) {
+      if (__indexOf.call(this.annotations, annotation) >= 0) {
+        return this._apiRequest('destroy', annotation, (__bind(function() {
+          return this.unregisterAnnotation(annotation);
+        }, this)));
+      }
+    };
+    Store.prototype.registerAnnotation = function(annotation) {
+      return this.annotations.push(annotation);
+    };
+    Store.prototype.unregisterAnnotation = function(annotation) {
+      return this.annotations.splice(this.annotations.indexOf(annotation), 1);
+    };
+    Store.prototype.updateAnnotation = function(annotation, data) {
+      if (__indexOf.call(this.annotations, annotation) < 0) {
+        console.error("Trying to update unregistered annotation!");
+      } else {
+        $.extend(annotation, data);
+      }
+      return $(annotation.highlights).data('annotation', annotation);
+    };
+    Store.prototype.loadAnnotations = function() {
+      return this._apiRequest('read', null, this._onLoadAnnotations);
+    };
+    Store.prototype._onLoadAnnotations = function(data) {
+      if (data == null) {
+        data = [];
+      }
+      this.annotations = data;
+      return this.annotator.loadAnnotations(data.slice());
+    };
+    Store.prototype.loadAnnotationsFromSearch = function(searchOptions) {
+      return this._apiRequest('search', searchOptions, this._onLoadAnnotationsFromSearch);
+    };
+    Store.prototype._onLoadAnnotationsFromSearch = function(data) {
+      if (data == null) {
+        data = {};
+      }
+      return this._onLoadAnnotations(data.rows || []);
+    };
+    Store.prototype.dumpAnnotations = function() {
+      var ann, _i, _len, _ref, _results;
+      _ref = this.annotations;
+      _results = [];
+      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+        ann = _ref[_i];
+        _results.push(JSON.parse(this._dataFor(ann)));
+      }
+      return _results;
+    };
+    Store.prototype._apiRequest = function(action, obj, onSuccess) {
+      var id, options, request, url;
+      id = obj && obj.id;
+      url = this._urlFor(action, id);
+      options = this._apiRequestOptions(action, obj, onSuccess);
+      request = $.ajax(url, options);
+      request._id = id;
+      request._action = action;
+      return request;
+    };
+    Store.prototype._apiRequestOptions = function(action, obj, onSuccess) {
+      var opts;
+      opts = {
+        type: this._methodFor(action),
+        beforeSend: this._onBeforeSend,
+        dataType: "json",
+        success: onSuccess || function() {},
+        error: this._onError
+      };
+      if (action === "search") {
+        opts = $.extend(opts, {
+          data: obj
+        });
+      } else {
+        opts = $.extend(opts, {
+          data: obj && this._dataFor(obj),
+          contentType: "application/json; charset=utf-8"
+        });
+      }
+      return opts;
+    };
+    Store.prototype._urlFor = function(action, id) {
+      var replaceWith, url;
+      replaceWith = id != null ? '/' + id : '';
+      url = this.options.prefix || '/';
+      url += this.options.urls[action];
+      url = url.replace(/\/:id/, replaceWith);
+      return url;
+    };
+    Store.prototype._methodFor = function(action) {
+      var table;
+      table = {
+        'create': 'POST',
+        'read': 'GET',
+        'update': 'PUT',
+        'destroy': 'DELETE',
+        'search': 'GET'
+      };
+      return table[action];
+    };
+    Store.prototype._dataFor = function(annotation) {
+      var data, highlights;
+      highlights = annotation.highlights;
+      delete annotation.highlights;
+      $.extend(annotation, this.options.annotationData);
+      data = JSON.stringify(annotation);
+      if (highlights) {
+        annotation.highlights = highlights;
+      }
+      return data;
+    };
+    Store.prototype._onBeforeSend = function(xhr) {
+      var headers, key, val, _results;
+      headers = this.element.data('annotator:headers');
+      if (headers) {
+        _results = [];
+        for (key in headers) {
+          val = headers[key];
+          _results.push(xhr.setRequestHeader(key, val));
+        }
+        return _results;
+      }
+    };
+    Store.prototype._onError = function(xhr) {
+      var action, message;
+      action = xhr._action;
+      message = "Sorry we could not " + action + " this annotation";
+      if (xhr._action === 'search') {
+        message = "Sorry we could not search the store for annotations";
+      } else if (xhr._action === 'read' && !xhr._id) {
+        message = "Sorry we could not " + action + " the annotations from the store";
+      }
+      switch (xhr.status) {
+        case 401:
+          message = "Sorry you are not allowed to " + action + " this annotation";
+          break;
+        case 404:
+          message = "Sorry we could not connect to the annotations store";
+          break;
+        case 500:
+          message = "Sorry something went wrong with the annotation store";
+      }
+      Annotator.showNotification(message, Annotator.Notification.ERROR);
+      return console.error("API request failed: '" + xhr.status + "'");
+    };
+    return Store;
+  })();
+}).call(this);
Index: /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.tags.min.js
===================================================================
--- /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.tags.min.js	(revision 24776)
+++ /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.tags.min.js	(revision 24776)
@@ -0,0 +1,101 @@
+(function() {
+  var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.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;
+  };
+  Annotator.Plugin.Tags = (function() {
+    __extends(Tags, Annotator.Plugin);
+    function Tags() {
+      this.setAnnotationTags = __bind(this.setAnnotationTags, this);
+      this.updateField = __bind(this.updateField, this);
+      Tags.__super__.constructor.apply(this, arguments);
+    }
+    Tags.prototype.field = null;
+    Tags.prototype.input = null;
+    Tags.prototype.pluginInit = function() {
+      if (!Annotator.supported()) {
+        return;
+      }
+      this.field = this.annotator.editor.addField({
+        label: 'Add some tags here\u2026',
+        load: this.updateField,
+        submit: this.setAnnotationTags
+      });
+      this.annotator.viewer.addField({
+        load: this.updateViewer
+      });
+      if (this.annotator.plugins.Filter) {
+        this.annotator.plugins.Filter.addFilter({
+          label: 'Tag',
+          property: 'tags',
+          isFiltered: Annotator.Plugin.Tags.filterCallback
+        });
+      }
+      return this.input = $(this.field).find(':input');
+    };
+    Tags.prototype.parseTags = function(string) {
+      var tags;
+      string = $.trim(string);
+      tags = [];
+      if (string) {
+        tags = string.split(/\s+/);
+      }
+      return tags;
+    };
+    Tags.prototype.stringifyTags = function(array) {
+      return array.join(" ");
+    };
+    Tags.prototype.updateField = function(field, annotation) {
+      var value;
+      value = '';
+      if (annotation.tags) {
+        value = this.stringifyTags(annotation.tags);
+      }
+      return this.input.val(value);
+    };
+    Tags.prototype.setAnnotationTags = function(field, annotation) {
+      return annotation.tags = this.parseTags(this.input.val());
+    };
+    Tags.prototype.updateViewer = function(field, annotation) {
+      field = $(field);
+      if (annotation.tags && $.isArray(annotation.tags) && annotation.tags.length) {
+        return field.addClass('annotator-tags').html(function() {
+          var string;
+          return string = $.map(annotation.tags, function(tag) {
+            return '<span class="annotator-tag">' + Annotator.$.escape(tag) + '</span>';
+          }).join(' ');
+        });
+      } else {
+        return field.remove();
+      }
+    };
+    return Tags;
+  })();
+  Annotator.Plugin.Tags.filterCallback = function(input, tags) {
+    var keyword, keywords, matches, tag, _i, _j, _len, _len2;
+    if (tags == null) {
+      tags = [];
+    }
+    matches = 0;
+    keywords = [];
+    if (input) {
+      keywords = input.split(/\s+/g);
+      for (_i = 0, _len = keywords.length; _i < _len; _i++) {
+        keyword = keywords[_i];
+        if (tags.length) {
+          for (_j = 0, _len2 = tags.length; _j < _len2; _j++) {
+            tag = tags[_j];
+            if (tag.indexOf(keyword) !== -1) {
+              matches += 1;
+            }
+          }
+        }
+      }
+    }
+    return matches === keywords.length;
+  };
+}).call(this);
Index: /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.unsupported.min.js
===================================================================
--- /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.unsupported.min.js	(revision 24776)
+++ /main/trunk/model-cols-dev/peijones/js/annotator/pkg/annotator.unsupported.min.js	(revision 24776)
@@ -0,0 +1,30 @@
+(function() {
+  var __hasProp = Object.prototype.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;
+  }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
+  Annotator.Plugin.Unsupported = (function() {
+    __extends(Unsupported, Annotator.Plugin);
+    function Unsupported() {
+      Unsupported.__super__.constructor.apply(this, arguments);
+    }
+    Unsupported.prototype.options = {
+      message: "Sorry your current browser does not support the Annotator"
+    };
+    Unsupported.prototype.pluginInit = function() {
+      if (!Annotator.supported()) {
+        return $(__bind(function() {
+          Annotator.showNotification(this.options.message);
+          if ((window.XMLHttpRequest === void 0) && (ActiveXObject !== void 0)) {
+            return $('html').addClass('ie6');
+          }
+        }, this));
+      }
+    };
+    return Unsupported;
+  })();
+}).call(this);
