--- a/web/res/metadataplayer/Annotation.js Thu Sep 26 14:46:53 2013 +0200
+++ b/web/res/metadataplayer/Annotation.js Tue Oct 01 16:33:47 2013 +0200
@@ -15,6 +15,7 @@
on_site: " sur ",
tags_: "Mots-clés\u00a0:",
description_: "Description\u00a0:",
+ creator_: "Créé par\u00a0:",
excerpt_from: "Extrait de\u00a0:",
untitled: "Segment sans titre"
},
@@ -23,10 +24,11 @@
on_site: " on ",
tags_: "Keywords:",
description_: "Description:",
+ creator_: "Created by\u00a0:",
excerpt_from: "Excerpt from:",
untitled: "Untitled segment"
}
-}
+};
IriSP.Widgets.Annotation.prototype.template =
'{{#show_arrow}}<div class="Ldt-Annotation-Arrow"></div>{{/show_arrow}}'
@@ -38,7 +40,9 @@
+ '(<span class="Ldt-Annotation-Begin"></span> - <span class="Ldt-Annotation-End"></span>)</span></h3>'
+ '<h3 class="Ldt-Annotation-MashupOrigin Ldt-Annotation-HiddenWhenEmpty">{{l10n.excerpt_from}} <span class="Ldt-Annotation-MashupMedia"></span> <span class="Ldt-Annotation-Time Ldt-Annotation-HiddenWhenMinimized">'
+ '(<span class="Ldt-Annotation-MashupBegin"></span> - <span class="Ldt-Annotation-MashupEnd"></span>)</span></h3>'
- + '<div class="Ldt-Annotation-Cleared Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-Description-Block"><div class="Ldt-Annotation-Label">{{l10n.description_}}</div>'
+ + '<div class="Ldt-Annotation-Cleared Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-Creator-Block"><div class="Ldt-Annotation-Label">{{l10n.creator_}}</div>'
+ + '{{#show_creator}}<p class="Ldt-Annotation-Labelled Ldt-Annotation-Creator"></p></div>'
+ + '<div class="Ldt-Annotation-Cleared Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-Description-Block"><div class="Ldt-Annotation-Label">{{l10n.description_}}</div>{{/show_creator}}'
+ '<p class="Ldt-Annotation-Labelled Ldt-Annotation-Description"></p></div>'
+ '<div class="Ldt-Annotation-Tags-Block Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-Cleared">'
+ '<div class="Ldt-Annotation-Label">{{l10n.tags_}}</div><ul class="Ldt-Annotation-Labelled Ldt-Annotation-Tags"></ul>'
@@ -48,12 +52,13 @@
annotation_type : "chap",
start_minimized: false,
show_arrow : true,
+ show_creator: true,
arrow_position: .5,
site_name : "Lignes de Temps",
search_on_tag_click: true,
show_social: true,
show_annotation_type: false
-}
+};
IriSP.Widgets.Annotation.prototype.draw = function() {
@@ -116,8 +121,11 @@
_this.$.find(".Ldt-Annotation-Tags-Block").addClass("Ldt-Annotation-EmptyBlock");
}
highlightTitleAndDescription();
+ if (_this.show_creator) {
+ _this.$.find(".Ldt-Annotation-Creator").text(_annotation.creator);
+ }
if (_this.show_annotation_type) {
- _this.$.find(".Ldt-Annotation-Type").text(_annotation.getAnnotationType().title)
+ _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());
@@ -171,7 +179,7 @@
this.$.find(".Ldt-Annotation-MaxMinButton").click(this.functionWrapper("toggleSize"));
this.getWidgetAnnotations().forEach(function(_a) {
_a.on("enter", function() {
- drawAnnotation(_a)
+ drawAnnotation(_a);
});
});
this.source.getAnnotations().on("found", highlightTitleAndDescription);
@@ -185,26 +193,26 @@
uri: (typeof currentAnnotation.url !== "undefined"
? currentAnnotation.url
: (document.location.href.replace(/#.*$/,'') + '#id=' + currentAnnotation.id))
- }
+ };
});
-}
+};
IriSP.Widgets.Annotation.prototype.sendBounds = function() {
this.player.trigger("Annotation.boundsChanged",this.bounds);
-}
+};
IriSP.Widgets.Annotation.prototype.drawAnnotation = function(_annotation) {
this.lastAnnotation = _annotation.id;
-}
+};
IriSP.Widgets.Annotation.prototype.hide = function() {
this.$.slideUp();
-}
+};
IriSP.Widgets.Annotation.prototype.show = function() {
this.$.slideDown();
-}
+};
IriSP.Widgets.Annotation.prototype.toggleSize = function() {
if (this.minimized) {
@@ -212,14 +220,14 @@
} else {
this.minimize();
}
-}
+};
IriSP.Widgets.Annotation.prototype.minimize = function() {
this.minimized = true;
this.$.find('.Ldt-Annotation-Inner').addClass("Ldt-Annotation-Minimized");
-}
+};
IriSP.Widgets.Annotation.prototype.maximize = function() {
this.minimized = false;
this.$.find('.Ldt-Annotation-Inner').removeClass("Ldt-Annotation-Minimized");
-}
\ No newline at end of file
+};
\ No newline at end of file