v1.51.16 debug multisegments V01.51.16
authorcavaliet
Thu, 28 Nov 2013 16:44:30 +0100
changeset 1264 77e0dbc58104
parent 1263 04c035cd1ac3
child 1265 620f2ee2248d
v1.51.16 debug multisegments
src/ldt/ldt/__init__.py
src/ldt/ldt/static/ldt/metadataplayer/MultiSegments.js
--- a/src/ldt/ldt/__init__.py	Thu Nov 28 11:23:11 2013 +0100
+++ b/src/ldt/ldt/__init__.py	Thu Nov 28 16:44:30 2013 +0100
@@ -1,6 +1,6 @@
 __all__ = ["VERSION", "get_version", "__version__"]
 
-VERSION = (1, 51, 15, "final", 0)
+VERSION = (1, 51, 16, "final", 0)
 
 
 def get_version():
--- a/src/ldt/ldt/static/ldt/metadataplayer/MultiSegments.js	Thu Nov 28 11:23:11 2013 +0100
+++ b/src/ldt/ldt/static/ldt/metadataplayer/MultiSegments.js	Thu Nov 28 16:44:30 2013 +0100
@@ -96,10 +96,27 @@
             lines.push(line);
         }
     });
-    var _annotationWidgets = _this.$.find(".Ldt-MultiSegments-Annotation");
+    
+    // open line on segment click
+    $j(document).on("click",".Ldt-Segments-Segment",function(e){
+    	if (!_this.show_all && currentLine && !currentLine.hasSegmentsNow()) {
+            currentLine = undefined;
+        }
+        IriSP._(lines).each(function(line) {
+        	if($j(e.target).parent().parent()[0]==line.segmentWidget[0]){
+        		window.console.log("YIHAH !");
+        		currentLine = line;
+        		line.show();
+        	} else {
+                line.hide();
+            }
+        });
+    });
+    
+    //var _annotationWidgets = _this.$.find(".Ldt-MultiSegments-Annotation");
     
     function checkVisibilities(_time) {
-        if (!_this.show_all && currentLine && !currentLine.hasSegmentsNow()) {
+        /*if (!_this.show_all && currentLine && !currentLine.hasSegmentsNow()) {
             currentLine = undefined;
         }
         IriSP._(lines).each(function(line) {
@@ -115,8 +132,6 @@
             } else {
                 line.hide();
             }
-        });
+        });*/
     }
-    
-    this.onMediaEvent("timeupdate", checkVisibilities);
 };
\ No newline at end of file