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
7114b25a
Commit
7114b25a
authored
Aug 11, 2014
by
lduarte1991
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Annotation Tools: Explicit typecasting === changes and reorganizing plugins
parent
452d6965
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
common/static/js/vendor/ova/catch/js/catch.js
+9
-9
common/static/js/vendor/ova/ova.js
+4
-4
No files found.
common/static/js/vendor/ova/catch/js/catch.js
View file @
7114b25a
...
...
@@ -352,7 +352,7 @@ CatchAnnotation.prototype = {
// if the default tab is instructor, we must refresh the catch to pull the ones
// under the instructor's email. Calling changeUserId will update this.options.userId
// and most importantly refresh not only the highlights (from Annotator)
// but also the table below from the annotations database server (called Catch).
// but also the table below from the annotations database server (called Catch).
if
(
this
.
options
.
default_tab
.
toLowerCase
()
===
'instructor'
)
{
this
.
changeUserId
(
this
.
options
.
instructor_email
);
}
...
...
@@ -717,7 +717,7 @@ CatchAnnotation.prototype = {
var
isInList
=
false
;
var
list
=
$
(
'#mainCatch .annotationList .annotationRow.item'
);
for
(
_i
=
0
,
_len
=
list
.
length
;
_i
<
_len
;
_i
++
)
{
if
(
$
(
list
[
_i
]).
parent
().
attr
(
'annotationid'
)
===
an
.
id
)
if
(
parseInt
(
$
(
list
[
_i
]).
parent
().
attr
(
'annotationid'
),
10
)
===
an
.
id
)
isInList
=
true
;
}
return
isInList
;
...
...
@@ -800,7 +800,7 @@ CatchAnnotation.prototype = {
$
(
evt
.
target
).
parents
(
'.detailHeader:first'
).
find
(
'#myLocationMap .map'
).
html
(
imgSrc
);
},
_onPlaySelectionClick
:
function
(
evt
)
{
var
id
=
$
(
evt
.
target
).
find
(
'.idAnnotation'
).
html
(
);
var
id
=
parseInt
(
$
(
evt
.
target
).
find
(
'.idAnnotation'
).
html
(),
10
);
var
uri
=
$
(
evt
.
target
).
find
(
'.uri'
).
html
();
var
container
=
$
(
evt
.
target
).
find
(
'.container'
).
html
();
if
(
this
.
options
.
externalLink
)
{
...
...
@@ -858,7 +858,7 @@ CatchAnnotation.prototype = {
},
_onZoomToImageBoundsButtonClick
:
function
(
evt
){
var
zoomToBounds
=
$
(
evt
.
target
).
hasClass
(
'zoomToImageBounds'
)?
$
(
evt
.
target
):
$
(
evt
.
target
).
parents
(
'.zoomToImageBounds:first'
);
var
osdaId
=
zoomToBounds
.
find
(
'.idAnnotation'
).
html
(
);
var
osdaId
=
parseInt
(
zoomToBounds
.
find
(
'.idAnnotation'
).
html
(),
10
);
var
uri
=
zoomToBounds
.
find
(
'.uri'
).
html
();
var
allannotations
=
this
.
annotator
.
plugins
[
'Store'
].
annotations
;
...
...
@@ -887,7 +887,7 @@ CatchAnnotation.prototype = {
},
_onQuoteMediaButton
:
function
(
evt
)
{
var
quote
=
$
(
evt
.
target
).
hasClass
(
'quote'
)?
$
(
evt
.
target
):
$
(
evt
.
target
).
parents
(
'.quote:first'
);
var
id
=
quote
.
find
(
'.idAnnotation'
).
html
(
);
var
id
=
parseInt
(
quote
.
find
(
'.idAnnotation'
).
html
(),
10
);
var
uri
=
quote
.
find
(
'.uri'
).
html
();
if
(
typeof
id
===
'undefined'
||
id
===
''
){
this
.
refreshCatch
();
...
...
@@ -927,7 +927,7 @@ CatchAnnotation.prototype = {
},
_refreshReplies
:
function
(
evt
)
{
var
item
=
$
(
evt
.
target
).
parents
(
'.annotationItem:first'
);
var
anId
=
item
.
attr
(
'annotationId'
);
var
anId
=
parseInt
(
item
.
attr
(
'annotationId'
),
10
);
var
replyElem
=
$
(
evt
.
target
).
parents
(
'.annotationItem:first'
).
find
(
'.replies'
);
var
annotator
=
this
.
annotator
;
...
...
@@ -954,7 +954,7 @@ CatchAnnotation.prototype = {
if
(
typeof
replyItems
!==
'undefined'
&&
replyItems
.
length
>
0
)
{
annotations
.
forEach
(
function
(
ann
)
{
replyItems
.
each
(
function
(
item
)
{
var
id
=
$
(
replyItems
[
item
]).
attr
(
'annotationid'
);
var
id
=
parseInt
(
$
(
replyItems
[
item
]).
attr
(
'annotationid'
),
10
);
if
(
id
===
ann
.
id
)
{
var
perm
=
self
.
annotator
.
plugins
.
Permissions
;
if
(
!
perm
.
options
.
userAuthorize
(
'delete'
,
ann
,
perm
.
user
))
{
...
...
@@ -1031,7 +1031,7 @@ CatchAnnotation.prototype = {
if
(
confirm
(
"Would you like to delete the annotation?"
))
{
var
annotator
=
this
.
annotator
;
var
item
=
$
(
evt
.
target
).
parents
(
'.annotationItem:first'
);
var
id
=
item
.
attr
(
'annotationId'
);
var
id
=
parseInt
(
item
.
attr
(
'annotationId'
),
10
);
var
store
=
annotator
.
plugins
.
Store
;
var
annotations
=
store
.
annotations
;
var
permissions
=
annotator
.
plugins
.
Permissions
;
...
...
@@ -1048,7 +1048,7 @@ CatchAnnotation.prototype = {
var
annotator
=
this
.
annotator
;
var
item
=
$
(
evt
.
target
).
parents
(
'.annotationItem:first'
);
var
id
=
item
.
attr
(
'annotationId'
);
var
id
=
parseInt
(
item
.
attr
(
'annotationId'
),
10
);
var
store
=
annotator
.
plugins
.
Store
;
var
annotations
=
store
.
annotations
;
var
permissions
=
annotator
.
plugins
.
Permissions
;
...
...
common/static/js/vendor/ova/ova.js
View file @
7114b25a
...
...
@@ -2385,9 +2385,6 @@ OpenVideoAnnotation.Annotator = function (element, options) {
if
(
typeof
options
.
optionsAnnotator
.
store
!=
'undefined'
)
this
.
annotator
.
addPlugin
(
"Store"
,
options
.
optionsAnnotator
.
store
);
if
(
typeof
options
.
optionsAnnotator
.
highlightTags
!=
'undefined'
)
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
);
...
...
@@ -2408,7 +2405,10 @@ OpenVideoAnnotation.Annotator = function (element, options) {
if
(
typeof
Annotator
.
Plugin
[
"Flagging"
]
===
'function'
)
this
.
annotator
.
addPlugin
(
"Flagging"
);
if
(
typeof
options
.
optionsAnnotator
.
highlightTags
!=
'undefined'
)
this
.
annotator
.
addPlugin
(
"HighlightTags"
,
options
.
optionsAnnotator
.
highlightTags
);
//Will be add the player and the annotations plugin for video-js in the annotator
this
.
annotator
.
mplayer
=
this
.
mplayer
;
this
.
annotator
.
editor
.
VideoJS
=-
1
;
...
...
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