fixed the display of colors.
--- 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;
--- 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,
--- 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}};'
>
</div>