fixed display bugs in segmentsWidget popcorn-port
authorhamidouk
Fri, 16 Dec 2011 16:23:59 +0100
branchpopcorn-port
changeset 473 1a09ab7e7163
parent 472 1da76db24aa8
child 474 c1998d5d552e
fixed display bugs in segmentsWidget
src/css/LdtPlayer.css
src/js/utils.js
src/js/widgets/segmentsWidget.js
--- 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 {
--- 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);
 };
 
--- 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)});