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
3bfb633f
Commit
3bfb633f
authored
Jun 06, 2014
by
lduarte1991
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Annotator Tool: Fixed delete bug and factored out settings
Removed print context
parent
54974a51
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
27 deletions
+31
-27
common/lib/xmodule/xmodule/annotator_mixin.py
+0
-7
common/lib/xmodule/xmodule/imageannotation_module.py
+4
-2
common/lib/xmodule/xmodule/textannotation_module.py
+4
-2
common/lib/xmodule/xmodule/videoannotation_module.py
+4
-2
common/static/js/vendor/ova/catch/js/catch.js
+19
-14
No files found.
common/lib/xmodule/xmodule/annotator_mixin.py
View file @
3bfb633f
...
...
@@ -90,9 +90,3 @@ class CommonAnnotatorMixin(object):
scope
=
Scope
.
settings
,
default
=
"everyone"
,
)
extra_context
=
{
'annotation_storage'
:
annotation_storage_url
,
'default_tab'
:
default_tab
,
'instructor_email'
:
instructor_email
,
'annotation_mode'
:
annotation_mode
,
}
\ No newline at end of file
common/lib/xmodule/xmodule/imageannotation_module.py
View file @
3bfb633f
...
...
@@ -91,9 +91,11 @@ class ImageAnnotationModule(AnnotatableFields, CommonAnnotatorMixin, XModule):
'token'
:
retrieve_token
(
self
.
user
,
self
.
annotation_token_secret
),
'tag'
:
self
.
instructor_tags
,
'openseadragonjson'
:
self
.
openseadragonjson
,
'annotation_storage'
:
self
.
annotation_storage_url
,
'default_tab'
:
self
.
default_tab
,
'instructor_email'
:
self
.
instructor_email
,
'annotation_mode'
:
self
.
annotation_mode
,
}
context
.
update
(
self
.
extra_context
)
print
context
fragment
=
Fragment
(
self
.
system
.
render_template
(
'imageannotation.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/jquery.tinymce.min.js"
)
...
...
common/lib/xmodule/xmodule/textannotation_module.py
View file @
3bfb633f
...
...
@@ -88,9 +88,11 @@ class TextAnnotationModule(AnnotatableFields, CommonAnnotatorMixin, XModule):
'content_html'
:
self
.
content
,
'token'
:
retrieve_token
(
self
.
user_email
,
self
.
annotation_token_secret
),
'diacritic_marks'
:
self
.
diacritics
,
'annotation_storage'
:
self
.
annotation_storage_url
,
'default_tab'
:
self
.
default_tab
,
'instructor_email'
:
self
.
instructor_email
,
'annotation_mode'
:
self
.
annotation_mode
,
}
context
.
update
(
self
.
extra_context
)
print
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/jquery.tinymce.min.js"
)
...
...
common/lib/xmodule/xmodule/videoannotation_module.py
View file @
3bfb633f
...
...
@@ -94,9 +94,11 @@ class VideoAnnotationModule(AnnotatableFields, CommonAnnotatorMixin, XModule):
'poster'
:
self
.
poster_url
,
'content_html'
:
self
.
content
,
'token'
:
retrieve_token
(
self
.
user_email
,
self
.
annotation_token_secret
),
'annotation_storage'
:
self
.
annotation_storage_url
,
'default_tab'
:
self
.
default_tab
,
'instructor_email'
:
self
.
instructor_email
,
'annotation_mode'
:
self
.
annotation_mode
,
}
context
.
update
(
self
.
extra_context
)
print
context
fragment
=
Fragment
(
self
.
system
.
render_template
(
'videoannotation.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/jquery.tinymce.min.js"
)
...
...
common/static/js/vendor/ova/catch/js/catch.js
View file @
3bfb633f
...
...
@@ -613,21 +613,26 @@ CatchAnnotation.prototype = {
var
annotations
=
annotator
.
plugins
[
'Store'
].
annotations
,
tot
=
typeof
annotations
!=
'undefined'
?
annotations
.
length
:
0
,
attempts
=
0
;
// max 100
if
(
annotation
.
media
==
"image"
){
self
.
refreshCatch
(
true
);
self
.
checkTotAnnotations
();
}
else
{
//This is to watch the annotations object, to see when is deleted the annotation
var
ischanged
=
function
(){
var
new_tot
=
annotator
.
plugins
[
'Store'
].
annotations
.
length
;
if
(
attempts
<
100
)
setTimeout
(
function
(){
if
(
new_tot
!=
tot
){
self
.
refreshCatch
(
true
);
self
.
checkTotAnnotations
();
}
else
{
attempts
++
;
ischanged
();
}
},
100
);
//wait for the change in the annotations
};
ischanged
();
var
ischanged
=
function
(){
var
new_tot
=
annotator
.
plugins
[
'Store'
].
annotations
.
length
;
if
(
attempts
<
100
)
setTimeout
(
function
(){
if
(
new_tot
!=
tot
){
self
.
refreshCatch
(
true
);
self
.
checkTotAnnotations
();
}
else
{
attempts
++
;
ischanged
();
}
},
100
);
//wait for the change in the annotations
};
ischanged
();
}
});
annotator
.
subscribe
(
"annotationCreated"
,
function
(
annotation
){
var
attempts
=
0
;
// max 100
...
...
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