- ## Translators: Notes below refer to annotations. They wil later be put under a "Notes" section.
-
${_('You do not have any notes.')}
-
-
-
+
+
${_('Note: only instructors may annotate.')}
+
+
+
\ No newline at end of file
diff --git a/lms/templates/notes.html b/lms/templates/notes.html
index 58f81be27472..569393daaa6e 100644
--- a/lms/templates/notes.html
+++ b/lms/templates/notes.html
@@ -1,6 +1,10 @@
<%! from django.utils.translation import ugettext as _ %>
<%namespace name='static' file='static_content.html'/>
+${static.css(group='style-vendor-tinymce-content', raw=True)}
+${static.css(group='style-vendor-tinymce-skin', raw=True)}
+
+
<%inherit file="main.html" />
<%!
from django.core.urlresolvers import reverse
@@ -102,7 +106,7 @@
${_('My Notes')}
if (annotation.permissions) {
tokens = annotation.permissions[action] || [];
if (is_staff){
- return true;
+ return true;
}
if (tokens.length === 0) {
return true;
@@ -128,7 +132,7 @@
${_('My Notes')}
},
},
auth: {
- tokenUrl: location.protocol+'//'+location.host+"/token?course_id=${course.id.to_deprecated_string()}"
+ token: "${token}"
},
store: {
// The endpoint of the store on your server.
@@ -158,37 +162,34 @@
${_('My Notes')}
optionsRichText: {
tinymce:{
selector: "li.annotator-item textarea",
- plugins: "media image insertdatetime link code",
+ plugins: "media image codemirror",
menubar: false,
toolbar_items_size: 'small',
extended_valid_elements : "iframe[src|frameborder|style|scrolling|class|width|height|name|align|id]",
- toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media rubric | code ",
+ toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | image rubric | code ",
}
- return true;
- },
- },
- auth: {
- token: "${token}"
- },
- store: {
- // The endpoint of the store on your server.
- prefix: "${storage}",
-
- annotationData: {},
-
- urls: {
- // These are the default URLs.
- create: '/create',
- read: '/read/:id',
- update: '/update/:id',
- destroy: '/delete/:id',
- search: '/search'
},
+ auth: {
+ token: "${token}"
+ },
+ store: {
+ // The endpoint of the store on your server.
+ prefix: "${storage}",
+
+ annotationData: {},
+
+ urls: {
+ // These are the default URLs.
+ create: '/create',
+ read: '/read/:id',
+ update: '/update/:id',
+ destroy: '/delete/:id',
+ search: '/search'
+ },
+ }
};
- tinyMCE.baseURL = "${settings.STATIC_URL}" + "js/vendor/ova";
var imgURLRoot = "${settings.STATIC_URL}" + "js/vendor/ova/catch/img/";
-
//remove old instances
if (Annotator._instances.length !== 0) {
$('#notesHolder').annotator("destroy");
@@ -207,7 +208,8 @@
${_('My Notes')}
showMediaSelector: true,
showPublicPrivate: true,
pagination:pagination,//Number of Annotations per load in the pagination,
- flags:is_staff
+ flags:is_staff,
+ default_tab: "${default_tab}",
},
Catch = new CatchAnnotation($('#catchDIV'),catchOptions);
diff --git a/lms/templates/textannotation.html b/lms/templates/textannotation.html
index 43f122e05087..19a261f7fa2f 100644
--- a/lms/templates/textannotation.html
+++ b/lms/templates/textannotation.html
@@ -177,17 +177,24 @@
//Load the plugin Video/Text Annotation
var ova = new OpenVideoAnnotation.Annotator($('#textHolder'),options);
+ var userId = ('${default_tab}'.toLowerCase() === 'instructor') ?
+ '${instructor_email}':
+ '${user.email}';
+
//Catch
- var annotator = ova.annotator,
- catchOptions = {
+ var annotator = ova.annotator;
+ var catchOptions = {
media:'text',
externalLink:false,
imageUrlRoot:imgURLRoot,
showMediaSelector: false,
showPublicPrivate: true,
- userId:'${user.email}',
+ userId:userId,
pagination:pagination,//Number of Annotations per load in the pagination,
- flags:is_staff
- },
- Catch = new CatchAnnotation($('#catchDIV'),catchOptions);
+ flags:is_staff,
+ default_tab: "${default_tab}",
+ instructor_email: "${instructor_email}",
+ annotation_mode: "${annotation_mode}",
+ };
+ var Catch = new CatchAnnotation($('#catchDIV'),catchOptions);
diff --git a/lms/templates/videoannotation.html b/lms/templates/videoannotation.html
index 539e86909aed..07b61213c55e 100644
--- a/lms/templates/videoannotation.html
+++ b/lms/templates/videoannotation.html
@@ -175,18 +175,24 @@
var ova = new OpenVideoAnnotation.Annotator($('#videoHolder'),options);
ova.annotator.addPlugin('Tags');
+ var userId = ('${default_tab}'.toLowerCase() === 'instructor') ?
+ '${instructor_email}':
+ '${user.email}';
//Catch
- var annotator = ova.annotator,
- catchOptions = {
+ var annotator = ova.annotator;
+ var catchOptions = {
media:'video',
externalLink:false,
imageUrlRoot:imgURLRoot,
showMediaSelector: false,
showPublicPrivate: true,
- userId:'${user.email}',
+ userId:userId,
pagination:pagination,//Number of Annotations per load in the pagination,
- flags:is_staff
- },
- Catch = new CatchAnnotation($('#catchDIV'),catchOptions);
+ flags:is_staff,
+ default_tab: "${default_tab}",
+ instructor_email: "${instructor_email}",
+ annotation_mode: "${annotation_mode}",
+ };
+ var Catch = new CatchAnnotation($('#catchDIV'),catchOptions);