src/js/widgets/segmentsWidget.js
branchpopcorn-port
changeset 473 1a09ab7e7163
parent 464 dd543fb9d38a
child 474 c1998d5d552e
--- 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)});