Commit 20767d5c by Arthur Barrett

create notes djangoapp for annotator.js

parent 0b2226b0
/*
** Annotator v1.2.6
** https://github.com/okfn/annotator/
**
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE
**
** Built at: 2013-01-21 09:43:42Z
*/((function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t=Array.prototype.slice,u=Object.prototype.hasOwnProperty,v=function(a,b){function d(){this.constructor=a}for(var c in b)u.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},w=function(a,b){return function(){return a.apply(b,arguments)}};i=null,typeof Gettext!="undefined"&&Gettext!==null?(l=new Gettext({domain:"annotator"}),i=function(a){return l.gettext(a)}):i=function(a){return a},s=function(a){return i(a)},(typeof jQuery!="undefined"&&jQuery!==null?(q=jQuery.fn)!=null?q.jquery:void 0:void 0)||console.error(s("Annotator requires jQuery: have you included lib/vendor/jquery.js?")),JSON&&JSON.parse&&JSON.stringify||console.error(s("Annotator requires a JSON implementation: have you included lib/vendor/json2.js?")),a=jQuery.sub(),a.flatten=function(b){var c;return c=function(b){var d,e,f,g;e=[];for(f=0,g=b.length;f<g;f++)d=b[f],e=e.concat(d&&a.isArray(d)?c(d):d);return e},c(b)},a.plugin=function(b,c){return jQuery.fn[b]=function(d){var e;return e=Array.prototype.slice.call(arguments,1),this.each(function(){var f;return f=a.data(this,b),f?d&&f[d].apply(f,e):(f=new c(this,d),a.data(this,b,f))})}},a.fn.textNodes=function(){var b;return b=function(a){var c;if(a&&a.nodeType!==3){c=[];if(a.nodeType!==8){a=a.lastChild;while(a)c.push(b(a)),a=a.previousSibling}return c.reverse()}return a},this.map(function(){return a.flatten(b(this))})},a.fn.xpath=function(b){var c;return c=this.map(function(){var c,d,e;e="",c=this;while(c&&c.nodeType===1&&c!==b)d=a(c.parentNode).children(c.tagName).index(c)+1,d="["+d+"]",e="/"+c.tagName.toLowerCase()+d+e,c=c.parentNode;return e}),c.get()},a.escape=function(a){return a.replace(/&(?!\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},a.fn.escape=function(b){return arguments.length?this.html(a.escape(b)):this.html()},a.fn.reverse=[]._reverse||[].reverse,g=["log","debug","info","warn","exception","assert","dir","dirxml","trace","group","groupEnd","groupCollapsed","time","timeEnd","profile","profileEnd","count","clear","table","error","notifyFirebug","firebug","userObjects"];if(typeof console!="undefined"&&console!==null){console.group==null&&(console.group=function(a){return console.log("GROUP: ",a)}),console.groupCollapsed==null&&(console.groupCollapsed=console.group);for(m=0,o=g.length;m<o;m++)f=g[m],console[f]==null&&(console[f]=function(){return console.log(s("Not implemented:")+(" console."+name))})}else{this.console={};for(n=0,p=g.length;n<p;n++)f=g[n],this.console[f]=function(){};this.console.error=function(){var a;return a=1<=arguments.length?t.call(arguments,0):[],alert("ERROR: "+a.join(", "))},this.console.warn=function(){var a;return a=1<=arguments.length?t.call(arguments,0):[],alert("WARNING: "+a.join(", "))}}c=function(){function b(b,c){this.options=a.extend(!0,{},this.options,c),this.element=a(b),this.on=this.subscribe,this.addEvents()}return b.prototype.events={},b.prototype.options={},b.prototype.element=null,b.prototype.addEvents=function(){var a,b,c,d,e,f,g,h;f=this.events,h=[];for(c in f)b=f[c],g=c.split(" "),d=2<=g.length?t.call(g,0,e=g.length-1):(e=0,[]),a=g[e++],h.push(this.addEvent(d.join(" "),a,b));return h},b.prototype.addEvent=function(b,c,d){var e,f,g=this;return e=function(){return g[d].apply(g,arguments)},f=typeof b=="string"&&b.replace(/\s+/g,"")==="",f&&(b=this.element),typeof b=="string"?this.element.delegate(b,c,e):this.isCustomEvent(c)?this.subscribe(c,e):a(b).bind(c,e),this},b.prototype.isCustomEvent=function(c){return c=c.split(".")[0],a.inArray(c,b.natives)===-1},b.prototype.publish=function(){return this.element.triggerHandler.apply(this.element,arguments),this},b.prototype.subscribe=function(b,c){var d;return d=function(){return c.apply(this,[].slice.call(arguments,1))},d.guid=c.guid=a.guid+=1,this.element.bind(b,d),this},b.prototype.unsubscribe=function(){return this.element.unbind.apply(this.element,arguments),this},b}(),c.natives=function(){var a,b,c;return b=function(){var b,d;b=jQuery.event.special,d=[];for(a in b){if(!u.call(b,a))continue;c=b[a],d.push(a)}return d}(),"blur focus focusin focusout load resize scroll unload click dblclick\nmousedown mouseup mousemove mouseover mouseout mouseenter mouseleave\nchange select submit keydown keypress keyup error".split(/[^a-z]+/).concat(b)}(),e={},e.sniff=function(a){return a.commonAncestorContainer!=null?new e.BrowserRange(a):typeof a.start=="string"?new e.SerializedRange(a):a.start&&typeof a.start=="object"?new e.NormalizedRange(a):(console.error(s("Could not sniff range type")),!1)},e.nodeFromXPath=function(b,c){var d,e,f,g,h;return c==null&&(c=document),e=function(a,b){return b==null&&(b=null),document.evaluate("."+a,c,b,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue},a.isXMLDoc(document.documentElement)?(d=document.createNSResolver(document.ownerDocument===null?document.documentElement:document.ownerDocument.documentElement),g=e(b,d),g||(b=function(){var a,c,d,e;d=b.split("/"),e=[];for(a=0,c=d.length;a<c;a++)h=d[a],h&&h.indexOf(":")===-1?e.push(h.replace(/^([a-z]+)/,"xhtml:$1")):e.push(h);return e}().join("/"),f=document.lookupNamespaceURI(null),d=function(a){return a==="xhtml"?f:document.documentElement.getAttribute("xmlns:"+a)},g=e(b,d)),g):e(b)},e.RangeError=function(a){function b(a,c,d){this.type=a,this.message=c,this.parent=d!=null?d:null,b.__super__.constructor.call(this,this.message)}return v(b,a),b}(Error),e.BrowserRange=function(){function a(a){this.commonAncestorContainer=a.commonAncestorContainer,this.startContainer=a.startContainer,this.startOffset=a.startOffset,this.endContainer=a.endContainer,this.endOffset=a.endOffset}return a.prototype.normalize=function(a){var b,c,d,f,g,h,i,j,k;if(this.tainted)return console.error(s("You may only call normalize() once on a BrowserRange!")),!1;this.tainted=!0,h={},d={},k=["start","end"];for(i=0,j=k.length;i<j;i++){g=k[i],c=this[g+"Container"],f=this[g+"Offset"];if(c.nodeType===1){b=c.childNodes[f],c=b||c.childNodes[f-1],c.nodeType===1&&!c.firstChild&&(b=null,c=c.previousSibling);while(c.nodeType!==3)c=c.firstChild;f=b?0:c.nodeValue.length}h[g]=c,h[g+"Offset"]=f}d.start=h.startOffset>0?h.start.splitText(h.startOffset):h.start,h.start===h.end?(h.endOffset-h.startOffset<d.start.nodeValue.length&&d.start.splitText(h.endOffset-h.startOffset),d.end=d.start):(h.endOffset<h.end.nodeValue.length&&h.end.splitText(h.endOffset),d.end=h.end),d.commonAncestor=this.commonAncestorContainer;while(d.commonAncestor.nodeType!==1)d.commonAncestor=d.commonAncestor.parentNode;return new e.NormalizedRange(d)},a.prototype.serialize=function(a,b){return this.normalize(a).serialize(a,b)},a}(),e.NormalizedRange=function(){function b(a){this.commonAncestor=a.commonAncestor,this.start=a.start,this.end=a.end}return b.prototype.normalize=function(a){return this},b.prototype.limit=function(b){var c,d,e,f,g,h;c=a.grep(this.textNodes(),function(c){return c.parentNode===b||a.contains(b,c.parentNode)});if(!c.length)return null;this.start=c[0],this.end=c[c.length-1],e=a(this.start).parents(),h=a(this.end).parents();for(f=0,g=h.length;f<g;f++){d=h[f];if(e.index(d)!==-1){this.commonAncestor=d;break}}return this},b.prototype.serialize=function(b,c){var d,f,g;return f=function(d,e){var f,g,h,i,j,k,l,m;c?i=a(d).parents(":not("+c+")").eq(0):i=a(d).parent(),k=i.xpath(b)[0],j=i.textNodes(),g=j.slice(0,j.index(d)),h=0;for(l=0,m=g.length;l<m;l++)f=g[l],h+=f.nodeValue.length;return e?[k,h+d.nodeValue.length]:[k,h]},g=f(this.start),d=f(this.end,!0),new e.SerializedRange({start:g[0],end:d[0],startOffset:g[1],endOffset:d[1]})},b.prototype.text=function(){var a;return function(){var b,c,d,e;d=this.textNodes(),e=[];for(b=0,c=d.length;b<c;b++)a=d[b],e.push(a.nodeValue);return e}.call(this).join("")},b.prototype.textNodes=function(){var b,c,d,e;return d=a(this.commonAncestor).textNodes(),e=[d.index(this.start),d.index(this.end)],c=e[0],b=e[1],a.makeArray(d.slice(c,b+1||9e9))},b.prototype.toRange=function(){var a;return a=document.createRange(),a.setStartBefore(this.start),a.setEndAfter(this.end),a},b}(),e.SerializedRange=function(){function b(a){this.start=a.start,this.startOffset=a.startOffset,this.end=a.end,this.endOffset=a.endOffset}return b.prototype.normalize=function(b){var c,d,f,g,h,i,j,k,l,m,n,o;h={},n=["start","end"];for(j=0,l=n.length;j<l;j++){g=n[j];try{f=e.nodeFromXPath(this[g],b)}catch(p){throw new e.RangeError(g,"Error while finding "+g+" node: "+this[g]+": "+p,p)}if(!f)throw new e.RangeError(g,"Couldn't find "+g+" node: "+this[g]);d=0,o=a(f).textNodes();for(k=0,m=o.length;k<m;k++){i=o[k];if(d+i.nodeValue.length>=this[g+"Offset"]){h[g+"Container"]=i,h[g+"Offset"]=this[g+"Offset"]-d;break}d+=i.nodeValue.length}if(h[g+"Offset"]==null)throw new e.RangeError(""+g+"offset","Couldn't find offset "+this[g+"Offset"]+" in element "+this[g])}return c=document.compareDocumentPosition==null?function(a,b){return a.contains(b)}:function(a,b){return a.compareDocumentPosition(b)&16},a(h.startContainer).parents().each(function(){if(c(this,h.endContainer))return h.commonAncestorContainer=this,!1}),(new e.BrowserRange(h)).normalize(b)},b.prototype.serialize=function(a,b){return this.normalize(a).serialize(a,b)},b.prototype.toObject=function(){return{start:this.start,startOffset:this.startOffset,end:this.end,endOffset:this.endOffset}},b}(),j={uuid:function(){var a;return a=0,function(){return a++}}(),getGlobal:function(){return function(){return this}()},maxZIndex:function(b){var c,d;return c=function(){var c,e,f;f=[];for(c=0,e=b.length;c<e;c++)d=b[c],a(d).css("position")==="static"?f.push(-1):f.push(parseInt(a(d).css("z-index"),10)||-1);return f}(),Math.max.apply(Math,c)},mousePosition:function(b,c){var d;return d=a(c).offset(),{top:b.pageY-d.top,left:b.pageX-d.left}},preventEventDefault:function(a){return a!=null?typeof a.preventDefault=="function"?a.preventDefault():void 0:void 0}},k=this.Annotator,b=function(b){function c(b,d){this.onDeleteAnnotation=w(this.onDeleteAnnotation,this),this.onEditAnnotation=w(this.onEditAnnotation,this),this.onAdderClick=w(this.onAdderClick,this),this.onAdderMousedown=w(this.onAdderMousedown,this),this.onHighlightMouseover=w(this.onHighlightMouseover,this),this.checkForEndSelection=w(this.checkForEndSelection,this),this.checkForStartSelection=w(this.checkForStartSelection,this),this.clearViewerHideTimer=w(this.clearViewerHideTimer,this),this.startViewerHideTimer=w(this.startViewerHideTimer,this),this.showViewer=w(this.showViewer,this),this.onEditorSubmit=w(this.onEditorSubmit,this),this.onEditorHide=w(this.onEditorHide,this),this.showEditor=w(this.showEditor,this),c.__super__.constructor.apply(this,arguments),this.plugins={};if(!c.supported())return this;this.options.readOnly||this._setupDocumentEvents(),this._setupWrapper()._setupViewer()._setupEditor(),this._setupDynamicStyle(),this.adder=a(this.html.adder).appendTo(this.wrapper).hide()}return v(c,b),c.prototype.events={".annotator-adder button click":"onAdderClick",".annotator-adder button mousedown":"onAdderMousedown",".annotator-hl mouseover":"onHighlightMouseover",".annotator-hl mouseout":"startViewerHideTimer"},c.prototype.html={adder:'<div class="annotator-adder"><button>'+s("Annotate")+"</button></div>",wrapper:'<div class="annotator-wrapper"></div>'},c.prototype.options={readOnly:!1},c.prototype.plugins={},c.prototype.editor=null,c.prototype.viewer=null,c.prototype.selectedRanges=null,c.prototype.mouseIsDown=!1,c.prototype.ignoreMouseup=!1,c.prototype.viewerHideTimer=null,c.prototype._setupWrapper=function(){return this.wrapper=a(this.html.wrapper),this.element.find("script").remove(),this.element.wrapInner(this.wrapper),this.wrapper=this.element.find(".annotator-wrapper"),this},c.prototype._setupViewer=function(){var b=this;return this.viewer=new c.Viewer({readOnly:this.options.readOnly}),this.viewer.hide().on("edit",this.onEditAnnotation).on("delete",this.onDeleteAnnotation).addField({load:function(c,d){return d.text?a(c).escape(d.text):a(c).html("<i>"+s("No Comment")+"</i>"),b.publish("annotationViewerTextField",[c,d])}}).element.appendTo(this.wrapper).bind({mouseover:this.clearViewerHideTimer,mouseout:this.startViewerHideTimer}),this},c.prototype._setupEditor=function(){return this.editor=new c.Editor,this.editor.hide().on("hide",this.onEditorHide).on("save",this.onEditorSubmit).addField({type:"textarea",label:s("Comments")+"…",load:function(b,c){return a(b).find("textarea").val(c.text||"")},submit:function(b,c){return c.text=a(b).find("textarea").val()}}),this.editor.element.appendTo(this.wrapper),this},c.prototype._setupDocumentEvents=function(){return a(document).bind({mouseup:this.checkForEndSelection,mousedown:this.checkForStartSelection}),this},c.prototype._setupDynamicStyle=function(){var b,c,d,e;return d=a("#annotator-dynamic-style"),d.length||(d=a('<style id="annotator-dynamic-style"></style>').appendTo(document.head)),c="*"+function(){var a,b,c,d;c=["adder","outer","notice","filter"],d=[];for(a=0,b=c.length;a<b;a++)e=c[a],d.push(":not(.annotator-"+e+")");return d}().join(""),b=j.maxZIndex(a(document.body).find(c)),b=Math.max(b,1e3),d.text([".annotator-adder, .annotator-outer, .annotator-notice {"," z-index: "+(b+20)+";","}",".annotator-filter {"," z-index: "+(b+10)+";","}"].join("\n")),this},c.prototype.getSelectedRanges=function(){var b,c,d,f,g,h,i,k,l;i=j.getGlobal().getSelection(),g=[],h=[],i.isCollapsed||(g=function(){var a,g;g=[];for(c=0,a=i.rangeCount;0<=a?c<a:c>a;0<=a?c++:c--)f=i.getRangeAt(c),b=new e.BrowserRange(f),d=b.normalize().limit(this.wrapper[0]),d===null&&h.push(f),g.push(d);return g}.call(this),i.removeAllRanges());for(k=0,l=h.length;k<l;k++)f=h[k],i.addRange(f);return a.grep(g,function(a){return a&&i.addRange(a.toRange()),a})},c.prototype.createAnnotation=function(){var a;return a={},this.publish("beforeAnnotationCreated",[a]),a},c.prototype.setupAnnotation=function(b,c){var d,f,g,h,i,j,k,l,m;c==null&&(c=!0),h=this.wrapper[0],b.ranges||(b.ranges=this.selectedRanges),f=[],m=b.ranges;for(i=0,k=m.length;i<k;i++){g=m[i];try{f.push(e.sniff(g).normalize(h))}catch(n){if(!(n instanceof e.RangeError))throw n;this.publish("rangeNormalizeFail",[b,g,n])}}b.quote=[],b.ranges=[],b.highlights=[];for(j=0,l=f.length;j<l;j++)d=f[j],b.quote.push(a.trim(d.text())),b.ranges.push(d.serialize(this.wrapper[0],".annotator-hl")),a.merge(b.highlights,this.highlightRange(d));return b.quote=b.quote.join(" / "),a(b.highlights).data("annotation",b),c&&this.publish("annotationCreated",[b]),b},c.prototype.updateAnnotation=function(a){return this.publish("beforeAnnotationUpdated",[a]),this.publish("annotationUpdated",[a]),a},c.prototype.deleteAnnotation=function(b){var c,d,e,f;f=b.highlights;for(d=0,e=f.length;d<e;d++)c=f[d],a(c).replaceWith(c.childNodes);return this.publish("annotationDeleted",[b]),b},c.prototype.loadAnnotations=function(a){var b,c,d=this;return a==null&&(a=[]),c=function(a){var e,f,g,h;a==null&&(a=[]),f=a.splice(0,10);for(g=0,h=f.length;g<h;g++)e=f[g],d.setupAnnotation(e,!1);return a.length>0?setTimeout(function(){return c(a)},10):d.publish("annotationsLoaded",[b])},b=a.slice(),a.length&&c(a),this},c.prototype.dumpAnnotations=function(){return this.plugins.Store?this.plugins.Store.dumpAnnotations():console.warn(s("Can't dump annotations without Store plugin."))},c.prototype.highlightRange=function(b,c){var d,e,f,g,h,i,j;c==null&&(c="annotator-hl"),f=/^\s*$/,d=a("<span class='"+c+"'></span>"),i=b.textNodes(),j=[];for(g=0,h=i.length;g<h;g++)e=i[g],f.test(e.nodeValue)||j.push(a(e).wrapAll(d).parent().show()[0]);return j},c.prototype.highlightRanges=function(b,c){var d,e,f,g;c==null&&(c="annotator-hl"),d=[];for(f=0,g=b.length;f<g;f++)e=b[f],a.merge(d,this.highlightRange(e,c));return d},c.prototype.addPlugin=function(a,b){var d,e;return this.plugins[a]?console.error(s("You cannot have more than one instance of any plugin.")):(d=c.Plugin[a],typeof d=="function"?(this.plugins[a]=new d(this.element[0],b),this.plugins[a].annotator=this,typeof (e=this.plugins[a]).pluginInit=="function"&&e.pluginInit()):console.error(s("Could not load ")+a+s(" plugin. Have you included the appropriate <script> tag?"))),this},c.prototype.showEditor=function(a,b){return this.editor.element.css(b),this.editor.load(a),this.publish("annotationEditorShown",[this.editor,a]),this},c.prototype.onEditorHide=function(){return this.publish("annotationEditorHidden",[this.editor]),this.ignoreMouseup=!1},c.prototype.onEditorSubmit=function(a){return this.publish("annotationEditorSubmit",[this.editor,a]),a.ranges===void 0?this.setupAnnotation(a):this.updateAnnotation(a)},c.prototype.showViewer=function(a,b){return this.viewer.element.css(b),this.viewer.load(a),this.publish("annotationViewerShown",[this.viewer,a])},c.prototype.startViewerHideTimer=function(){if(!this.viewerHideTimer)return this.viewerHideTimer=setTimeout(this.viewer.hide,250)},c.prototype.clearViewerHideTimer=function(){return clearTimeout(this.viewerHideTimer),this.viewerHideTimer=!1},c.prototype.checkForStartSelection=function(a){if(!a||!this.isAnnotator(a.target))return this.startViewerHideTimer(),this.mouseIsDown=!0},c.prototype.checkForEndSelection=function(b){var c,d,e,f,g;this.mouseIsDown=!1;if(this.ignoreMouseup)return;this.selectedRanges=this.getSelectedRanges(),g=this.selectedRanges;for(e=0,f=g.length;e<f;e++){d=g[e],c=d.commonAncestor,a(c).hasClass("annotator-hl")&&(c=a(c).parents("[class^=annotator-hl]")[0]);if(this.isAnnotator(c))return}return b&&this.selectedRanges.length?this.adder.css(j.mousePosition(b,this.wrapper[0])).show():this.adder.hide()},c.prototype.isAnnotator=function(b){return!!a(b).parents().andSelf().filter("[class^=annotator-]").not(this.wrapper).length},c.prototype.onHighlightMouseover=function(b){var c;return this.clearViewerHideTimer(),this.mouseIsDown||this.viewer.isShown()?!1:(c=a(b.target).parents(".annotator-hl").andSelf().map(function(){return a(this).data("annotation")}),this.showViewer(a.makeArray(c),j.mousePosition(b,this.wrapper[0])))},c.prototype.onAdderMousedown=function(a){return a!=null&&a.preventDefault(),this.ignoreMouseup=!0},c.prototype.onAdderClick=function(b){var c,d,f,g;return b!=null&&b.preventDefault(),d=this.adder.position(),this.adder.hide(),this.selectedRanges&&this.selectedRanges.length&&(g=function(){var a,b,c,d;c=this.selectedRanges,d=[];for(a=0,b=c.length;a<b;a++)f=c[a],d.push(e.sniff(f).normalize());return d}.call(this),c=this.highlightRanges(g,"annotator-hl annotator-hl-temporary"),this.editor.element.one("hide",function(){var b,d,e,f;f=[];for(d=0,e=c.length;d<e;d++)b=c[d],f.push(a(b).replaceWith(b.childNodes));return f})),this.showEditor(this.createAnnotation(),d)},c.prototype.onEditAnnotation=function(a){var b;return b=this.viewer.element.position(),this.viewer.hide(),this.showEditor(a,b)},c.prototype.onDeleteAnnotation=function(a){return this.viewer.hide(),this.deleteAnnotation(a)},c}(c),b.Plugin=function(a){function b(a,c){b.__super__.constructor.apply(this,arguments)}return v(b,a),b.prototype.pluginInit=function(){},b}(c),h=j.getGlobal(),((r=h.document)!=null?r.evaluate:void 0)==null&&a.getScript("http://assets.annotateit.org/vendor/xpath.min.js"),h.getSelection==null&&a.getScript("http://assets.annotateit.org/vendor/ierange.min.js"),h.JSON==null&&a.getScript("http://assets.annotateit.org/vendor/json2.min.js"),b.$=a,b.Delegator=c,b.Range=e,b._t=s,b.supported=function(){return function(){return!!this.getSelection}()},b.noConflict=function(){return j.getGlobal().Annotator=k,this},a.plugin("annotator",b),this.Annotator=b,b.Widget=function(c){function d(c,e){d.__super__.constructor.apply(this,arguments),this.classes=a.extend({},b.Widget.prototype.classes,this.classes)}return v(d,c),d.prototype.classes={hide:"annotator-hide",invert:{x:"annotator-invert-x",y:"annotator-invert-y"}},d.prototype.checkOrientation=function(){var b,c,d,e,f;return this.resetOrientation(),f=a(j.getGlobal()),e=this.element.children(":first"),c=e.offset(),d={top:f.scrollTop(),right:f.width()+f.scrollLeft()},b={top:c.top,right:c.left+e.width()},b.top-d.top<0&&this.invertY(),b.right-d.right>0&&this.invertX(),this},d.prototype.resetOrientation=function(){return this.element.removeClass(this.classes.invert.x).removeClass(this.classes.invert.y),this},d.prototype.invertX=function(){return this.element.addClass(this.classes.invert.x),this},d.prototype.invertY=function(){return this.element.addClass(this.classes.invert.y),this},d.prototype.isInvertedY=function(){return this.element.hasClass(this.classes.invert.y)},d.prototype.isInvertedX=function(){return this.element.hasClass(this.classes.invert.x)},d}(c),b.Editor=function(b){function c(b){this.onCancelButtonMouseover=w(this.onCancelButtonMouseover,this),this.processKeypress=w(this.processKeypress,this),this.submit=w(this.submit,this),this.load=w(this.load,this),this.hide=w(this.hide,this),this.show=w(this.show,this),c.__super__.constructor.call(this,a(this.html)[0],b),this.fields=[],this.annotation={}}return v(c,b),c.prototype.events={"form submit":"submit",".annotator-save click":"submit",".annotator-cancel click":"hide",".annotator-cancel mouseover":"onCancelButtonMouseover","textarea keydown":"processKeypress"},c.prototype.classes={hide:"annotator-hide",focus:"annotator-focus"},c.prototype.html='<div class="annotator-outer annotator-editor">\n <form class="annotator-widget">\n <ul class="annotator-listing"></ul>\n <div class="annotator-controls">\n <a href="#cancel" class="annotator-cancel">'+s("Cancel")+'</a>\n<a href="#save" class="annotator-save annotator-focus">'+s("Save")+"</a>\n </div>\n </form>\n</div>",c.prototype.options={},c.prototype.show=function(a){return j.preventEventDefault(a),this.element.removeClass(this.classes.hide),this.element.find(".annotator-save").addClass(this.classes.focus),this.checkOrientation(),this.element.find(":input:first").focus(),this.setupDraggables(),this.publish("show")},c.prototype.hide=function(a){return j.preventEventDefault(a),this.element.addClass(this.classes.hide),this.publish("hide")},c.prototype.load=function(a){var b,c,d,e;this.annotation=a,this.publish("load",[this.annotation]),e=this.fields;for(c=0,d=e.length;c<d;c++)b=e[c],b.load(b.element,this.annotation);return this.show()},c.prototype.submit=function(a){var b,c,d,e;j.preventEventDefault(a),e=this.fields;for(c=0,d=e.length;c<d;c++)b=e[c],b.submit(b.element,this.annotation);return this.publish("save",[this.annotation]),this.hide()},c.prototype.addField=function(b){var c,d,e;d=a.extend({id:"annotator-field-"+j.uuid(),type:"input",label:"",load:function(){},submit:function(){}},b),e=null,c=a('<li class="annotator-item" />'),d.element=c[0];switch(d.type){case"textarea":e=a("<textarea />");break;case"input":case"checkbox":e=a("<input />")}return c.append(e),e.attr({id:d.id,placeholder:d.label}),d.type==="checkbox"&&(e[0].type="checkbox",c.addClass("annotator-checkbox"),c.append(a("<label />",{"for":d.id,html:d.label}))),this.element.find("ul:first").append(c),this.fields.push(d),d.element},c.prototype.checkOrientation=function(){var a,b;return c.__super__.checkOrientation.apply(this,arguments),b=this.element.find("ul"),a=this.element.find(".annotator-controls"),this.element.hasClass(this.classes.invert.y)?a.insertBefore(b):a.is(":first-child")&&a.insertAfter(b),this},c.prototype.processKeypress=function(a){if(a.keyCode===27)return this.hide();if(a.keyCode===13&&!a.shiftKey)return this.submit()},c.prototype.onCancelButtonMouseover=function(){return this.element.find("."+this.classes.focus).removeClass(this.classes.focus)},c.prototype.setupDraggables=function(){var b,c,d,e,f,g,h,i,j,k,l,m=this;return this.element.find(".annotator-resize").remove(),this.element.hasClass(this.classes.invert.y)?d=this.element.find(".annotator-item:last"):d=this.element.find(".annotator-item:first"),d&&a('<span class="annotator-resize"></span>').appendTo(d),f=null,b=this.classes,e=this.element,k=null,j=e.find(".annotator-resize"),c=e.find(".annotator-controls"),l=!1,g=function(b){if(b.target===this)return f={element:this,top:b.pageY,left:b.pageX},k=e.find("textarea:first"),a(window).bind({"mouseup.annotator-editor-resize":i,"mousemove.annotator-editor-resize":h}),b.preventDefault()},i=function(){return f=null,a(window).unbind(".annotator-editor-resize")},h=function(a){var d,g,h,i,m;if(f&&l===!1)return d={top:a.pageY-f.top,left:a.pageX-f.left},f.element===j[0]?(i=k.outerHeight(),m=k.outerWidth(),g=e.hasClass(b.invert.x)?-1:1,h=e.hasClass(b.invert.y)?1:-1,k.height(i+d.top*h),k.width(m+d.left*g),k.outerHeight()!==i&&(f.top=a.pageY),k.outerWidth()!==m&&(f.left=a.pageX)):f.element===c[0]&&(e.css({top:parseInt(e.css("top"),10)+d.top,left:parseInt(e.css("left"),10)+d.left}),f.top=a.pageY,f.left=a.pageX),l=!0,setTimeout(function(){return l=!1},1e3/60)},j.bind("mousedown",g),c.bind("mousedown",g)},c}(b.Widget),b.Viewer=function(b){function c(b){this.onDeleteClick=w(this.onDeleteClick,this),this.onEditClick=w(this.onEditClick,this),this.load=w(this.load,this),this.hide=w(this.hide,this),this.show=w(this.show,this),c.__super__.constructor.call(this,a(this.html.element)[0],b),this.item=a(this.html.item)[0],this.fields=[],this.annotations=[]}return v(c,b),c.prototype.events={".annotator-edit click":"onEditClick",".annotator-delete click":"onDeleteClick"},c.prototype.classes={hide:"annotator-hide",showControls:"annotator-visible"},c.prototype.html={element:'<div class="annotator-outer annotator-viewer">\n <ul class="annotator-widget annotator-listing"></ul>\n</div>',item:'<li class="annotator-annotation annotator-item">\n <span class="annotator-controls">\n <a href="#" title="View as webpage" class="annotator-link">View as webpage</a>\n <button title="Edit" class="annotator-edit">Edit</button>\n <button title="Delete" class="annotator-delete">Delete</button>\n </span>\n</li>'},c.prototype.options={readOnly:!1},c.prototype.show=function(a){var b,c=this;return j.preventEventDefault(a),b=this.element.find(".annotator-controls").addClass(this.classes.showControls),setTimeout(function(){return b.removeClass(c.classes.showControls)},500),this.element.removeClass(this.classes.hide),this.checkOrientation().publish("show")},c.prototype.isShown=function(){return!this.element.hasClass(this.classes.hide)},c.prototype.hide=function(a){return j.preventEventDefault(a),this.element.addClass(this.classes.hide),this.publish("hide")},c.prototype.load=function(b){var c,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;this.annotations=b||[],n=this.element.find("ul:first").empty(),s=this.annotations;for(o=0,q=s.length;o<q;o++){c=s[o],k=a(this.item).clone().appendTo(n).data("annotation",c),f=k.find(".annotator-controls"),l=f.find(".annotator-link"),h=f.find(".annotator-edit"),g=f.find(".annotator-delete"),m=(new d(c.links||[])).get("alternate",{type:"text/html"}),m.length===0||m[0].href==null?l.remove():l.attr("href",m[0].href),this.options.readOnly?(h.remove(),g.remove()):e={showEdit:function(){return h.removeAttr("disabled")},hideEdit:function(){return h.attr("disabled","disabled")},showDelete:function(){return g.removeAttr("disabled")},hideDelete:function(){return g.attr("disabled","disabled")}},t=this.fields;for(p=0,r=t.length;p<r;p++)j=t[p],i=a(j.element).clone().appendTo(k)[0],j.load(i,c,e)}return this.publish("load",[this.annotations]),this.show()},c.prototype.addField=function(b){var c;return c=a.extend({load:function(){}},b),c.element=a("<div />")[0],this.fields.push(c),c.element,this},c.prototype.onEditClick=function(a){return this.onButtonClick(a,"edit")},c.prototype.onDeleteClick=function(a){return this.onButtonClick(a,"delete")},c.prototype.onButtonClick=function(b,c){var d;return d=a(b.target).parents(".annotator-annotation"),this.publish(c,[d.data("annotation")])},c}(b.Widget),d=function(){function b(a){this.data=a}return b.prototype.get=function(b,c){var d,e,f,g,h,i,j,k,l;c==null&&(c={}),c=a.extend({},c,{rel:b}),f=function(){var a;a=[];for(e in c){if(!u.call(c,e))continue;h=c[e],a.push(e)}return a}(),k=this.data,l=[];for(i=0,j=k.length;i<j;i++){d=k[i],g=f.reduce(function(a,b){return a&&d[b]===c[b]},!0);if(!g)continue;l.push(d)}return l},b}(),b=b||{},b.Notification=function(c){function d(b){this.hide=w(this.hide,this),this.show=w(this.show,this),d.__super__.constructor.call(this,a(this.options.html).appendTo(document.body)[0],b)}return v(d,c),d.prototype.events={click:"hide"},d.prototype.options={html:"<div class='annotator-notice'></div>",classes:{show:"annotator-notice-show",info:"annotator-notice-info",success:"annotator-notice-success",error:"annotator-notice-error"}},d.prototype.show=function(c,d){return d==null&&(d=b.Notification.INFO),a(this.element).addClass(this.options.classes.show).addClass(this.options.classes[d]).escape(c||""),setTimeout(this.hide,5e3),this},d.prototype.hide=function(){return a(this.element).removeClass(this.options.classes.show),this},d}(c),b.Notification.INFO="show",b.Notification.SUCCESS="success",b.Notification.ERROR="error",a(function(){var a;return a=new b.Notification,b.showNotification=a.show,b.hideNotification=a.hide})})).call(this);
\ No newline at end of file
/*
** Annotator v1.2.6
** https://github.com/okfn/annotator/
**
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE
**
** Built at: 2013-01-21 09:43:51Z
*/((function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a},d=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;b<c;b++)if(b in this&&this[b]===a)return b;return-1};Annotator.Plugin.Store=function(b){function e(b,c){this._onError=a(this._onError,this),this._onLoadAnnotationsFromSearch=a(this._onLoadAnnotationsFromSearch,this),this._onLoadAnnotations=a(this._onLoadAnnotations,this),this._getAnnotations=a(this._getAnnotations,this),e.__super__.constructor.apply(this,arguments),this.annotations=[]}return c(e,b),e.prototype.events={annotationCreated:"annotationCreated",annotationDeleted:"annotationDeleted",annotationUpdated:"annotationUpdated"},e.prototype.options={prefix:"/store",autoFetch:!0,annotationData:{},loadFromSearch:!1,urls:{create:"/annotations",read:"/annotations/:id",update:"/annotations/:id",destroy:"/annotations/:id",search:"/search"}},e.prototype.pluginInit=function(){if(!Annotator.supported())return;return this.annotator.plugins.Auth?this.annotator.plugins.Auth.withToken(this._getAnnotations):this._getAnnotations()},e.prototype._getAnnotations=function(){return this.options.loadFromSearch?this.loadAnnotationsFromSearch(this.options.loadFromSearch):this.loadAnnotations()},e.prototype.annotationCreated=function(a){var b=this;return d.call(this.annotations,a)<0?(this.registerAnnotation(a),this._apiRequest("create",a,function(c){return c.id==null&&console.warn(Annotator._t("Warning: No ID returned from server for annotation "),a),b.updateAnnotation(a,c)})):this.updateAnnotation(a,{})},e.prototype.annotationUpdated=function(a){var b=this;if(d.call(this.annotations,a)>=0)return this._apiRequest("update",a,function(c){return b.updateAnnotation(a,c)})},e.prototype.annotationDeleted=function(a){var b=this;if(d.call(this.annotations,a)>=0)return this._apiRequest("destroy",a,function(){return b.unregisterAnnotation(a)})},e.prototype.registerAnnotation=function(a){return this.annotations.push(a)},e.prototype.unregisterAnnotation=function(a){return this.annotations.splice(this.annotations.indexOf(a),1)},e.prototype.updateAnnotation=function(a,b){return d.call(this.annotations,a)<0?console.error(Annotator._t("Trying to update unregistered annotation!")):$.extend(a,b),$(a.highlights).data("annotation",a)},e.prototype.loadAnnotations=function(){return this._apiRequest("read",null,this._onLoadAnnotations)},e.prototype._onLoadAnnotations=function(a){return a==null&&(a=[]),this.annotations=a,this.annotator.loadAnnotations(a.slice())},e.prototype.loadAnnotationsFromSearch=function(a){return this._apiRequest("search",a,this._onLoadAnnotationsFromSearch)},e.prototype._onLoadAnnotationsFromSearch=function(a){return a==null&&(a={}),this._onLoadAnnotations(a.rows||[])},e.prototype.dumpAnnotations=function(){var a,b,c,d,e;d=this.annotations,e=[];for(b=0,c=d.length;b<c;b++)a=d[b],e.push(JSON.parse(this._dataFor(a)));return e},e.prototype._apiRequest=function(a,b,c){var d,e,f,g;return d=b&&b.id,g=this._urlFor(a,d),e=this._apiRequestOptions(a,b,c),f=$.ajax(g,e),f._id=d,f._action=a,f},e.prototype._apiRequestOptions=function(a,b,c){var d;return d={type:this._methodFor(a),headers:this.element.data("annotator:headers"),dataType:"json",success:c||function(){},error:this._onError},a==="search"?d=$.extend(d,{data:b}):d=$.extend(d,{data:b&&this._dataFor(b),contentType:"application/json; charset=utf-8"}),d},e.prototype._urlFor=function(a,b){var c,d;return c=b!=null?"/"+b:"",d=this.options.prefix!=null?this.options.prefix:"",d+=this.options.urls[a],d=d.replace(/\/:id/,c),d},e.prototype._methodFor=function(a){var b;return b={create:"POST",read:"GET",update:"PUT",destroy:"DELETE",search:"GET"},b[a]},e.prototype._dataFor=function(a){var b,c;return c=a.highlights,delete a.highlights,$.extend(a,this.options.annotationData),b=JSON.stringify(a),c&&(a.highlights=c),b},e.prototype._onError=function(a){var b,c;b=a._action,c=Annotator._t("Sorry we could not ")+b+Annotator._t(" this annotation"),a._action==="search"?c=Annotator._t("Sorry we could not search the store for annotations"):a._action==="read"&&!a._id&&(c=Annotator._t("Sorry we could not ")+b+Annotator._t(" the annotations from the store"));switch(a.status){case 401:c=Annotator._t("Sorry you are not allowed to ")+b+Annotator._t(" this annotation");break;case 404:c=Annotator._t("Sorry we could not connect to the annotations store");break;case 500:c=Annotator._t("Sorry something went wrong with the annotation store")}return Annotator.showNotification(c,Annotator.Notification.ERROR),console.error(Annotator._t("API request failed:")+(" '"+a.status+"'"))},e}(Annotator.Plugin)})).call(this);
\ No newline at end of file
/*
** Annotator v1.2.6
** https://github.com/okfn/annotator/
**
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE
**
** Built at: 2013-01-21 09:43:52Z
*/((function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};Annotator.Plugin.Tags=function(b){function d(){this.setAnnotationTags=a(this.setAnnotationTags,this),this.updateField=a(this.updateField,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.options={parseTags:function(a){var b;return a=$.trim(a),b=[],a&&(b=a.split(/\s+/)),b},stringifyTags:function(a){return a.join(" ")}},d.prototype.field=null,d.prototype.input=null,d.prototype.pluginInit=function(){if(!Annotator.supported())return;return this.field=this.annotator.editor.addField({label:Annotator._t("Add some tags here")+"…",load:this.updateField,submit:this.setAnnotationTags}),this.annotator.viewer.addField({load:this.updateViewer}),this.annotator.plugins.Filter&&this.annotator.plugins.Filter.addFilter({label:Annotator._t("Tag"),property:"tags",isFiltered:Annotator.Plugin.Tags.filterCallback}),this.input=$(this.field).find(":input")},d.prototype.parseTags=function(a){return this.options.parseTags(a)},d.prototype.stringifyTags=function(a){return this.options.stringifyTags(a)},d.prototype.updateField=function(a,b){var c;return c="",b.tags&&(c=this.stringifyTags(b.tags)),this.input.val(c)},d.prototype.setAnnotationTags=function(a,b){return b.tags=this.parseTags(this.input.val())},d.prototype.updateViewer=function(a,b){return a=$(a),b.tags&&$.isArray(b.tags)&&b.tags.length?a.addClass("annotator-tags").html(function(){var a;return a=$.map(b.tags,function(a){return'<span class="annotator-tag">'+Annotator.$.escape(a)+"</span>"}).join(" ")}):a.remove()},d}(Annotator.Plugin),Annotator.Plugin.Tags.filterCallback=function(a,b){var c,d,e,f,g,h,i,j;b==null&&(b=[]),e=0,d=[];if(a){d=a.split(/\s+/g);for(g=0,i=d.length;g<i;g++){c=d[g];if(b.length)for(h=0,j=b.length;h<j;h++)f=b[h],f.indexOf(c)!==-1&&(e+=1)}}return e===d.length}})).call(this);
\ No newline at end of file
......@@ -184,6 +184,11 @@ def _combined_open_ended_grading(tab, user, course, active_page):
return tab
return []
def _student_notes(tab, user, course, active_page):
if settings.MITX_FEATURES.get('ENABLE_STUDENT_NOTES'):
link = reverse('notes', args=[course.id])
return [CourseTab('My Notes', link, active_page == 'notes')]
return []
#### Validators
......@@ -226,6 +231,7 @@ VALID_TAB_TYPES = {
'peer_grading': TabImpl(null_validator, _peer_grading),
'staff_grading': TabImpl(null_validator, _staff_grading),
'open_ended': TabImpl(null_validator, _combined_open_ended_grading),
'notes': TabImpl(null_validator, _student_notes)
}
......@@ -319,6 +325,8 @@ def get_default_tabs(user, course, active_page):
tabs.extend(_wiki({'name': 'Wiki', 'type': 'wiki'}, user, course, active_page))
tabs.extend(_student_notes({'name': 'My Notes', 'type': 'notes'}, user, course, active_page))
if user.is_authenticated() and not course.hide_progress_tab:
tabs.extend(_progress({'name': 'Progress'}, user, course, active_page))
......
from django.http import HttpResponse, Http404
from notes.models import Note
import json
import logging
log = logging.getLogger(__name__)
#----------------------------------------------------------------------#
# API requests are routed through api_request() using the resource map.
def api_resource_map():
''' Maps API resources to (method, action) pairs. '''
(GET, PUT, POST, DELETE) = ('GET', 'PUT', 'POST', 'DELETE') # for convenience
return {
'root': {GET: version},
'notes': {GET: index, POST: create},
'note': {GET: read, PUT: update, DELETE: delete},
'search': {GET: search}
}
def api_request(request, course_id, **kwargs):
''' Routes API requests to the appropriate action method and formats the results
(defaults to JSON).
Raises a 404 if the resource type doesn't exist, or if there is no action
method associated with the HTTP method.
'''
resource_map = api_resource_map()
resource_name = kwargs.pop('resource')
resource = resource_map.get(resource_name)
if resource is None:
log.debug('Resource "{0}" does not exist'.format(resource_name))
raise Http404
if request.method not in resource.keys():
log.debug('Resource "{0}" does not support method "{1}"'.format(resource_name, request.method))
raise Http404
log.debug("API request: {0} {1}".format(request.method, resource_name))
action = resource.get(request.method)
result = action(request, course_id, **kwargs)
response = result[0]
data = None
if len(result) == 2:
data = result[1]
formatted = api_format(request, response, data)
response['Content-type'] = formatted[0]
response.content = formatted[1]
log.debug("API response:")
log.debug(response)
return response
def api_format(request, response, data):
''' Returns a two-element list containing the content type and content.
This method does not modify the request or response.
'''
content_type = 'application/json'
if data is None:
content = ''
else:
content = json.dumps(data)
return [content_type, content]
#----------------------------------------------------------------------#
# Exposed API actions via the resource map.
def index(request, course_id):
notes = Note.objects.all()
return [HttpResponse(), [note.as_dict() for note in notes]]
def create(request, course_id):
note = Note(course_id=course_id, body=request.body, user=request.user)
note.save()
response = HttpResponse('', status=303)
response['Location'] = note.get_absolute_url()
return [response, None]
def read(request, course_id, note_id):
try:
note = Note.objects.get(id=note_id)
except Note.DoesNotExist:
return [HttpResponse('', status=404), None]
except Note.MultipleObjectsReturned:
return [HttpResponse('', status=404), None]
if not note.user.id == request.user.id:
return [HttpResponse('', status=403)]
return [HttpResponse(), note.as_dict()]
def update(request, course_id, note_id):
try:
note = Note.objects.get(note_id)
except Note.DoesNotExist:
return [HttpResponse('', status=404), None]
except Note.MultipleObjectsReturned:
return [HttpResponse('', status=404), None]
if not note.user.id == request.user.id:
return [HttpResponse('', status=403)]
note.body = request.body
note.save(update_fields=['body', 'updated'])
return [HttpResponse('', status=303), None]
def delete(request, course_id, note_id):
try:
note = Note.objects.get(note_id)
except Note.DoesNotExist:
return [HttpResponse('', status=404), None]
except Note.MultipleObjectsReturned:
return [HttpResponse('', status=404), None]
if not note.user.id == request.user.id:
return [HttpResponse('', status=403)]
return [HttpResponse('', status=204), None]
def search(request, course_id):
return [HttpResponse(), []]
def version(request, course_id):
return [HttpResponse(), {'name': 'Notes API', 'version': '1.0'}]
from django.db import models
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
import json
class Note(models.Model):
user = models.ForeignKey(User, db_index=True)
course_id = models.CharField(max_length=255, db_index=True)
created = models.DateTimeField(auto_now_add=True, null=True, db_index=True)
updated = models.DateTimeField(auto_now=True, db_index=True)
body = models.TextField()
def get_absolute_url(self):
kwargs = {'course_id': self.course_id, 'note_id': str(self.id)}
return reverse('notes_api_note', kwargs=kwargs)
def as_dict(self):
d = {}
json_body = json.loads(self.body)
if type(json_body) is dict:
d.update(json_body)
d['id'] = self.id
return d
\ No newline at end of file
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
"""
self.assertEqual(1 + 1, 2)
from django.conf.urls import patterns, url
id_regex = r"(?P<note_id>[0-9A-Fa-f]+)"
urlpatterns = patterns('notes.api',
url(r'^api$', 'api_request', {'resource':'root'}, name='notes_api_root'),
url(r'^api/annotations$', 'api_request', {'resource':'notes'}, name='notes_api_notes'),
url(r'^api/annotations/' + id_regex + r'$', 'api_request', {'resource':'note'}, name='notes_api_note'),
url(r'^api/annotations/search$', 'api_request', {'resource':'search'}, name='notes_api_search')
)
from django.http import HttpResponse
from notes.models import Note
import datetime
import logging
log = logging.getLogger(__name__)
#----------------------------------------------------------------------#
# HTML views.
#
# Example for enabling annotator.js (snippet):
#
# $('body').annotator()
# .annotator('addPlugin', 'Tags')
# .annotator('addPlugin', 'Store', { 'prefix': '/courses/HarvardX/CB22x/2013_Spring/notes/api' });
#
# See annotator.js docs:
#
# https://github.com/okfn/annotator/wiki
def notes(request, course_id):
now = datetime.datetime.now()
html = "<html><body>It is now %s. Course_id: %s</body></html>" % (now, course_id)
return HttpResponse(html)
......@@ -86,7 +86,9 @@ MITX_FEATURES = {
# Give a UI to show a student's submission history in a problem by the
# Staff Debug tool.
'ENABLE_STUDENT_HISTORY_VIEW': True
'ENABLE_STUDENT_HISTORY_VIEW': True,
'ENABLE_STUDENT_NOTES': True
}
# Used for A/B testing
......@@ -414,6 +416,9 @@ main_vendor_js = [
'js/vendor/jquery.qtip.min.js',
'js/vendor/swfobject/swfobject.js',
'js/vendor/jquery.ba-bbq.min.js',
'js/vendor/annotator.min.js',
'js/vendor/annotator.store.min.js',
'js/vendor/annotator.tags.min.js'
]
discussion_js = sorted(rooted_glob(PROJECT_ROOT / 'static', 'coffee/src/discussion/**/*.coffee'))
......@@ -431,6 +436,7 @@ PIPELINE_CSS = {
'css/vendor/jquery.treeview.css',
'css/vendor/ui-lightness/jquery-ui-1.8.22.custom.css',
'css/vendor/jquery.qtip.min.css',
'css/vendor/annotator.min.css',
'sass/course.scss'
],
'output_filename': 'css/lms-course.css',
......@@ -580,4 +586,7 @@ INSTALLED_APPS = (
# Discussion forums
'django_comment_client',
# Student notes
'notes',
)
.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:0;-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,iVBORw0KGgoAAAANSUhEUgAAAJAAAAAwCAYAAAD+WvNWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAA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EUPxXGShaf9IJIRbRIEhErTvFsRmURFc+5bUHxDxmbSeD/PUpB8WeV7F9J+nEgXbiMdLclYmNGLc+2rvnYZyvIXleyPyj+lwfMbTf6ej+vBO9/K5lYT2OrV69e6XwkCBmPPjpDsj7s0Z6cnGOb6Xdu5du84NunibS8/vrrxJ/N047kv3Juu8Tfi/J3TV4srdk33tjELM9m+l1A/INTM+45/7rr+1aiPz0olsuYz4+RNkM/7XoO++35m+l3AfG/PHCuJrQ+yM4QtL3JsV1H16xZs4IKh32eyf7ihks8b8lUr2Q6iVwwHVwC4r96fgfll1brMnX6MCqe3VQ8//LJPzg13etc4n3hX3dt3woumY5/F2SGwoB9joLNWdf2+eR/edCPAxp/fQd0SJ4ttFkMY4KxWCx5Op0u4pNPPlkvi/YV4ZcvX04IuWd/DNAnPxOMYG/J4zg+4lrhFz75B495geAB4s+6+vVbln72PB3l33ztgE/+ZYOfCJie8/GX6v06h8wnyzMDveu9/CqRp4vtxBNM43/5y1/ueMO5I/gl8QRRLp/NfiD4mXiC2oq6U3rXxBOFVUzmY1tcr/Lq6CjxdERxTfwd8Qcrno4orom/I/5gxdMhAlIQkXwF064CLzwI4lERUUD891M8KiIKiP9OxNNhAvISEVFZDpevaJIHRTwKIvKb/0EQj4KI/Oa/U/F0qIA03JnS+wdKPD7cmSL/gyQeH+5Mkb8jxHOnWZiWiOTBLVH6/kEtbmHIglui9P2DWtzCWH3534r8HSUcd/l/AQYA7PGYKl3+RK0AAAAASUVORK5CYII=');background-repeat:no-repeat}.annotator-resize,.annotator-widget::after,.annotator-editor a::after,.annotator-viewer .annotator-controls button,.annotator-viewer .annotator-controls a,.annotator-filter .annotator-filter-navigation button::after,.annotator-filter .annotator-filter-property .annotator-filter-clear{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAEiCAYAAAD0w4JOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9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I3ZMHwPu4Z6sgKaPLO+z6ze5J0usPzMVIYWPKZ0YuJr1lPB91ihImjmhlj5bfI118SlIHkRIRqeYAxFchNZiX+EMP6ScImq7WpuSi5SwTHYyc4u7rFEvWuS09TH79wz6nwADANCoQA3w0fcjAAAAAElFTkSuQmCC');background-repeat:no-repeat}.annotator-hl{background:rgba(255,255,10,0.3)}.annotator-hl-temporary{background:rgba(0,124,255,0.3)}.annotator-wrapper{position:relative}.annotator-adder,.annotator-outer,.annotator-notice{z-index:1020}.annotator-filter{z-index:1010}.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:-48px;margin-left:-24px;width:48px;height:48px;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:0;background:0;text-indent:-999em;cursor:pointer}.annotator-outer{width:0;height:0}.annotator-widget{margin:0;padding:0;bottom:15px;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:0}.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:0}.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,.annotator-viewer .annotator-controls a{cursor:pointer;display:inline-block;width:13px;height:13px;margin-left:2px;border:0;opacity:.2;text-indent:-900em;background-color:transparent;outline:0}.annotator-viewer .annotator-controls button:hover,.annotator-viewer .annotator-controls button:focus,.annotator-viewer .annotator-controls a:hover,.annotator-viewer .annotator-controls a:focus{opacity:.9}.annotator-viewer .annotator-controls button:active,.annotator-viewer .annotator-controls a: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-viewer .annotator-controls .annotator-link{background-position:0 -270px}.annotator-editor .annotator-item{position:relative}.annotator-editor .annotator-item label{top:0;display:inline;cursor:pointer;font-size:12px}.annotator-editor .annotator-item input,.annotator-editor .annotator-item textarea{display:block;min-width:100%;padding:10px 8px;border:0;margin:0;color:#3c3c3c;background:0;-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:0}.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-editor.annotator-invert-y .annotator-controls{border-top:0;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:0;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{position:fixed;top:0;right:0;left:0;text-align:left;line-height:0;border:0;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:0;background-color:#fff}.annotator-filter .annotator-filter-clear{position:absolute;right:3px;top:6px;border:0;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:8px;left:8px;content:"";display:block;width:9px;height:9px;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:7px;background-position:0 -240px}.annotator-filter .annotator-filter-navigation .annotator-filter-next:hover::after{background-position:0 -255px}.annotator-hl-active{background:rgba(255,255,10,0.8)}.annotator-hl-filtered{background-color:transparent}
\ No newline at end of file
......@@ -360,6 +360,10 @@ if settings.COURSEWARE_ENABLED:
url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/peer_grading$',
'open_ended_grading.views.peer_grading', name='peer_grading'),
url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/notes$', 'notes.views.notes', name='notes'),
url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/notes/', include('notes.urls')),
)
# discussion forums live within courseware, so courseware must be enabled first
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment