Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
8cfdb8f1
Commit
8cfdb8f1
authored
Aug 13, 2014
by
lduarte1991
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Annotation Tools: Adding comments and adding CSS groups
parent
5c859c71
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
38 deletions
+58
-38
cms/envs/common.py
+17
-12
cms/templates/base.html
+6
-0
lms/envs/common.py
+17
-12
lms/templates/imageannotation.html
+6
-5
lms/templates/textannotation.html
+6
-5
lms/templates/videoannotation.html
+6
-4
No files found.
cms/envs/common.py
View file @
8cfdb8f1
...
@@ -339,18 +339,6 @@ PIPELINE_CSS = {
...
@@ -339,18 +339,6 @@ PIPELINE_CSS = {
'css/vendor/jquery.qtip.min.css'
,
'css/vendor/jquery.qtip.min.css'
,
'js/vendor/markitup/skins/simple/style.css'
,
'js/vendor/markitup/skins/simple/style.css'
,
'js/vendor/markitup/sets/wiki/style.css'
,
'js/vendor/markitup/sets/wiki/style.css'
,
'css/vendor/ova/annotator.css'
,
'css/vendor/ova/edx-annotator.css'
,
'css/vendor/ova/video-js.min.css'
,
'css/vendor/ova/rangeslider.css'
,
'css/vendor/ova/share-annotator.css'
,
'css/vendor/ova/richText-annotator.css'
,
'css/vendor/ova/tags-annotator.css'
,
'css/vendor/ova/flagging-annotator.css'
,
'css/vendor/ova/diacritic-annotator.css'
,
'css/vendor/ova/grouping-annotator.css'
,
'css/vendor/ova/ova.css'
,
'js/vendor/ova/catch/css/main.css'
],
],
'output_filename'
:
'css/cms-style-vendor.css'
,
'output_filename'
:
'css/cms-style-vendor.css'
,
},
},
...
@@ -386,6 +374,23 @@ PIPELINE_CSS = {
...
@@ -386,6 +374,23 @@ PIPELINE_CSS = {
],
],
'output_filename'
:
'css/cms-style-xmodule.css'
,
'output_filename'
:
'css/cms-style-xmodule.css'
,
},
},
'style-xmodule-annotations'
:
{
'source_filenames'
:
[
'css/vendor/ova/annotator.css'
,
'css/vendor/ova/edx-annotator.css'
,
'css/vendor/ova/video-js.min.css'
,
'css/vendor/ova/rangeslider.css'
,
'css/vendor/ova/share-annotator.css'
,
'css/vendor/ova/richText-annotator.css'
,
'css/vendor/ova/tags-annotator.css'
,
'css/vendor/ova/flagging-annotator.css'
,
'css/vendor/ova/diacritic-annotator.css'
,
'css/vendor/ova/grouping-annotator.css'
,
'css/vendor/ova/ova.css'
,
'js/vendor/ova/catch/css/main.css'
],
'output_filename'
:
'css/cms-style-xmodule-annotations.css'
,
},
}
}
# test_order: Determines the position of this chunk of javascript on
# test_order: Determines the position of this chunk of javascript on
...
...
cms/templates/base.html
View file @
8cfdb8f1
...
@@ -82,6 +82,8 @@
...
@@ -82,6 +82,8 @@
"URI"
:
"js/vendor/URI.min"
,
"URI"
:
"js/vendor/URI.min"
,
"ieshim"
:
"js/src/ie_shim"
,
"ieshim"
:
"js/src/ie_shim"
,
"tooltip_manager"
:
"js/src/tooltip_manager"
,
"tooltip_manager"
:
"js/src/tooltip_manager"
,
// Files needed for Annotations feature
"annotator"
:
"js/vendor/ova/annotator-full"
,
"annotator"
:
"js/vendor/ova/annotator-full"
,
"annotator-harvardx"
:
"js/vendor/ova/annotator-full-firebase-auth"
,
"annotator-harvardx"
:
"js/vendor/ova/annotator-full-firebase-auth"
,
"video.dev"
:
"js/vendor/ova/video.dev"
,
"video.dev"
:
"js/vendor/ova/video.dev"
,
...
@@ -100,6 +102,7 @@
...
@@ -100,6 +102,7 @@
"ova"
:
'js/vendor/ova/ova'
,
"ova"
:
'js/vendor/ova/ova'
,
"catch"
:
'js/vendor/ova/catch/js/catch'
,
"catch"
:
'js/vendor/ova/catch/js/catch'
,
"handlebars"
:
'js/vendor/ova/catch/js/handlebars-1.1.2'
,
"handlebars"
:
'js/vendor/ova/catch/js/handlebars-1.1.2'
,
// end of Annotation tool files
// externally hosted files
// externally hosted files
"tender"
:
[
"tender"
:
[
...
@@ -254,6 +257,8 @@
...
@@ -254,6 +257,8 @@
exports
:
"Logger"
,
exports
:
"Logger"
,
deps
:
[
"coffee/src/ajax_prefix"
]
deps
:
[
"coffee/src/ajax_prefix"
]
},
},
// the following are all needed for annotation tools
"video.dev"
:
{
"video.dev"
:
{
exports
:
"videojs"
exports
:
"videojs"
},
},
...
@@ -298,6 +303,7 @@
...
@@ -298,6 +303,7 @@
exports
:
"osda"
,
exports
:
"osda"
,
deps
:
[
"annotator"
,
"annotator-harvardx"
,
"video.dev"
,
"vjs.youtube"
,
"rangeslider"
,
"share-annotator"
,
"richText-annotator"
,
"reply-annotator"
,
"tags-annotator"
,
"flagging-annotator"
,
"grouping-annotator"
,
"diacritic-annotator"
,
"openseadragon"
,
"jquery-Watch"
,
"catch"
,
"handlebars"
,
"URI"
]
deps
:
[
"annotator"
,
"annotator-harvardx"
,
"video.dev"
,
"vjs.youtube"
,
"rangeslider"
,
"share-annotator"
,
"richText-annotator"
,
"reply-annotator"
,
"tags-annotator"
,
"flagging-annotator"
,
"grouping-annotator"
,
"diacritic-annotator"
,
"openseadragon"
,
"jquery-Watch"
,
"catch"
,
"handlebars"
,
"URI"
]
},
},
// end of annotation tool files
},
},
// load jquery and gettext automatically
// load jquery and gettext automatically
deps
:
[
"jquery"
,
"gettext"
],
deps
:
[
"jquery"
,
"gettext"
],
...
...
lms/envs/common.py
View file @
8cfdb8f1
...
@@ -943,18 +943,6 @@ PIPELINE_CSS = {
...
@@ -943,18 +943,6 @@ 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/annotator.css'
,
'css/vendor/ova/edx-annotator.css'
,
'css/vendor/ova/video-js.min.css'
,
'css/vendor/ova/rangeslider.css'
,
'css/vendor/ova/share-annotator.css'
,
'css/vendor/ova/richText-annotator.css'
,
'css/vendor/ova/tags-annotator.css'
,
'css/vendor/ova/flagging-annotator.css'
,
'css/vendor/ova/diacritic-annotator.css'
,
'css/vendor/ova/grouping-annotator.css'
,
'css/vendor/ova/ova.css'
,
'js/vendor/ova/catch/css/main.css'
],
],
'output_filename'
:
'css/lms-style-vendor.css'
,
'output_filename'
:
'css/lms-style-vendor.css'
,
},
},
...
@@ -1004,6 +992,23 @@ PIPELINE_CSS = {
...
@@ -1004,6 +992,23 @@ PIPELINE_CSS = {
],
],
'output_filename'
:
'css/lms-style-course.css'
,
'output_filename'
:
'css/lms-style-course.css'
,
},
},
'style-xmodule-annotations'
:
{
'source_filenames'
:
[
'css/vendor/ova/annotator.css'
,
'css/vendor/ova/edx-annotator.css'
,
'css/vendor/ova/video-js.min.css'
,
'css/vendor/ova/rangeslider.css'
,
'css/vendor/ova/share-annotator.css'
,
'css/vendor/ova/richText-annotator.css'
,
'css/vendor/ova/tags-annotator.css'
,
'css/vendor/ova/flagging-annotator.css'
,
'css/vendor/ova/diacritic-annotator.css'
,
'css/vendor/ova/grouping-annotator.css'
,
'css/vendor/ova/ova.css'
,
'js/vendor/ova/catch/css/main.css'
],
'output_filename'
:
'css/lms-style-xmodule-annotations.css'
,
},
}
}
...
...
lms/templates/imageannotation.html
View file @
8cfdb8f1
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
<
%
namespace
name=
'static'
file=
'/static_content.html'
/>
<
%
namespace
name=
'static'
file=
'/static_content.html'
/>
${static.css(group='style-vendor-tinymce-content', raw=True)}
${static.css(group='style-vendor-tinymce-content', raw=True)}
${static.css(group='style-vendor-tinymce-skin', raw=True)}
${static.css(group='style-vendor-tinymce-skin', raw=True)}
${static.css(group='style-xmodule-annotations', raw=True)}
</div>
</div>
<div
id=
"catchDIV"
>
<div
id=
"catchDIV"
>
<div
class=
"annotationListContainer"
>
${_('Note: only instructors may annotate.')}
</div>
<div
class=
"annotationListContainer"
>
${_('Note: only instructors may annotate.')}
</div>
...
@@ -181,7 +182,7 @@
...
@@ -181,7 +182,7 @@
};
};
var
imgURLRoot
=
"${settings.STATIC_URL}"
+
"js/vendor/ova/catch/img/"
;
var
imgURLRoot
=
"${settings.STATIC_URL}"
+
"js/vendor/ova/catch/img/"
;
var
osda
,
annotator
,
catchOptions
,
Catch
;
var
startosda
=
function
()
{
var
startosda
=
function
()
{
//remove old instances
//remove old instances
if
(
Annotator
.
_instances
.
length
!==
0
)
{
if
(
Annotator
.
_instances
.
length
!==
0
)
{
...
@@ -189,15 +190,15 @@
...
@@ -189,15 +190,15 @@
}
}
delete
osda
;
delete
osda
;
//Load the plugin Image/Text Annotation
//Load the plugin Image/Text Annotation
var
osda
=
new
OpenSeadragonAnnotation
(
$
(
'#imageHolder'
),
options
);
osda
=
new
OpenSeadragonAnnotation
(
$
(
'#imageHolder'
),
options
);
var
userId
=
(
'${default_tab}'
.
toLowerCase
()
===
'instructor'
)
?
var
userId
=
(
'${default_tab}'
.
toLowerCase
()
===
'instructor'
)
?
'${instructor_email}'
:
'${instructor_email}'
:
'${user.email}'
;
'${user.email}'
;
//Catch
//Catch
var
annotator
=
osda
.
annotator
;
annotator
=
osda
.
annotator
;
var
catchOptions
=
{
catchOptions
=
{
media
:
'image'
,
media
:
'image'
,
externalLink
:
false
,
externalLink
:
false
,
imageUrlRoot
:
imgURLRoot
,
imageUrlRoot
:
imgURLRoot
,
...
@@ -214,7 +215,7 @@
...
@@ -214,7 +215,7 @@
// if annotations are opened to everyone (2) or if they want to create no annotations (1 with no instructor)
// if annotations are opened to everyone (2) or if they want to create no annotations (1 with no instructor)
// then the table at the bottom of the source should be displayed
// then the table at the bottom of the source should be displayed
if
(
"${annotation_mode}"
==
"everyone"
||
(
"${annotation_mode}"
==
"instructor"
&&
"${instructor_email}"
!=
""
))
if
(
"${annotation_mode}"
==
"everyone"
||
(
"${annotation_mode}"
==
"instructor"
&&
"${instructor_email}"
!=
""
))
var
Catch
=
new
CatchAnnotation
(
$
(
'#catchDIV'
),
catchOptions
);
Catch
=
new
CatchAnnotation
(
$
(
'#catchDIV'
),
catchOptions
);
// if it is in instructor mode only (1), the annotator should be destroyed for all except the instructor
// if it is in instructor mode only (1), the annotator should be destroyed for all except the instructor
if
(
"${annotation_mode}"
==
"instructor"
&&
"${instructor_email}"
==
""
&&
!
is_staff
)
if
(
"${annotation_mode}"
==
"instructor"
&&
"${instructor_email}"
==
""
&&
!
is_staff
)
...
...
lms/templates/textannotation.html
View file @
8cfdb8f1
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<
%
namespace
name=
'static'
file=
'/static_content.html'
/>
<
%
namespace
name=
'static'
file=
'/static_content.html'
/>
${static.css(group='style-vendor-tinymce-content', raw=True)}
${static.css(group='style-vendor-tinymce-content', raw=True)}
${static.css(group='style-vendor-tinymce-skin', raw=True)}
${static.css(group='style-vendor-tinymce-skin', raw=True)}
${static.css(group='style-xmodule-annotations', raw=True)}
<div
class=
"annotatable-wrapper"
>
<div
class=
"annotatable-wrapper"
>
<div
class=
"annotatable-header"
>
<div
class=
"annotatable-header"
>
...
@@ -168,7 +169,7 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
...
@@ -168,7 +169,7 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
};
};
var
imgURLRoot
=
"${settings.STATIC_URL}"
+
"js/vendor/ova/catch/img/"
;
var
imgURLRoot
=
"${settings.STATIC_URL}"
+
"js/vendor/ova/catch/img/"
;
var
ova
,
Catch
,
annotator
,
catchOptions
;
var
startova
=
function
(){
var
startova
=
function
(){
//remove old instances
//remove old instances
if
(
Annotator
.
_instances
.
length
!==
0
)
{
if
(
Annotator
.
_instances
.
length
!==
0
)
{
...
@@ -176,7 +177,7 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
...
@@ -176,7 +177,7 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
}
}
delete
ova
;
delete
ova
;
//Load the plugin Video/Text Annotation
//Load the plugin Video/Text Annotation
var
ova
=
new
OpenVideoAnnotation
.
Annotator
(
$
(
'#textHolder'
),
options
);
ova
=
new
OpenVideoAnnotation
.
Annotator
(
$
(
'#textHolder'
),
options
);
if
(
typeof
Annotator
.
Plugin
[
"Grouping"
]
===
'function'
)
if
(
typeof
Annotator
.
Plugin
[
"Grouping"
]
===
'function'
)
ova
.
annotator
.
addPlugin
(
"Grouping"
);
ova
.
annotator
.
addPlugin
(
"Grouping"
);
...
@@ -186,8 +187,8 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
...
@@ -186,8 +187,8 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
'${user.email}'
;
'${user.email}'
;
//Catch
//Catch
var
annotator
=
ova
.
annotator
;
annotator
=
ova
.
annotator
;
var
catchOptions
=
{
catchOptions
=
{
media
:
'text'
,
media
:
'text'
,
externalLink
:
false
,
externalLink
:
false
,
imageUrlRoot
:
imgURLRoot
,
imageUrlRoot
:
imgURLRoot
,
...
@@ -200,7 +201,7 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
...
@@ -200,7 +201,7 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
instructor_email
:
"${instructor_email}"
,
instructor_email
:
"${instructor_email}"
,
annotation_mode
:
"${annotation_mode}"
,
annotation_mode
:
"${annotation_mode}"
,
};
};
var
Catch
=
new
CatchAnnotation
(
$
(
'#catchDIV'
),
catchOptions
);
Catch
=
new
CatchAnnotation
(
$
(
'#catchDIV'
),
catchOptions
);
}
}
if
(
typeof
Annotator
!==
'undefined'
)
{
if
(
typeof
Annotator
!==
'undefined'
)
{
...
...
lms/templates/videoannotation.html
View file @
8cfdb8f1
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<
%
namespace
name=
'static'
file=
'/static_content.html'
/>
<
%
namespace
name=
'static'
file=
'/static_content.html'
/>
${static.css(group='style-vendor-tinymce-content', raw=True)}
${static.css(group='style-vendor-tinymce-content', raw=True)}
${static.css(group='style-vendor-tinymce-skin', raw=True)}
${static.css(group='style-vendor-tinymce-skin', raw=True)}
${static.css(group='style-xmodule-annotations', raw=True)}
<div
class=
"annotatable-wrapper"
>
<div
class=
"annotatable-wrapper"
>
<div
class=
"annotatable-header"
>
<div
class=
"annotatable-header"
>
...
@@ -165,6 +166,7 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
...
@@ -165,6 +166,7 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
};
};
var
imgURLRoot
=
"${settings.STATIC_URL}"
+
"js/vendor/ova/catch/img/"
;
var
imgURLRoot
=
"${settings.STATIC_URL}"
+
"js/vendor/ova/catch/img/"
;
var
ova
,
Catch
,
annotator
,
catchOptions
;
var
startova
=
function
()
{
var
startova
=
function
()
{
//remove old instances
//remove old instances
if
(
Annotator
.
_instances
.
length
!==
0
)
{
if
(
Annotator
.
_instances
.
length
!==
0
)
{
...
@@ -172,7 +174,7 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
...
@@ -172,7 +174,7 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
}
}
delete
ova
;
delete
ova
;
//Load the plugin Video/Text Annotation
//Load the plugin Video/Text Annotation
var
ova
=
new
OpenVideoAnnotation
.
Annotator
(
$
(
'#videoHolder'
),
options
);
ova
=
new
OpenVideoAnnotation
.
Annotator
(
$
(
'#videoHolder'
),
options
);
ova
.
annotator
.
addPlugin
(
'Tags'
);
ova
.
annotator
.
addPlugin
(
'Tags'
);
var
userId
=
(
'${default_tab}'
.
toLowerCase
()
===
'instructor'
)
?
var
userId
=
(
'${default_tab}'
.
toLowerCase
()
===
'instructor'
)
?
...
@@ -180,8 +182,8 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
...
@@ -180,8 +182,8 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
'${user.email}'
;
'${user.email}'
;
//Catch
//Catch
var
annotator
=
ova
.
annotator
;
annotator
=
ova
.
annotator
;
var
catchOptions
=
{
catchOptions
=
{
media
:
'video'
,
media
:
'video'
,
externalLink
:
false
,
externalLink
:
false
,
imageUrlRoot
:
imgURLRoot
,
imageUrlRoot
:
imgURLRoot
,
...
@@ -194,7 +196,7 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
...
@@ -194,7 +196,7 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
instructor_email
:
"${instructor_email}"
,
instructor_email
:
"${instructor_email}"
,
annotation_mode
:
"${annotation_mode}"
,
annotation_mode
:
"${annotation_mode}"
,
};
};
var
Catch
=
new
CatchAnnotation
(
$
(
'#catchDIV'
),
catchOptions
);
Catch
=
new
CatchAnnotation
(
$
(
'#catchDIV'
),
catchOptions
);
}
}
if
(
typeof
Annotator
!==
'undefined'
)
{
if
(
typeof
Annotator
!==
'undefined'
)
{
startova
();
startova
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment