# HG changeset patch # User hamidouk # Date 1324294236 -3600 # Node ID 24308670f1bb787d8b3f692e2d196c075bd7c4a5 # Parent 1422ba0fc33385dd8920007f850faa98444e419b fixed the display of colors. diff -r 1422ba0fc333 -r 24308670f1bb src/js/utils.js --- a/src/js/utils.js Mon Dec 19 12:08:50 2011 +0100 +++ b/src/js/utils.js Mon Dec 19 12:30:36 2011 +0100 @@ -96,7 +96,8 @@ // conversion de couleur Decimal vers HexaDecimal || 000 si fff IriSP.DEC_HEXA_COLOR = function (dec) { - var hexa='0123456789ABCDEF',hex=''; + var hexa='0123456789ABCDEF'; + var hex=''; var tmp; while (dec>15){ tmp = dec-(Math.floor(dec/16))*16; diff -r 1422ba0fc333 -r 24308670f1bb src/js/widgets/segmentsWidget.js --- a/src/js/widgets/segmentsWidget.js Mon Dec 19 12:08:50 2011 +0100 +++ b/src/js/widgets/segmentsWidget.js Mon Dec 19 12:30:36 2011 +0100 @@ -80,9 +80,11 @@ var color = annotation.color; var hexa_color = IriSP.DEC_HEXA_COLOR(color); - + if (hexa_color === "FFCC00") hexa_color = "333"; + if (hexa_color.length == 4) + hexa_color = hexa_color + '00'; var annotationTemplate = Mustache.to_html(IriSP.annotation_template, {"divTitle" : divTitle, "id" : id, "startPourcent" : startPourcent, diff -r 1422ba0fc333 -r 24308670f1bb src/templates/annotation.html --- a/src/templates/annotation.html Mon Dec 19 12:08:50 2011 +0100 +++ b/src/templates/annotation.html Mon Dec 19 12:30:36 2011 +0100 @@ -3,6 +3,6 @@ class='Ldt-iri-chapter' style='left: {{startPourcent}}%; width: {{endPourcent}}%; - background:#{{hexa_color}};' + background-color:#{{hexa_color}};' >