# HG changeset patch # User hamidouk # Date 1324049039 -3600 # Node ID 1a09ab7e7163839741cc3a120a9c2b3a65e948b4 # Parent 1da76db24aa8b1c3d3c843da20f0d5b60b41febc fixed display bugs in segmentsWidget diff -r 1da76db24aa8 -r 1a09ab7e7163 src/css/LdtPlayer.css --- a/src/css/LdtPlayer.css Fri Dec 16 14:55:48 2011 +0100 +++ b/src/css/LdtPlayer.css Fri Dec 16 16:23:59 2011 +0100 @@ -18,7 +18,6 @@ } .Ldt-SegmentsWidget { - background-color: #b6b8b7; overflow: auto; /* clear the floats */ margin-top: 1px; } @@ -26,6 +25,7 @@ .Ldt-iri-chapter{ float: left; height: 10px; + border-right: 1px solid white; } .tooltip { diff -r 1da76db24aa8 -r 1a09ab7e7163 src/js/utils.js --- a/src/js/utils.js Fri Dec 16 14:55:48 2011 +0100 +++ b/src/js/utils.js Fri Dec 16 16:23:59 2011 +0100 @@ -103,8 +103,7 @@ hex = hexa.charAt(tmp)+hex; dec = Math.floor(dec/16); } - hex = hexa.charAt(dec)+hex; - if (hex == "FFCC00"){ hex="";/* by default color of Ldt annotation */ } + hex = hexa.charAt(dec)+hex; return(hex); }; diff -r 1da76db24aa8 -r 1a09ab7e7163 src/js/widgets/segmentsWidget.js --- a/src/js/widgets/segmentsWidget.js Fri Dec 16 14:55:48 2011 +0100 +++ b/src/js/widgets/segmentsWidget.js Fri Dec 16 16:23:59 2011 +0100 @@ -73,12 +73,20 @@ } var divTitle = annotation.content.title.substr(0,55); - var color = annotation.content.color - + if (typeof(annotation.content.color) !== "undefined") + var color = annotation.content.color; + else + var color = annotation.color; + + var hexa_color = IriSP.DEC_HEXA_COLOR(color); + console.log(hexa_color); + if (hexa_color === "FFCC00") + hexa_color = "333"; + var annotationTemplate = Mustache.to_html(IriSP.annotation_template, {"divTitle" : divTitle, "id" : id, "startPourcent" : startPourcent, - "endPourcent" : endPourcent, "hexa_color" : IriSP.DEC_HEXA_COLOR(color), + "endPourcent" : endPourcent, "hexa_color" : hexa_color, "seekPlace" : Math.round(begin/1000)});