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
b22643ad
Commit
b22643ad
authored
Jun 03, 2014
by
lduarte1991
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Image Annotation Tool: Annotation Mode for AB Testing
Annotation Tools PR Fixes - forgot to overwrite the previous line
parent
50e8ae9a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
29 deletions
+34
-29
common/static/js/vendor/ova/OpenSeaDragonAnnotation.js
+14
-13
lms/templates/imageannotation.html
+12
-7
lms/templates/textannotation.html
+4
-4
lms/templates/videoannotation.html
+4
-5
No files found.
common/static/js/vendor/ova/OpenSeaDragonAnnotation.js
View file @
b22643ad
...
...
@@ -380,19 +380,20 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
clickTimeThreshold
:
viewer
.
clickTimeThreshold
,
clickDistThreshold
:
viewer
.
clickDistThreshold
});
/* Set elements to the control menu */
viewer
.
annotatorControl
=
viewer
.
wrapperAnnotation
.
element
;
if
(
viewer
.
toolbar
){
viewer
.
toolbar
.
addControl
(
viewer
.
annotatorControl
,
{
anchor
:
$
.
ControlAnchor
.
BOTTOM_RIGHT
}
);
}
else
{
viewer
.
addControl
(
viewer
.
annotatorControl
,
{
anchor
:
$
.
ControlAnchor
.
TOP_LEFT
}
);
if
(
this
.
options
.
viewer
.
annotation_mode
==
"2"
||
this
.
options
.
viewer
.
flags
){
/* Set elements to the control menu */
viewer
.
annotatorControl
=
viewer
.
wrapperAnnotation
.
element
;
if
(
viewer
.
toolbar
){
viewer
.
toolbar
.
addControl
(
viewer
.
annotatorControl
,
{
anchor
:
$
.
ControlAnchor
.
BOTTOM_RIGHT
}
);
}
else
{
viewer
.
addControl
(
viewer
.
annotatorControl
,
{
anchor
:
$
.
ControlAnchor
.
TOP_LEFT
}
);
}
}
},
_reset
:
function
(){
...
...
lms/templates/imageannotation.html
View file @
b22643ad
...
...
@@ -34,7 +34,7 @@
</div>
<div
id=
"catchDIV"
>
## Translators: Notes below refer to annotations. They wil later be put under a "Notes" section.
<div
class=
"annotationListContainer"
>
${_('
You do not have any notes
.')}
</div>
<div
class=
"annotationListContainer"
>
${_('
Note: only instructors may annotate
.')}
</div>
</div>
</div>
</div>
...
...
@@ -72,7 +72,7 @@
var
unit_id
=
$
(
'#sequence-list'
).
find
(
'.active'
).
attr
(
"data-element"
);
uri
+=
unit_id
;
var
pagination
=
100
,
is_staff
=
!
(
'${user.is_staff}'
==
'False
'
),
is_staff
=
(
'${user.email}'
==
'${instructor_username}
'
),
options
=
{
optionsAnnotator
:
{
permissions
:{
...
...
@@ -172,6 +172,8 @@
},
optionsOpenSeadragon
:{
id
:
"imageHolder"
,
annotation_mode
:
"${annotation_mode}"
,
flags
:
is_staff
,
prefixUrl
:
"${settings.STATIC_URL}"
+
"js/vendor/ova/images/"
,
$
{
openseadragonjson
}
},
...
...
@@ -195,8 +197,8 @@
}
//Catch
var
annotator
=
osda
.
annotator
,
catchOptions
=
{
var
annotator
=
osda
.
annotator
;
var
catchOptions
=
{
media
:
'image'
,
externalLink
:
false
,
imageUrlRoot
:
imgURLRoot
,
...
...
@@ -208,8 +210,10 @@
default_tab
:
"${default_tab}"
,
instructor_username
:
"${instructor_username}"
,
annotation_mode
:
"${annotation_mode}"
,
},
Catch
=
new
CatchAnnotation
(
$
(
'#catchDIV'
),
catchOptions
);
};
if
(
"${annotation_mode}"
==
"2"
||
(
"${annotation_mode}"
==
1
&&
"${instructor_username}"
!=
""
))
var
Catch
=
new
CatchAnnotation
(
$
(
'#catchDIV'
),
catchOptions
);
if
(
"${annotation_mode}"
==
1
&&
"${instructor_username}"
==
""
&&
!
is_staff
)
osda
.
annotator
.
destroy
();
}
</script>
\ No newline at end of file
lms/templates/textannotation.html
View file @
b22643ad
...
...
@@ -183,8 +183,8 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
}
//Catch
var
annotator
=
ova
.
annotator
,
catchOptions
=
{
var
annotator
=
ova
.
annotator
;
var
catchOptions
=
{
media
:
'text'
,
externalLink
:
false
,
imageUrlRoot
:
imgURLRoot
,
...
...
@@ -196,6 +196,6 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
default_tab
:
"${default_tab}"
,
instructor_username
:
"${instructor_username}"
,
annotation_mode
:
"${annotation_mode}"
,
}
,
Catch
=
new
CatchAnnotation
(
$
(
'#catchDIV'
),
catchOptions
);
}
;
var
Catch
=
new
CatchAnnotation
(
$
(
'#catchDIV'
),
catchOptions
);
</script>
lms/templates/videoannotation.html
View file @
b22643ad
...
...
@@ -181,8 +181,8 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
}
//Catch
var
annotator
=
ova
.
annotator
,
catchOptions
=
{
var
annotator
=
ova
.
annotator
;
var
catchOptions
=
{
media
:
'video'
,
externalLink
:
false
,
imageUrlRoot
:
imgURLRoot
,
...
...
@@ -190,11 +190,10 @@ ${static.css(group='style-vendor-tinymce-skin', raw=True)}
showPublicPrivate
:
true
,
userId
:
userId
,
pagination
:
pagination
,
//Number of Annotations per load in the pagination,
flags
:
is_staff
flags
:
is_staff
,
default_tab
:
"${default_tab}"
,
instructor_username
:
"${instructor_username}"
,
annotation_mode
:
"${annotation_mode}"
,
}
,
Catch
=
new
CatchAnnotation
(
$
(
'#catchDIV'
),
catchOptions
);
}
;
var
Catch
=
new
CatchAnnotation
(
$
(
'#catchDIV'
),
catchOptions
);
</script>
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