# HG changeset patch # User veltr # Date 1354793914 -3600 # Node ID 6798090376067fda72365923279d864cafe8574b # Parent 839efd6eddf106a88ad6e08b2cf7b351a05ef1b3 Changes in video handling, displayed metadata and search results diff -r 839efd6eddf1 -r 679809037606 integration/css/common.css --- a/integration/css/common.css Wed Dec 05 15:39:12 2012 +0100 +++ b/integration/css/common.css Thu Dec 06 12:38:34 2012 +0100 @@ -477,11 +477,16 @@ .item-video .video-info{ margin-left: 88px; } -.item-video .title-video{ +.item-video h3 { font-size: 13px; font-weight: 600; + margin-bottom: 1px; +} +.item-video .title-video{ color: #30036d; - margin-bottom: 1px; +} +.segment-title { + color: #de2500; } .item-video .description{ font-size: 11px; @@ -515,14 +520,12 @@ border: 1px solid #C81000; text-shadow: 1px 1px 1px #330000; } -.item-video .subtitle{ +.item-video p { margin-bottom: 2px; - color: #de2500; - font-size: 11px; + font-size: 12px; } .item-video .duration{ color: #7628df; - font-size: 12px; font-weight: 600; } /* frise */ @@ -980,7 +983,7 @@ -webkit-box-shadow: inset 1px 1px 1px #808080; box-shadow: inset 1px 1px 1px #808080; } -.active .media-segment-section, +.media-segment.active .media-segment-section, .media-segment:hover .media-segment-section, .list-video .frise-segment.active { -moz-box-shadow: inset 0 0 2px 2px #fc00ff, 0 0 2px #fc00ff; @@ -989,13 +992,16 @@ } .media-segment-popin h3, .media-found-popin h3{ padding: 0; - color: #de2500; margin-bottom: 4px; font-weight: 600; } -.media-segment-popin p{ - font-size: 12px; +.media-segment-popin p, .media-found-popin p { + font-size: 12px; margin: 4px 0; line-height: 13px; +} + +.media-segment-popin strong, .media-found-popin strong{ + font-weight: 600; } .media-segment-popin span{ diff -r 839efd6eddf1 -r 679809037606 integration/css/edition.css --- a/integration/css/edition.css Wed Dec 05 15:39:12 2012 +0100 +++ b/integration/css/edition.css Thu Dec 06 12:38:34 2012 +0100 @@ -187,11 +187,6 @@ display: none; } -.media-segment-popin p{ - margin-right: 155px; - font-size: 12px; -} - .media-found-segments { clear: both; padding-top: 5px; } diff -r 839efd6eddf1 -r 679809037606 integration/edition.html --- a/integration/edition.html Wed Dec 05 15:39:12 2012 +0100 +++ b/integration/edition.html Thu Dec 06 12:38:34 2012 +0100 @@ -353,12 +353,21 @@ IriSP.endpoints = { content: "/pf/ldtplatform/api/ldt/1.0/contents/", + //content: "data/bpidata2.json", project: "/pf/ldtplatform/api/ldt/1.0/projects/", segment: "/pf/ldtplatform/api/ldt/1.0/segments/", ldt: "http://capsicum//pf/ldtplatform/ldt/cljson/id/__PROJECT_ID__", hashcut_page: "hashcut.html?project=__PROJECT_ID__" }; + IriSP.video_url_transform = function(oldurl) { + var newurl = oldurl.replace(/mp4:/i,''); + newurl = newurl.replace(/ddc_player\//i,''); + newurl = newurl.replace(/rtmp/i,'http'); + newurl = newurl.replace('media.iri.centrepompidou.fr','ftv.iri-research.org') + return newurl; + }; + $(function() { var hashcut = IriSP.editor({ csrf_token: "{{csrf_token}}", 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); diff -r 839efd6eddf1 -r 679809037606 integration/js/mashupcore.js --- a/integration/js/mashupcore.js Wed Dec 05 15:39:12 2012 +0100 +++ b/integration/js/mashupcore.js Thu Dec 06 12:38:34 2012 +0100 @@ -310,18 +310,26 @@ videoEl = $('