# HG changeset patch # User hamidouk # Date 1315911482 -7200 # Node ID 59a78986f19e67dacbcdc6e4ae27fa8d1ce0655a # Parent b35c32744ae99bafb6a32435be23a9832a0aac9b templatized the annotation code diff -r b35c32744ae9 -r 59a78986f19e src/js/LdtPlayer.js --- a/src/js/LdtPlayer.js Tue Sep 13 12:29:30 2011 +0200 +++ b/src/js/LdtPlayer.js Tue Sep 13 12:58:02 2011 +0200 @@ -960,11 +960,13 @@ //alert (this.duration); var startPourcent = this.timeToPourcent(this.begin,this.duration); // temps du media var endPourcent = this.timeToPourcent(this.end,this.duration)-startPourcent; - var titleForDiv = this.title.substr(0,55); + var divTitle = this.title.substr(0,55); + + IriSP.jQueryAnnotationTemplate = Mustache.to_html(IriSP.annotation_template, + {"divTitle" : divTitle, "id" : this.id, "startPourcent" : startPourcent, + "endPourcent" : endPourcent, "hexa_color" : IriSP.DEC_HEXA_COLOR(this.color), + "seekPlace" : Math.round(this.begin/1000)}); - IriSP.jQueryAnnotationTemplate = "
"; - //alert(this.color+" : "+DEC_HEXA_COLOR(this.color)); - IriSP.jQuerytoolTipTemplate = Mustache.to_html(IriSP.tooltip_template, {"title" : this.title, "begin" : this.begin, "end" : this.end, "description": this.description}); diff -r b35c32744ae9 -r 59a78986f19e src/templates/annotation.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/templates/annotation.html Tue Sep 13 12:58:02 2011 +0200 @@ -0,0 +1,6 @@ +
+
\ No newline at end of file