Image Annotation Tool: Annotation Mode for AB Testing
Annotation Tools PR Fixes - forgot to overwrite the previous line
This commit is contained in:
@@ -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(){
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user