# HG changeset patch # User cavaliet # Date 1385653470 -3600 # Node ID 77e0dbc58104bb82309a282daae84217206efdb9 # Parent 04c035cd1ac3b4530c20ec10aa658c07f6922060 v1.51.16 debug multisegments diff -r 04c035cd1ac3 -r 77e0dbc58104 src/ldt/ldt/__init__.py --- 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(): diff -r 04c035cd1ac3 -r 77e0dbc58104 src/ldt/ldt/static/ldt/metadataplayer/MultiSegments.js --- 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