'
+ '
'
- + '
'
- + '
'
- + '( - )
'
- + '
{{l10n.excerpt_from}} '
- + '( - )
'
+ + '{{#show_social}}
{{/show_social}}'
+ + '
{{#show_annotation_type}} » {{/show_annotation_type}} '
+ + '( - )
'
+ + '
{{l10n.excerpt_from}} '
+ + '( - )
'
+ '
{{l10n.description_}}
'
+ '
'
+ '
'
@@ -47,7 +49,9 @@
start_minimized: false,
show_arrow : true,
site_name : "Lignes de Temps",
- search_on_tag_click: true
+ search_on_tag_click: true,
+ show_social: true,
+ show_annotation_type: false
}
IriSP.Widgets.Annotation.prototype.draw = function() {
@@ -91,7 +95,7 @@
} else {
_this.$.find(".Ldt-Annotation-Tags-Block").addClass("Ldt-Annotation-EmptyBlock");
}
- _this.$.find(".Ldt-Annotation-Title").html(_annotation.title);
+ _this.$.find(".Ldt-Annotation-Title").text(_annotation.title || "(" + _this.l10n.untitled + ")");
var _desc = _annotation.description.replace(/(^\s+|\s+$)/g,'');
if (_desc) {
_this.$.find(".Ldt-Annotation-Description-Block").removeClass("Ldt-Annotation-EmptyBlock");
@@ -99,13 +103,16 @@
} else {
_this.$.find(".Ldt-Annotation-Description-Block").addClass("Ldt-Annotation-EmptyBlock");
}
- _this.$.find(".Ldt-Annotation-Begin").html(_annotation.begin.toString());
- _this.$.find(".Ldt-Annotation-End").html(_annotation.end.toString());
+ if (_this.show_annotation_type) {
+ _this.$.find(".Ldt-Annotation-Type").text(_annotation.getAnnotationType().title)
+ }
+ _this.$.find(".Ldt-Annotation-Begin").text(_annotation.begin.toString());
+ _this.$.find(".Ldt-Annotation-End").text(_annotation.end.toString());
if (_annotation.elementType === "mashedAnnotation") {
_this.$.find('.Ldt-Annotation-Inner').addClass("Ldt-Annotation-isMashup");
- _this.$.find(".Ldt-Annotation-MashupMedia").html(_annotation.getMedia().title);
- _this.$.find(".Ldt-Annotation-MashupBegin").html(_annotation.annotation.begin.toString());
- _this.$.find(".Ldt-Annotation-MashupEnd").html(_annotation.annotation.end.toString());
+ _this.$.find(".Ldt-Annotation-MashupMedia").text(_annotation.getMedia().title);
+ _this.$.find(".Ldt-Annotation-MashupBegin").text(_annotation.annotation.begin.toString());
+ _this.$.find(".Ldt-Annotation-MashupEnd").text(_annotation.annotation.end.toString());
} else {
_this.$.find('.Ldt-Annotation-Inner').removeClass("Ldt-Annotation-isMashup");
}
@@ -127,7 +134,11 @@
}
this.renderTemplate();
- this.insertSubwidget(this.$.find(".Ldt-Annotation-Social"), { type: "Social" }, "socialWidget");
+
+ if (_this.show_social) {
+ this.insertSubwidget(this.$.find(".Ldt-Annotation-Social"), { type: "Social" }, "socialWidget");
+ }
+
this.insertSubwidget(this.$.find(".Ldt-Annotation-Arrow"), { type: "Arrow" }, "arrow");
this.onMediaEvent("timeupdate",timeupdate);
this.onMdpEvent("Annotation.hide","hide");