15 IriSP.AnnotationsWidget.prototype.displayAnnotation = function(annotation) { |
15 IriSP.AnnotationsWidget.prototype.displayAnnotation = function(annotation) { |
16 |
16 |
17 var title = annotation.content.title; |
17 var title = annotation.content.title; |
18 var description = annotation.content.description; |
18 var description = annotation.content.description; |
19 var keywords = "" // FIXME; |
19 var keywords = "" // FIXME; |
20 var begin = +annotation.begin; |
20 var begin = +annotation.begin / 1000; |
21 var end = +annotation.end; |
21 var end = +annotation.end / 1000; |
22 var duration = +this._serializer.currentMedia().meta["dc:duration"]; |
22 var duration = +this._serializer.currentMedia().meta["dc:duration"]; |
23 |
23 |
24 this.selector.find(".Ldt-SaTitle").text(title); |
24 var title_templ = "{{title}} - ( {{begin}} - {{end}} )"; |
|
25 var endstr = Mustache.to_html(title_templ, {title: title, begin: IriSP.secondsToTime(begin), end: IriSP.secondsToTime(end)}); |
|
26 |
|
27 this.selector.find(".Ldt-SaTitle").text(endstr); |
25 this.selector.find(".Ldt-SaDescription").text(description); |
28 this.selector.find(".Ldt-SaDescription").text(description); |
26 var startPourcent = parseInt(Math.round((begin*1+(end*1-begin*1)/2) / (duration*1)) / 100); |
29 //var startPourcent = parseInt(Math.round((begin*1+(end*1-begin*1)/2) / (duration*1)) / 100); |
27 |
30 |
28 }; |
31 }; |
29 |
32 |
30 IriSP.AnnotationsWidget.prototype.clearWidget = function() { |
33 IriSP.AnnotationsWidget.prototype.clearWidget = function() { |
31 |
34 |