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
de5edcff
Commit
de5edcff
authored
Apr 25, 2014
by
lduarte1991
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Diacritic Plugin for Annotator TooL: Added CSS and JS files
- UI Fixes for Diacritic Mark Plugin
parent
ee368da6
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
235 additions
and
25 deletions
+235
-25
common/static/css/vendor/ova/diacritic-annotator.css
+8
-0
common/static/css/vendor/ova/edx-annotator.css
+4
-0
common/static/css/vendor/ova/richText-annotator.css
+8
-4
common/static/css/vendor/ova/tags-annotator.css
+1
-1
common/static/js/vendor/ova/diacritic-annotator.js
+205
-0
common/static/js/vendor/ova/flagging-annotator.js
+0
-1
common/static/js/vendor/ova/ova.js
+3
-12
common/static/js/vendor/ova/rangeslider.js
+1
-1
common/static/js/vendor/ova/reply-annotator.js
+1
-1
common/static/js/vendor/ova/richText-annotator.js
+1
-2
common/static/js/vendor/ova/share-annotator.js
+1
-2
common/static/js/vendor/ova/tags-annotator.js
+0
-1
lms/envs/common.py
+2
-0
No files found.
common/static/css/vendor/ova/diacritic-annotator.css
0 → 100644
View file @
de5edcff
.mark
{
width
:
10px
;
height
:
10px
;
position
:
absolute
;
background-size
:
contain
;
background-repeat
:
no-repeat
;
background-position
:
50%
0%
;
}
common/static/css/vendor/ova/edx-annotator.css
View file @
de5edcff
/*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
{
opacity
:
0
;
}
...
...
common/static/css/vendor/ova/richText-annotator.css
View file @
de5edcff
...
...
@@ -16,6 +16,14 @@
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
{
min-width
:
400px
;
}
...
...
@@ -25,10 +33,6 @@
min-width
:
400px
;
}
.mce-floatpanel
{
z-index
:
700000000
!important
;
}
div
.mce-tinymce.mce-container.mce-panel
{
min-width
:
400px
;
}
...
...
common/static/css/vendor/ova/tags-annotator.css
View file @
de5edcff
...
...
@@ -43,7 +43,7 @@ li.token-input-input-token {
div
.token-input-dropdown
{
position
:
absolute
;
width
:
12
0px
;
width
:
40
0px
;
background-color
:
#fff
;
overflow
:
hidden
;
border-left
:
1px
solid
#ccc
;
...
...
common/static/js/vendor/ova/diacritic-annotator.js
0 → 100644
View file @
de5edcff
/*
Diacritic Annotator Plugin v1.0 (https://github.com/lduarte1991/diacritic-annotator)
Copyright (C) 2014 Luis F Duarte
License: https://github.com/lduarte1991/diacritic-annotator/blob/master/LICENSE.rst
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
var
_ref
,
__bind
=
function
(
fn
,
me
){
return
function
(){
return
fn
.
apply
(
me
,
arguments
);
};
},
__hasProp
=
{}.
hasOwnProperty
,
__extends
=
function
(
child
,
parent
)
{
for
(
var
key
in
parent
)
{
if
(
__hasProp
.
call
(
parent
,
key
))
child
[
key
]
=
parent
[
key
];
}
function
ctor
()
{
this
.
constructor
=
child
;
}
ctor
.
prototype
=
parent
.
prototype
;
child
.
prototype
=
new
ctor
();
child
.
__super__
=
parent
.
prototype
;
return
child
;
};
Annotator
.
Plugin
.
Diacritics
=
(
function
(
_super
)
{
__extends
(
Diacritics
,
_super
);
//Options will include diacritic name, picture used, baseline
Diacritics
.
prototype
.
options
=
null
;
Diacritics
.
prototype
.
diacriticmarks
=
null
;
//initiate diacritics elements
function
Diacritics
(
element
,
options
)
{
this
.
pluginSubmit
=
__bind
(
this
.
pluginSubmit
,
this
);
this
.
updateDiacritics
=
__bind
(
this
.
updateDiacritics
,
this
);
this
.
updateViewer
=
__bind
(
this
.
updateViewer
,
this
);
this
.
getDiacritics
=
__bind
(
this
.
getDiacritics
,
this
);
this
.
getPos
=
__bind
(
this
.
getPos
,
this
);
this
.
putMarkatLocation
=
__bind
(
this
.
putMarkatLocation
,
this
);
this
.
updateEditorForDiacritics
=
__bind
(
this
.
updateEditorForDiacritics
,
this
);
this
.
options
=
options
;
this
.
diacriticmarks
=
this
.
getDiacritics
();
_ref
=
Diacritics
.
__super__
.
constructor
.
apply
(
this
,
arguments
);
return
_ref
;
}
//example variables to be used to receive input in the annotator view
Diacritics
.
prototype
.
field
=
null
;
Diacritics
.
prototype
.
input
=
null
;
//this function will initialize the plug in
Diacritics
.
prototype
.
pluginInit
=
function
()
{
console
.
log
(
"Diacritics-pluginInit"
);
//Check that annotator is working
if
(
!
Annotator
.
supported
())
{
return
;
}
var
di
=
this
.
diacriticmarks
;
//-- Editor
var
self
=
this
;
if
(
di
!=
'undefined'
){
$
.
each
(
di
,
function
(
item
){
self
.
field
=
self
.
annotator
.
editor
.
addField
({
type
:
'checkbox'
,
//options (textarea,input,select,checkbox)
label
:
Annotator
.
_t
(
item
),
submit
:
self
.
pluginSubmit
,
});
});
//-- Viewer
var
newview
=
this
.
annotator
.
viewer
.
addField
({
load
:
this
.
updateViewer
,
});
this
.
annotator
.
subscribe
(
'annotationsLoaded'
,
this
.
updateDiacritics
);
this
.
annotator
.
subscribe
(
'annotationUploaded'
,
this
.
updateDiacritics
);
this
.
annotator
.
subscribe
(
'annotationDeleted'
,
this
.
updateDiacritics
);
this
.
annotator
.
subscribe
(
'annotationUpdated'
,
this
.
updateDiacritics
);
this
.
annotator
.
subscribe
(
'annotationEditorShown'
,
this
.
updateEditorForDiacritics
,
this
.
field
);
var
self
=
this
;
$
(
window
).
resize
(
function
()
{
self
.
updateDiacritics
();
});
}
return
this
.
input
=
$
(
this
.
field
).
find
(
':input'
);
};
//The following function is run when a person hits submit.
Diacritics
.
prototype
.
pluginSubmit
=
function
(
field
,
annotation
)
{
var
checkedItems
=
$
(
this
.
field
).
find
(
':input'
);
var
self
=
this
;
$
.
each
(
checkedItems
,
function
(
item
){
if
(
typeof
annotation
.
tags
!=
'undefined'
){
var
index
=
$
.
inArray
(
checkedItems
[
item
].
placeholder
,
annotation
.
tags
);
if
(
index
!=
-
1
){
annotation
.
tags
.
splice
(
index
,
1
);
if
(
typeof
$
(
$
(
'.annotator-wrapper'
)[
0
]).
find
(
'div.'
+
annotation
.
id
)[
0
]
!=
'undefined'
){
$
(
$
(
'.annotator-wrapper'
)[
0
]).
find
(
'div.'
+
annotation
.
id
)[
0
].
remove
();
}
else
{
$
(
$
(
'.annotator-wrapper'
)[
0
]).
find
(
'div.undefined'
)[
0
].
remove
();
}
}
if
(
checkedItems
[
item
].
checked
==
true
){
annotation
.
tags
.
unshift
(
checkedItems
[
item
].
placeholder
);
self
.
putMarkatLocation
(
annotation
,
checkedItems
[
item
].
placeholder
);
}
}
else
{
if
(
checkedItems
[
item
].
checked
==
true
){
annotation
[
'tags'
]
=
[
checkedItems
[
item
].
placeholder
];
self
.
putMarkatLocation
(
annotation
,
checkedItems
[
item
].
placeholder
);
}
}
});
}
Diacritics
.
prototype
.
putMarkatLocation
=
function
(
annotation
,
mark
){
var
loc
=
this
.
getPos
(
annotation
.
highlights
[
0
]);
var
alignment
=
this
.
diacriticmarks
[
mark
][
1
];
var
imgurl
=
this
.
diacriticmarks
[
mark
][
0
];
var
newdiv
=
document
.
createElement
(
'div'
);
var
className
=
'mark '
+
annotation
.
id
;
newdiv
.
setAttribute
(
'class'
,
className
);
if
(
alignment
==
'top'
){
$
(
newdiv
).
css
(
'top'
,
""
+
(
loc
.
y
-
5
)
+
"px"
);
}
else
if
(
alignment
==
'bottom'
){
$
(
newdiv
).
css
(
'top'
,
""
+
(
loc
.
y
+
loc
.
height
-
5
)
+
"px"
);
}
else
{
$
(
newdiv
).
css
(
'top'
,
""
+
loc
.
y
+
"px"
);
}
$
(
newdiv
).
css
(
'left'
,
""
+
(
loc
.
x
+
(
loc
.
width
/
2.0
)
-
5
)
+
"px"
);
$
(
newdiv
).
css
(
'background-image'
,
'url('
+
imgurl
+
')'
);
$
(
'.annotator-wrapper'
)[
0
].
appendChild
(
newdiv
);
}
Diacritics
.
prototype
.
getDiacritics
=
function
(){
if
(
typeof
this
.
options
.
diacritics
!=
'undefined'
){
var
self
=
this
;
var
final
=
new
Object
(),
prelim
=
this
.
options
.
diacritics
.
split
(
","
);
prelim
.
forEach
(
function
(
item
){
var
temp
=
item
.
split
(
";"
);
if
(
temp
.
length
<
3
)
{
return
undefined
;}
final
[
temp
[
0
]]
=
[
temp
[
1
],
temp
[
2
]];
});
return
final
;
}
console
.
log
(
"Was undefined"
);
return
undefined
;
}
Diacritics
.
prototype
.
getPos
=
function
(
el
)
{
var
off
=
$
(
el
).
offset
();
return
{
x
:
off
.
left
-
$
(
$
(
'.annotator-wrapper'
)[
0
]).
offset
().
left
,
y
:
off
.
top
-
$
(
$
(
'.annotator-wrapper'
)[
0
]).
offset
().
top
,
width
:
$
(
el
).
width
(),
height
:
$
(
el
).
height
()};
}
Diacritics
.
prototype
.
updateDiacritics
=
function
(){
$
(
'.mark'
).
remove
();
var
annotations
=
this
.
annotator
.
plugins
[
'Store'
].
annotations
;
var
self
=
this
;
annotations
.
forEach
(
function
(
ann
){
$
.
each
(
self
.
diacriticmarks
,
function
(
item
){
if
(
$
.
inArray
(
item
,
ann
.
tags
)
!=
-
1
){
self
.
putMarkatLocation
(
ann
,
item
);
}
});
});
}
Diacritics
.
prototype
.
updateViewer
=
function
(
field
,
annotation
){
$
(
field
).
remove
();
}
Diacritics
.
prototype
.
updateEditorForDiacritics
=
function
(
field
,
annotation
){
if
(
typeof
annotation
.
tags
==
'undefined'
){
return
;
}
var
self
=
this
;
var
inputItems
=
$
(
this
.
field
).
find
(
':input'
);
var
dictOfItems
=
{}
$
.
each
(
inputItems
,
function
(
item
){
inputItems
[
item
].
checked
=
false
;
dictOfItems
[
inputItems
[
item
].
placeholder
]
=
inputItems
[
item
];
});
annotation
.
tags
.
forEach
(
function
(
tag
){
if
(
typeof
self
.
diacriticmarks
[
tag
]
!=
'undefined'
){
dictOfItems
[
tag
].
checked
=
true
;
}
});
}
return
Diacritics
;
})(
Annotator
.
Plugin
);
\ No newline at end of file
common/static/js/vendor/ova/flagging-annotator.js
View file @
de5edcff
// Generated by CoffeeScript 1.6.3
var
_ref
,
__bind
=
function
(
fn
,
me
){
return
function
(){
return
fn
.
apply
(
me
,
arguments
);
};
},
__hasProp
=
{}.
hasOwnProperty
,
...
...
common/static/js/vendor/ova/ova.js
View file @
de5edcff
/*
Open Video Annotation v1.0 (http://openvideoannotation.org/)
Copyright (C) 2014 CHS (Harvard University), Daniel Cebri‡n Robles and Phil Desenne
Copyright (C) 2014 CHS (Harvard University), Daniel Cebri
a
n Robles and Phil Desenne
License: https://github.com/CtrHellenicStudies/OpenVideoAnnotation/blob/master/License.rst
This program is free software; you can redistribute it and/or
...
...
@@ -2389,17 +2389,8 @@ OpenVideoAnnotation.Annotator = function (element, options) {
if
(
typeof
options
.
optionsAnnotator
.
highlightTags
!=
'undefined'
)
this
.
annotator
.
addPlugin
(
"HighlightTags"
,
options
.
optionsAnnotator
.
highlightTags
);
/*
this.annotator.addPlugin("Filter", {
filters: [
{
label: 'Media',
property: 'media'
}
]
});//it is obligatory to have
*/
if
(
typeof
options
.
optionsAnnotator
.
diacriticMarks
!=
'undefined'
&&
typeof
Annotator
.
Plugin
[
"Diacritics"
]
===
'function'
)
this
.
annotator
.
addPlugin
(
"Diacritics"
,
options
.
optionsAnnotator
.
diacriticMarks
);
if
(
typeof
Annotator
.
Plugin
[
"Geolocation"
]
===
'function'
)
this
.
annotator
.
addPlugin
(
"Geolocation"
,
options
.
optionsAnnotator
.
geolocation
);
...
...
common/static/js/vendor/ova/rangeslider.js
View file @
de5edcff
/*
RangeSlider v1.0 (https://github.com/danielcebrian/rangeslider-videojs)
Copyright (C) 2014 Daniel Cebri‡n Robles
Copyright (C) 2014 Daniel Cebri
a
n Robles
License: https://github.com/danielcebrian/rangeslider-videojs/blob/master/License.rst
This program is free software; you can redistribute it and/or
...
...
common/static/js/vendor/ova/reply-annotator.js
View file @
de5edcff
/*
Reply Annotator Plugin v1.0 (https://github.com/danielcebrian/reply-annotator)
Copyright (C) 2014 Daniel Cebri‡n Robles
Copyright (C) 2014 Daniel Cebri
a
n Robles
License: https://github.com/danielcebrian/reply-annotator/blob/master/License.rst
This program is free software; you can redistribute it and/or
...
...
common/static/js/vendor/ova/richText-annotator.js
View file @
de5edcff
/*
Rich Text Annotator Plugin v1.0 (https://github.com/danielcebrian/richText-annotator)
Copyright (C) 2014 Daniel Cebrin Robles
Copyright (C) 2014 Daniel Cebri
a
n Robles
License: https://github.com/danielcebrian/richText-annotator/blob/master/License.rst
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
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
// Generated by CoffeeScript 1.6.3
var
_ref
,
__bind
=
function
(
fn
,
me
){
return
function
(){
return
fn
.
apply
(
me
,
arguments
);
};
},
__hasProp
=
{}.
hasOwnProperty
,
...
...
common/static/js/vendor/ova/share-annotator.js
View file @
de5edcff
/*
Share Annotation Plugin v1.0 (https://github.com/danielcebrian/share-annotator)
Copyright (C) 2014 Daniel Cebrin Robles
Copyright (C) 2014 Daniel Cebri
a
n Robles
License: https://github.com/danielcebrian/share-annotator/blob/master/License.rst
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
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
// Generated by CoffeeScript 1.6.3
var
_ref
,
__bind
=
function
(
fn
,
me
){
return
function
(){
return
fn
.
apply
(
me
,
arguments
);
};
},
__hasProp
=
{}.
hasOwnProperty
,
...
...
common/static/js/vendor/ova/tags-annotator.js
View file @
de5edcff
...
...
@@ -886,7 +886,6 @@ $.TokenList.Cache = function (options) {
};
}(
jQuery
));
// Generated by CoffeeScript 1.6.3
var
_ref
,
__bind
=
function
(
fn
,
me
){
return
function
(){
return
fn
.
apply
(
me
,
arguments
);
};
},
__hasProp
=
{}.
hasOwnProperty
,
...
...
lms/envs/common.py
View file @
de5edcff
...
...
@@ -848,6 +848,7 @@ main_vendor_js = [
'js/vendor/ova/reply-annotator.js'
,
'js/vendor/ova/tags-annotator.js'
,
'js/vendor/ova/flagging-annotator.js'
,
'js/vendor/ova/diacritic-annotator.js'
,
'js/vendor/ova/jquery-Watch.js'
,
'js/vendor/ova/openseadragon.js'
,
'js/vendor/ova/OpenSeaDragonAnnotation.js'
,
...
...
@@ -878,6 +879,7 @@ PIPELINE_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/ova.css'
,
'js/vendor/ova/catch/css/main.css'
],
...
...
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