Corrected small issues with Segments and MultiSegments V01.59.06
authordurandn
Wed, 07 Oct 2015 16:58:19 +0200
changeset 1456 72d57da3cf5f
parent 1455 8129958e8dab
child 1457 055ea84a196e
Corrected small issues with Segments and MultiSegments
src/ldt/ldt/static/ldt/metadataplayer/Markers.js
src/ldt/ldt/static/ldt/metadataplayer/MultiSegments.js
src/ldt/ldt/static/ldt/metadataplayer/Segments.js
--- a/src/ldt/ldt/static/ldt/metadataplayer/Markers.js	Wed Oct 07 12:59:35 2015 +0200
+++ b/src/ldt/ldt/static/ldt/metadataplayer/Markers.js	Wed Oct 07 16:58:19 2015 +0200
@@ -459,7 +459,7 @@
         var _annotation = this.selectedMarker,
             _url = Mustache.to_html(this.api_endpoint_template_edit, {annotation_id: this.selectedMarker ? this.selectedMarker.id : ""});
         _annotation.source = _export
-        _annotation.description = this.$.find(".Ldt-Markers-MarkerTextArea").val(), /* Description field */
+        _annotation.description = this.$.find(".Ldt-Markers-MarkerTextArea").val(); /* Description field */
     }
     else {
         var _annotation = new IriSP.Model.Annotation(false, _export),
--- a/src/ldt/ldt/static/ldt/metadataplayer/MultiSegments.js	Wed Oct 07 12:59:35 2015 +0200
+++ b/src/ldt/ldt/static/ldt/metadataplayer/MultiSegments.js	Wed Oct 07 16:58:19 2015 +0200
@@ -27,7 +27,7 @@
     });
     this.source.getAnnotationTypes().forEach(function(_anntype) {
         var segments = _anntype.getAnnotations().filter(function(_ann) {
-            return _ann.getDuration() > 0;
+            return _ann.getDuration() > 0 && _ann.getMedia().id == _this.media.id;
         });
         if (segments.length) {
             
--- a/src/ldt/ldt/static/ldt/metadataplayer/Segments.js	Wed Oct 07 12:59:35 2015 +0200
+++ b/src/ldt/ldt/static/ldt/metadataplayer/Segments.js	Wed Oct 07 16:58:19 2015 +0200
@@ -37,10 +37,10 @@
         this.width = this.$.parent().width();
         this.$.css({ width : this.width + "px" });
     }
-    var _list = this.getWidgetAnnotations().filter(function(_ann) {
-        return _ann.getDuration() > 0;
-    }),
-        _this = this,
+    var _this = this,
+        _list = this.getWidgetAnnotations().filter(function(_ann) {
+            return _ann.getDuration() > 0 && _ann.getMedia().id == _this.media.id;
+        }),
         _scale = this.width / this.source.getDuration(),
         list_$ = this.$.find('.Ldt-Segments-List'),
         lines = [],