# HG changeset patch # User hamidouk # Date 1315909770 -7200 # Node ID b35c32744ae99bafb6a32435be23a9832a0aac9b # Parent 9ebaa5eb4f9b7344c22f53632742f2fbda5d3ebe templatized some tooltip code. diff -r 9ebaa5eb4f9b -r b35c32744ae9 src/js/LdtPlayer.js --- a/src/js/LdtPlayer.js Tue Sep 13 12:07:51 2011 +0200 +++ b/src/js/LdtPlayer.js Tue Sep 13 12:29:30 2011 +0200 @@ -802,6 +802,7 @@ } }; + IriSP.SearchThisSegment = function (annotation){ /* FIXME: to implement */ IriSP.jQuery("#LdtSearchInput").text(annotation.title); @@ -963,13 +964,10 @@ IriSP.jQueryAnnotationTemplate = "
"; //alert(this.color+" : "+DEC_HEXA_COLOR(this.color)); - - /* FIXME: templatize this portion */ - IriSP.jQuerytoolTipTemplate = "
" - +"
"+IriSP.stripHtml(this.title)+"
" - +"
"+this.begin+" : "+this.end+"
" - +"
"+IriSP.stripHtml(this.description)+"
" - +"
"; + + IriSP.jQuerytoolTipTemplate = Mustache.to_html(IriSP.tooltip_template, + {"title" : this.title, "begin" : this.begin, "end" : this.end, + "description": this.description}); IriSP.jQuery("
"+IriSP.jQueryAnnotationTemplate+"
").appendTo("#Ldt-Annotations"); diff -r 9ebaa5eb4f9b -r b35c32744ae9 src/templates/tooltip.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/templates/tooltip.html Tue Sep 13 12:29:30 2011 +0200 @@ -0,0 +1,5 @@ +
+
{{title}}
+
{{begin}} : {{end}}
+
{{description}}
+
\ No newline at end of file