# HG changeset patch # User raph # Date 1367849207 -7200 # Node ID 57f1d252b8f93b2ff8f182e8018787361e9c869b # Parent 3a2f9993c6cbd6b7a6cf81984fd6574376904bbd Corrections for Lanval diff -r 3a2f9993c6cb -r 57f1d252b8f9 integration/css/edition.css --- a/integration/css/edition.css Tue Jan 29 17:26:56 2013 +0100 +++ b/integration/css/edition.css Mon May 06 16:06:47 2013 +0200 @@ -206,12 +206,18 @@ } .media-found-popin { - top: 2px; width: 170px; display: none; + width: 170px; display: none; margin-left: -86px; } .media-found-popin .pointer { margin-left: 75px; + position: absolute; top: -15px; background: url(../img/inv-triangle.png); + width: 20px; height: 13px; +} + +.media-found-popin .popin-content { + position: absolute; bottom: 14px; } .reprendre-segment{ diff -r 3a2f9993c6cb -r 57f1d252b8f9 integration/js/editor.js --- a/integration/js/editor.js Tue Jan 29 17:26:56 2013 +0100 +++ b/integration/js/editor.js Mon May 06 16:06:47 2013 +0200 @@ -1,5 +1,12 @@ IriSP.editor = function(options) { + window.shortenText = function(text, minlength, maxlength) { + var min = (typeof minlength === "undefined" ? 100 : minlength), + max = (typeof maxlength === "undefined" ? min + 20 : maxlength), + rx = new RegExp("(^.{" + min + "," + max + "})[\s].+$"); + return text.replace(/[\n\r\s]+/mg,' ').replace(rx,'$1…'); + } + /* Load Media List */ var directory = new IriSP.Model.Directory(), @@ -13,7 +20,7 @@ mediatemplate = _.template( '
<%= description %>
' + + '<%= shortenText(description) %>
' + '<%= gettext("Duration:") %> <%= duration.toString() %>
<%= annotation.description %>
<% if (annotation.keywords.length) { print("" + gettext("Tags:") + " " + annotation.keywords.join(", ") + "
"); } %>' + + '<%= shortenText(annotation.description) %>
<% if (annotation.keywords.length) { print("" + gettext("Tags:") + " " + annotation.keywords.join(", ") + "
"); } %>' + '<%= gettext("Clone segment") %>' + '<%= gettext("From:") %> <%= annotation.begin.toString() %> <%= gettext("to:") %> <%= annotation.end.toString() %> (<%= gettext("duration:") %> <%= annotation.getDuration().toString() %>)
' + '<%= description %>
<% if (tags) { print("" + gettext("Tags:") + " " + tags + "
"); } %>' + '<%= gettext("Clone segment") %>' - + '<%= description %>
' + + '<%= shortenText(description) %>
' + '<%= gettext("Duration:") %> <%= duration.toString() %>
<%= annotation.description %>
<% if (annotation.keywords.length) { print("" + gettext("Tags:") + " " + annotation.keywords.join(", ") + "
"); } %>' + + '<%= shortenText(annotation.description) %>
<% if (annotation.keywords.length) { print("" + gettext("Tags:") + " " + annotation.keywords.join(", ") + "
"); } %>' + '<%= gettext("Clone segment") %>' + '<%= gettext("From:") %> <%= annotation.begin.toString() %> <%= gettext("to:") %> <%= annotation.end.toString() %> (<%= gettext("duration:") %> <%= annotation.getDuration().toString() %>)
' + '<%= description %>
<% if (tags) { print("" + gettext("Tags:") + " " + tags + "
"); } %>' + '<%= gettext("Clone segment") %>' - + '