Commit 31274a52 by Sarina Canelake

Merge pull request #3480 from lduarte1991/lduarte-harvardx2

Annotation Tool Clean up and Plugins
parents f33eb60c b83e27fc
...@@ -47,8 +47,24 @@ class AnnotatableFields(object): ...@@ -47,8 +47,24 @@ class AnnotatableFields(object):
scope=Scope.settings, scope=Scope.settings,
default='None', default='None',
) )
annotation_storage_url = String(help=_("Location of Annotation backend"), scope=Scope.settings, default="http://your_annotation_storage.com", display_name=_("Url for Annotation Storage")) annotation_storage_url = String(
annotation_token_secret = String(help=_("Secret string for annotation storage"), scope=Scope.settings, default="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", display_name=_("Secret Token String for Annotation")) help=_("Location of Annotation backend"),
scope=Scope.settings,
default="http://your_annotation_storage.com",
display_name=_("Url for Annotation Storage"),
)
annotation_token_secret = String(
help=_("Secret string for annotation storage"),
scope=Scope.settings,
default="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
display_name=_("Secret Token String for Annotation"),
)
diacritics = String(
display_name=_("Diacritic Marks"),
help=_("Add diacritic marks to be added to a text using the comma-separated form, i.e. markname;urltomark;baseline,markname2;urltomark2;baseline2"),
scope=Scope.settings,
default='',
)
class TextAnnotationModule(AnnotatableFields, XModule): class TextAnnotationModule(AnnotatableFields, XModule):
...@@ -84,6 +100,7 @@ class TextAnnotationModule(AnnotatableFields, XModule): ...@@ -84,6 +100,7 @@ class TextAnnotationModule(AnnotatableFields, XModule):
'content_html': self.content, 'content_html': self.content,
'annotation_storage': self.annotation_storage_url, 'annotation_storage': self.annotation_storage_url,
'token': retrieve_token(self.user_email, self.annotation_token_secret), 'token': retrieve_token(self.user_email, self.annotation_token_secret),
'diacritic_marks': self.diacritics,
} }
fragment = Fragment(self.system.render_template('textannotation.html', context)) fragment = Fragment(self.system.render_template('textannotation.html', context))
fragment.add_javascript_url("/static/js/vendor/tinymce/js/tinymce/tinymce.full.min.js") fragment.add_javascript_url("/static/js/vendor/tinymce/js/tinymce/tinymce.full.min.js")
......
...@@ -34,10 +34,29 @@ class AnnotatableFields(object): ...@@ -34,10 +34,29 @@ class AnnotatableFields(object):
scope=Scope.settings, scope=Scope.settings,
default=_('Video Annotation'), default=_('Video Annotation'),
) )
sourceurl = String(help=_("The external source URL for the video."), display_name=_("Source URL"), scope=Scope.settings, default="http://video-js.zencoder.com/oceans-clip.mp4") sourceurl = String(
poster_url = String(help=_("Poster Image URL"), display_name=_("Poster URL"), scope=Scope.settings, default="") help=_("The external source URL for the video."),
annotation_storage_url = String(help=_("Location of Annotation backend"), scope=Scope.settings, default="http://your_annotation_storage.com", display_name=_("Url for Annotation Storage")) display_name=_("Source URL"),
annotation_token_secret = String(help=_("Secret string for annotation storage"), scope=Scope.settings, default="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", display_name=_("Secret Token String for Annotation")) scope=Scope.settings, default="http://video-js.zencoder.com/oceans-clip.mp4"
)
poster_url = String(
help=_("Poster Image URL"),
display_name=_("Poster URL"),
scope=Scope.settings,
default=""
)
annotation_storage_url = String(
help=_("Location of Annotation backend"),
scope=Scope.settings,
default="http://your_annotation_storage.com",
display_name=_("Url for Annotation Storage"),
)
annotation_token_secret = String(
help=_("Secret string for annotation storage"),
scope=Scope.settings,
default="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
display_name=_("Secret Token String for Annotation")
)
class VideoAnnotationModule(AnnotatableFields, XModule): class VideoAnnotationModule(AnnotatableFields, XModule):
'''Video Annotation Module''' '''Video Annotation Module'''
......
.mark{
width: 10px;
height: 10px;
position: absolute;
background-size: contain;
background-repeat: no-repeat;
background-position: 50% 0%;
}
/*This is written to fix some design problems with edX*/ /*This is written to fix some design problems with edX*/
.annotatable-wrapper .annotatable-header .annotatable-title{
padding-top: 20px !important;
}
.annotator-wrapper .annotator-adder button { .annotator-wrapper .annotator-adder button {
opacity:0; opacity:0;
} }
......
...@@ -16,6 +16,14 @@ ...@@ -16,6 +16,14 @@
font-style: italic; font-style: italic;
} }
.mce-floatpanel {
z-index: 700000000!important;
}
.annotator-wrapper .mce-container {
z-index: 3000000000!important; /*To fix full-screen problems*/
}
.mce-container-body { .mce-container-body {
min-width: 400px; min-width: 400px;
} }
...@@ -25,10 +33,6 @@ ...@@ -25,10 +33,6 @@
min-width: 400px; min-width: 400px;
} }
.mce-floatpanel {
z-index: 700000000!important;
}
div.mce-tinymce.mce-container.mce-panel { div.mce-tinymce.mce-container.mce-panel {
min-width:400px; min-width:400px;
} }
...@@ -42,4 +46,4 @@ div.mce-tinymce.mce-container.mce-panel { ...@@ -42,4 +46,4 @@ div.mce-tinymce.mce-container.mce-panel {
.mce-ico.mce-i-rubric{ .mce-ico.mce-i-rubric{
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QkBBB07nraNoQAAAhZJREFUKM+NkstrE1EUxr+5c08ykztpJtVoazHBF8FgQQzonyBKEZS6FrQKLl0EXBRT0ZULJSs3oii4TyHgu90IlTaL6qouWlv7Ck1N0BSnmZk714WbPHz07M4534+Pw3eAHdTY8A9+Nd9/bshU1DpnO4HXjh2ZY2J9/OSTxHTrnP8PvJYf+BDQ6qEDaQBB43jrTusUFy4oPjsYWYzF+VS91nxLYfdhKgONaQT3W/KMxr1XY5e+qj86f8zsKYYsZ6AvjWFzA8ORHkAnwN8So7evzL/8pzMAXL/Hq8mMv1up371T7Z+/c3n9cKeuDS6Xy6dN07zLuZ56Onk2Ed2/ANJsnE/PQMpgyffle+kYzwazB1+3waVS6X48Hr9BRPB9H57nYXplFKeSt8D1Hriug9XKF0x+Lmw+ys8m2m42DOOn4zhQSsGyLOi6jqONm9isbmFVFlDbaGKx8QaB1rvdlbNhGLAsC0IIGIYBIQSy2ROQ0oOp7wOPraHXEugRvDtnzjmi0SiICEIIEBGklAB9B6cmbG0AUnrY5m73h+m6DsYYTNMEYwxEBMY0hGNVhHkcZigBO9qHlDHS7cwYg23bAIBQKAQigud7IH0XwtxDoHwEIQ9SLKx0wa7rPiaivYyxESklXNeFBg0mjyNQTQSuATMSm6ipuYt//eVcLhdeXl5+UKlUlur1upqamVAv3j3/VCyOD3VqfwF6uLp3q+vMcgAAAABJRU5ErkJggg=='); background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QkBBB07nraNoQAAAhZJREFUKM+NkstrE1EUxr+5c08ykztpJtVoazHBF8FgQQzonyBKEZS6FrQKLl0EXBRT0ZULJSs3oii4TyHgu90IlTaL6qouWlv7Ck1N0BSnmZk714WbPHz07M4534+Pw3eAHdTY8A9+Nd9/bshU1DpnO4HXjh2ZY2J9/OSTxHTrnP8PvJYf+BDQ6qEDaQBB43jrTusUFy4oPjsYWYzF+VS91nxLYfdhKgONaQT3W/KMxr1XY5e+qj86f8zsKYYsZ6AvjWFzA8ORHkAnwN8So7evzL/8pzMAXL/Hq8mMv1up371T7Z+/c3n9cKeuDS6Xy6dN07zLuZ56Onk2Ed2/ANJsnE/PQMpgyffle+kYzwazB1+3waVS6X48Hr9BRPB9H57nYXplFKeSt8D1Hriug9XKF0x+Lmw+ys8m2m42DOOn4zhQSsGyLOi6jqONm9isbmFVFlDbaGKx8QaB1rvdlbNhGLAsC0IIGIYBIQSy2ROQ0oOp7wOPraHXEugRvDtnzjmi0SiICEIIEBGklAB9B6cmbG0AUnrY5m73h+m6DsYYTNMEYwxEBMY0hGNVhHkcZigBO9qHlDHS7cwYg23bAIBQKAQigud7IH0XwtxDoHwEIQ9SLKx0wa7rPiaivYyxESklXNeFBg0mjyNQTQSuATMSm6ipuYt//eVcLhdeXl5+UKlUlur1upqamVAv3j3/VCyOD3VqfwF6uLp3q+vMcgAAAABJRU5ErkJggg==');
background-repeat: no-repeat; background-repeat: no-repeat;
} }
\ No newline at end of file
...@@ -43,7 +43,7 @@ li.token-input-input-token { ...@@ -43,7 +43,7 @@ li.token-input-input-token {
div.token-input-dropdown { div.token-input-dropdown {
position: absolute; position: absolute;
width: 120px; width: 400px;
background-color: #fff; background-color: #fff;
overflow: hidden; overflow: hidden;
border-left: 1px solid #ccc; border-left: 1px solid #ccc;
......
// Generated by CoffeeScript 1.6.3
var _ref, var _ref,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__hasProp = {}.hasOwnProperty, __hasProp = {}.hasOwnProperty,
......
/* /*
Open Video Annotation v1.0 (http://openvideoannotation.org/) Open Video Annotation v1.0 (http://openvideoannotation.org/)
Copyright (C) 2014 CHS (Harvard University), Daniel Cebrin Robles and Phil Desenne Copyright (C) 2014 CHS (Harvard University), Daniel Cebrian Robles and Phil Desenne
License: https://github.com/CtrHellenicStudies/OpenVideoAnnotation/blob/master/License.rst License: https://github.com/CtrHellenicStudies/OpenVideoAnnotation/blob/master/License.rst
This program is free software; you can redistribute it and/or This program is free software; you can redistribute it and/or
...@@ -2389,17 +2389,8 @@ OpenVideoAnnotation.Annotator = function (element, options) { ...@@ -2389,17 +2389,8 @@ OpenVideoAnnotation.Annotator = function (element, options) {
if (typeof options.optionsAnnotator.highlightTags!='undefined') if (typeof options.optionsAnnotator.highlightTags!='undefined')
this.annotator.addPlugin("HighlightTags", options.optionsAnnotator.highlightTags); this.annotator.addPlugin("HighlightTags", options.optionsAnnotator.highlightTags);
if (typeof options.optionsAnnotator.diacriticMarks != 'undefined' && typeof Annotator.Plugin["Diacritics"] === 'function')
/* this.annotator.addPlugin("Diacritics", options.optionsAnnotator.diacriticMarks);
this.annotator.addPlugin("Filter", {
filters: [
{
label: 'Media',
property: 'media'
}
]
});//it is obligatory to have
*/
if (typeof Annotator.Plugin["Geolocation"] === 'function') if (typeof Annotator.Plugin["Geolocation"] === 'function')
this.annotator.addPlugin("Geolocation",options.optionsAnnotator.geolocation); this.annotator.addPlugin("Geolocation",options.optionsAnnotator.geolocation);
...@@ -2415,7 +2406,7 @@ OpenVideoAnnotation.Annotator = function (element, options) { ...@@ -2415,7 +2406,7 @@ OpenVideoAnnotation.Annotator = function (element, options) {
if (typeof Annotator.Plugin["Reply"] === 'function') if (typeof Annotator.Plugin["Reply"] === 'function')
this.annotator.addPlugin("Reply"); this.annotator.addPlugin("Reply");
if (typeof Annotator.Plugin["Flagging"] === 'function') if (typeof Annotator.Plugin["Flagging"] === 'function')
this.annotator.addPlugin("Flagging"); this.annotator.addPlugin("Flagging");
//Will be add the player and the annotations plugin for video-js in the annotator //Will be add the player and the annotations plugin for video-js in the annotator
......
/* /*
RangeSlider v1.0 (https://github.com/danielcebrian/rangeslider-videojs) RangeSlider v1.0 (https://github.com/danielcebrian/rangeslider-videojs)
Copyright (C) 2014 Daniel Cebri‡n Robles Copyright (C) 2014 Daniel Cebrian Robles
License: https://github.com/danielcebrian/rangeslider-videojs/blob/master/License.rst License: https://github.com/danielcebrian/rangeslider-videojs/blob/master/License.rst
This program is free software; you can redistribute it and/or This program is free software; you can redistribute it and/or
......
/* /*
Reply Annotator Plugin v1.0 (https://github.com/danielcebrian/reply-annotator) Reply Annotator Plugin v1.0 (https://github.com/danielcebrian/reply-annotator)
Copyright (C) 2014 Daniel Cebri‡n Robles Copyright (C) 2014 Daniel Cebrian Robles
License: https://github.com/danielcebrian/reply-annotator/blob/master/License.rst License: https://github.com/danielcebrian/reply-annotator/blob/master/License.rst
This program is free software; you can redistribute it and/or This program is free software; you can redistribute it and/or
......
/* /*
Rich Text Annotator Plugin v1.0 (https://github.com/danielcebrian/richText-annotator) Rich Text Annotator Plugin v1.0 (https://github.com/danielcebrian/richText-annotator)
Copyright (C) 2014 Daniel Cebrin Robles Copyright (C) 2014 Daniel Cebrian Robles
License: https://github.com/danielcebrian/richText-annotator/blob/master/License.rst License: https://github.com/danielcebrian/richText-annotator/blob/master/License.rst
This program is free software; you can redistribute it and/or This program is free software; you can redistribute it and/or
...@@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License ...@@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
// Generated by CoffeeScript 1.6.3
var _ref, var _ref,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__hasProp = {}.hasOwnProperty, __hasProp = {}.hasOwnProperty,
...@@ -131,7 +130,7 @@ Annotator.Plugin.RichText = (function(_super) { ...@@ -131,7 +130,7 @@ Annotator.Plugin.RichText = (function(_super) {
RichText.prototype.updateEditor = function(field, annotation) { RichText.prototype.updateEditor = function(field, annotation) {
var text = typeof annotation.text!='undefined'?annotation.text:''; var text = typeof annotation.text!='undefined'?annotation.text:'';
tinymce.activeEditor.setContent(text); tinymce.activeEditor.setContent(text);
$(field).remove(); //this is the auto create field by annotator and it is not necessary $(field).remove(); //this is the auto create field by annotator and it is not necessary
} }
......
/* /*
Share Annotation Plugin v1.0 (https://github.com/danielcebrian/share-annotator) Share Annotation Plugin v1.0 (https://github.com/danielcebrian/share-annotator)
Copyright (C) 2014 Daniel Cebrin Robles Copyright (C) 2014 Daniel Cebrian Robles
License: https://github.com/danielcebrian/share-annotator/blob/master/License.rst License: https://github.com/danielcebrian/share-annotator/blob/master/License.rst
This program is free software; you can redistribute it and/or This program is free software; you can redistribute it and/or
...@@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License ...@@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
// Generated by CoffeeScript 1.6.3
var _ref, var _ref,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__hasProp = {}.hasOwnProperty, __hasProp = {}.hasOwnProperty,
......
...@@ -886,7 +886,6 @@ $.TokenList.Cache = function (options) { ...@@ -886,7 +886,6 @@ $.TokenList.Cache = function (options) {
}; };
}(jQuery)); }(jQuery));
// Generated by CoffeeScript 1.6.3
var _ref, var _ref,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__hasProp = {}.hasOwnProperty, __hasProp = {}.hasOwnProperty,
......
...@@ -848,6 +848,7 @@ main_vendor_js = [ ...@@ -848,6 +848,7 @@ main_vendor_js = [
'js/vendor/ova/reply-annotator.js', 'js/vendor/ova/reply-annotator.js',
'js/vendor/ova/tags-annotator.js', 'js/vendor/ova/tags-annotator.js',
'js/vendor/ova/flagging-annotator.js', 'js/vendor/ova/flagging-annotator.js',
'js/vendor/ova/diacritic-annotator.js',
'js/vendor/ova/jquery-Watch.js', 'js/vendor/ova/jquery-Watch.js',
'js/vendor/ova/openseadragon.js', 'js/vendor/ova/openseadragon.js',
'js/vendor/ova/OpenSeaDragonAnnotation.js', 'js/vendor/ova/OpenSeaDragonAnnotation.js',
...@@ -870,14 +871,15 @@ PIPELINE_CSS = { ...@@ -870,14 +871,15 @@ PIPELINE_CSS = {
'css/vendor/jquery.qtip.min.css', 'css/vendor/jquery.qtip.min.css',
'css/vendor/responsive-carousel/responsive-carousel.css', 'css/vendor/responsive-carousel/responsive-carousel.css',
'css/vendor/responsive-carousel/responsive-carousel.slide.css', 'css/vendor/responsive-carousel/responsive-carousel.slide.css',
'css/vendor/ova/edx-annotator.css',
'css/vendor/ova/annotator.css', 'css/vendor/ova/annotator.css',
'css/vendor/ova/edx-annotator.css',
'css/vendor/ova/video-js.min.css', 'css/vendor/ova/video-js.min.css',
'css/vendor/ova/rangeslider.css', 'css/vendor/ova/rangeslider.css',
'css/vendor/ova/share-annotator.css', 'css/vendor/ova/share-annotator.css',
'css/vendor/ova/richText-annotator.css', 'css/vendor/ova/richText-annotator.css',
'css/vendor/ova/tags-annotator.css', 'css/vendor/ova/tags-annotator.css',
'css/vendor/ova/flagging-annotator.css', 'css/vendor/ova/flagging-annotator.css',
'css/vendor/ova/diacritic-annotator.css',
'css/vendor/ova/ova.css', 'css/vendor/ova/ova.css',
'js/vendor/ova/catch/css/main.css' 'js/vendor/ova/catch/css/main.css'
], ],
......
...@@ -148,6 +148,9 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)} ...@@ -148,6 +148,9 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
highlightTags:{ highlightTags:{
tag: "${tag}", tag: "${tag}",
}, },
diacriticMarks:{
diacritics: "${diacritic_marks}"
}
}, },
optionsVideoJS: {techOrder: ["html5","flash","youtube"]}, optionsVideoJS: {techOrder: ["html5","flash","youtube"]},
optionsRS: {}, optionsRS: {},
......
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