diff -r 839efd6eddf1 -r 679809037606 integration/js/editor.js --- a/integration/js/editor.js Wed Dec 05 15:39:12 2012 +0100 +++ b/integration/js/editor.js Thu Dec 06 12:38:34 2012 +0100 @@ -19,8 +19,8 @@ segmenttemplate = _.template( '
  • ' + '<%= annotation.getMedia().title %>' - + '
    • <%= annotation.status_messages.join("
    • ") %>

    <%= annotation.getMedia().title %>

    ' - + '

    <%= annotation.title %>

    <%= annotation.begin.toString() %> - <%= annotation.end.toString() %> (<%= annotation.getDuration().toString() %>)

    ' + + '
    • <%= annotation.status_messages.join("
    • ") %>

    <%= annotation.title %>

    ' + + '

    <%= annotation.getMedia().title %>

    <%= annotation.begin.toString() %> - <%= annotation.end.toString() %> (<%= annotation.getDuration().toString() %>)

    ' + '
  • ' ), @@ -28,7 +28,9 @@ '
    ' + '
    ' + '
    ' - + '

    <%= annotation.title %>

    <%= gettext("Clone segment") %>' + + '

    <%= annotation.title %>

    ' + + '

    <%= annotation.description %>

    <% if (annotation.keywords.length) { console.log(annotation.keywords); print("

    " + gettext("Tags:") + " " + annotation.keywords.join(", ") + "

    "); } %>' + + '<%= gettext("Clone segment") %>' + '

    <%= gettext("From:") %> <%= annotation.begin.toString() %> <%= gettext("to:") %> <%= annotation.end.toString() %> (<%= gettext("duration:") %> <%= annotation.getDuration().toString() %>)

    ' + '
    ' ), @@ -38,7 +40,9 @@ mediafoundtemplate = _.template( '
    ' + '
    ' - + '

    <%= title %>

    <%= gettext("Clone segment") %>' + + '

    <%= title %>

    ' + + '

    <%= description %>

    <% if (tags) { print("

    " + gettext("Tags:") + " " + tags + "

    "); } %>' + + '<%= gettext("Clone segment") %>' + '
    ' ), mediafoundlisttemplate = _.template( @@ -150,6 +154,9 @@ $(".col-left input").on("keyup change input paste", function() { var val = $(this).val(); + if (val.length < 2) { + val = false; + } if (val) { var find = IriSP.Model.regexpFromTextOrArray(val, true), replace = IriSP.Model.regexpFromTextOrArray(val, false); @@ -169,7 +176,7 @@ var annotations = apimedia.getAnnotations().searchByTextFields(val); } else { var annotations = []; - } + } var found = find.test(media.title) || find.test(media.description) || annotations.length; if (found) { li.find(".title-video").html(media.title.replace(replace, '$1')); @@ -197,6 +204,8 @@ top: 8 * line.index, color: IriSP.vizcolors[i % IriSP.vizcolors.length], title: _a.title.replace(replace, '$1'), + description: _a.description.replace(replace, '$1'), + tags: _a.keywords.join(", ").replace(replace, '$1'), popleft : corrpos, pointerpos : (pos - corrpos), } @@ -226,7 +235,7 @@ } }); if (critical) { - messages.push("One or more segments are invalid"); + messages.push(gettext("One or more segments are invalid")); } _(mashupcritical).each(function(sc) { @@ -243,7 +252,7 @@ }); mashup.status = critical ? "critical" : (warning ? "warning" : "valid"); if (!messages.length) { - messages.push("Your hashcut is valid!"); + messages.push(gettext("Your hashcut is valid!")); } mashupstatus = ' - ' + _(messages).join('\n - '); @@ -348,7 +357,7 @@ }); currentSegment.status = critical ? "critical" : (warning ? "warning" : "valid"); if (!messages.length) { - messages.push("This segment is valid!") + messages.push(gettext("This segment is valid!")) } currentSegment.status_messages = _(messages);