--- a/.hgtags Wed Jun 26 18:21:15 2013 +0200
+++ b/.hgtags Wed Jun 26 18:21:38 2013 +0200
@@ -13,3 +13,6 @@
cd94965a1a01544fbf543a4c92136f7e132d8748 V00.01.08
dacce50303f556f66d53150ddc2275171643ab60 V00.01.09
2b65085d0ed02e32a2eedf706fbaeacf472b871a V00.01.10
+1fb6cb2267403cd3214cd4dea2dc4a0630e878c9 V00.01.11
+1a7e20e5716da6c22a6bb8211ccd5384c48cdeb6 V00.01.12
+d52ab8fb2ae7ebcaef9b41cef1c7cf725e21c8a8 V00.01.13
--- a/src/metadatacomposer/__init__.py Wed Jun 26 18:21:15 2013 +0200
+++ b/src/metadatacomposer/__init__.py Wed Jun 26 18:21:38 2013 +0200
@@ -1,4 +1,4 @@
-VERSION = (0, 1, 10, "final", 0)
+VERSION = (0, 1, 13, "final", 0)
def get_version():
--- a/src/metadatacomposer/static/metadatacomposer/css/styles_player.css Wed Jun 26 18:21:15 2013 +0200
+++ b/src/metadatacomposer/static/metadatacomposer/css/styles_player.css Wed Jun 26 18:21:38 2013 +0200
@@ -85,6 +85,22 @@
background: #000000; font-family: 'OpenSans'; font-weight: 400;
}
+::-webkit-scrollbar {
+ width: 10px;
+}
+
+::-webkit-scrollbar:hover {
+ background: rgba(128,128,128,.2);
+}
+
+::-webkit-scrollbar-thumb {
+ background: rgba(128,128,128,.4); width: 10px; border-radius: 10px;
+}
+
+::-webkit-scrollbar-thumb:hover {
+ background: rgba(128,128,128,.6);
+}
+
/* Top Bar */
.top-bar {
@@ -320,7 +336,7 @@
}
.annotation {
- position: absolute;
+ position: absolute; left: 50%;
}
.annotation-title {
@@ -332,7 +348,7 @@
}
.annotation {
- left: 45px; top: 800px; right: 35px;
+ top: 800px; width: 920px; margin-left: -455px;
transition: top 0.5s; -webkit-transition: top 0.5s;
}
@@ -343,13 +359,13 @@
/* Narrow annotations */
.narrow-annotation {
- left: 210px; right: 200px;
+ width: 590px; margin-left: -290px;
}
/* White annotations */
.white-annotation {
- background: #ffffff; max-height: 522px; overflow: auto;
+ background: #ffffff;
}
.white-annotation {
@@ -365,7 +381,7 @@
}
.white-annotation .annotation-title {
- font-size: 23px; margin: 24px 0;
+ font-size: 23px; margin: 24px; line-height: 24px;
}
/* Black annotations */
@@ -393,10 +409,13 @@
/* Text annotation */
-.text-contents {
+.text-contents, .link-contents {
font-family: Georgia, 'Times New Roman', serif;
- margin: 0 45px 35px; font-size: 15px;
+ overflow: auto;
+}
+.text-contents {
+ margin: 0 25px 35px; font-size: 15px; padding: 0 20px 0;
}
.text-contents p, .text-contents ul, .text-contents ol {
@@ -413,12 +432,6 @@
float: left; margin: 0 5px 2px 0;
}
-.column-group {
- column-count: 2; column-gap: 60px;
- -moz-column-count: 2; -moz-column-gap: 60px;
- -webkit-column-count: 2; -webkit-column-gap: 60px;
-}
-
.text-contents h2 {
font-size: 21px;
}
@@ -459,7 +472,7 @@
.link-contents {
font-family: Georgia, 'Times New Roman', serif;
- margin: 40px 80px 80px;
+ margin: 40px 60px 60px; padding: 0 20px 0;
}
.link-contents p {
--- a/src/metadatacomposer/static/metadatacomposer/js/edition.js Wed Jun 26 18:21:15 2013 +0200
+++ b/src/metadatacomposer/static/metadatacomposer/js/edition.js Wed Jun 26 18:21:38 2013 +0200
@@ -239,6 +239,7 @@
});
+
/* Chapter */
//edit
@@ -857,10 +858,12 @@
var tplDiapo = getTemplate('#tpl-slideshow-row');
dataView.limitLength = function(){
return function(text, render) {
- if(render(text).length > lengthStringDiapo){
- return render(text).substr(0,lengthStringDiapo) + '...';
+
+ var renderText = nl2br(render(text));
+ if(renderText.length > lengthStringDiapo){
+ return renderText.substr(0,lengthStringDiapo) + '...';
}else{
- return render(text);
+ return renderText;
}
}
}
@@ -879,10 +882,12 @@
html = currentAnnotation.content.images[index][name];
input.val(html);
$(this).find('span').replaceWith(input);
- input.focus().keypress(function(e){
- code = (e.keyCode ? e.keyCode : e.which);
- if (code == 13) $(this).blur();
- });
+ if(name == 'title'){
+ input.focus().keypress(function(e){
+ code = (e.keyCode ? e.keyCode : e.which);
+ if (code == 13) $(this).blur();
+ });
+ }
});
$(document).on('blur', '.title-slideshow-row input, .description-slideshow-row textarea', function(){
@@ -893,6 +898,7 @@
if(newValue.length>lengthStringDiapo){
newValue = newValue.substr(0,lengthStringDiapo) + '...';
}
+ newValue = nl2br(newValue, true)
var span = $('<span>').html(newValue);
$(this).replaceWith(span);
@@ -1347,6 +1353,11 @@
/* Utilitys */
+function nl2br (str) {
+ var breakTag = '<br />';
+ return (str + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1'+ breakTag +'$2');
+}
+
Array.prototype.move = function (old_index, new_index) {
if (new_index >= this.length) {
var k = new_index - this.length;
--- a/src/metadatacomposer/static/metadatacomposer/js/player.js Wed Jun 26 18:21:15 2013 +0200
+++ b/src/metadatacomposer/static/metadatacomposer/js/player.js Wed Jun 26 18:21:38 2013 +0200
@@ -28,9 +28,20 @@
}
}
);
+
+ function preventRightClick(selector) {
+ selector.on("contextmenu", function() {
+ return false;
+ });
+ }
+
+ preventRightClick($(".video-container video"));
+
+ $(".media-duration").text(myMedia.duration);
myMedia.on("timeupdate", function(t) {
var pos = (100 * t / myMedia.duration) + "%";
+ $(".media-position").text(t);
$(".progress-indicator").css("left",pos);
$(".elapsed").css("width", pos);
});
@@ -326,6 +337,7 @@
}).join("")
);
imgel.fadeTo(400, 1);
+ preventRightClick(imgel);
}
var nextImage = function() {
@@ -449,7 +461,7 @@
positionDiv();
}
});
- return;
+ break;
}
if (/^(https?:\/\/)?(www\.)?dailymotion/.test(src)) {
@@ -467,7 +479,7 @@
positionDiv();
}
});
- return;
+ break;
}
if (/^(https?:\/\/)?(www\.)?soundcloud\.com/.test(src)) {
@@ -487,7 +499,7 @@
positionDiv();
}
});
- return;
+ break;
}
var extension = (src.match(/\.([\d\w]+)$/) || ["",""])[1],
@@ -511,8 +523,9 @@
positionDiv();
});
+ preventRightClick(media);
+
annotationDiv.find(".media-frame").html(media);
- return;
break;
@@ -523,26 +536,6 @@
switch (annotationinfo.annotation.content.markup) {
case "html":
annotationDiv.find(".text-contents").html(text);
-
- var ps = annotationDiv.find(".text-contents>p"),
- groups = [],
- last, group;
- ps.each(function(i, e) {
- if (last && group && last.nextElementSibling === e) {
- group.contents.push(e);
- } else {
- group = {
- master: e,
- contents: [e.cloneNode(true)]
- }
- groups.push(group);
- }
- last = e;
- });
- groups.forEach(function(g) {
- $(g.master).replaceWith($('<div class="column-group">').append(g.contents));
- });
-
break;
default:
annotationDiv.find(".text-contents").html(
@@ -553,6 +546,9 @@
break;
}
annotationDiv.find(".text-contents a").attr("target","_blank");
+ annotationDiv.find(".text-contents").css({
+ "max-height": $(".main-video").height() - 140
+ });
break;
@@ -562,12 +558,14 @@
annotationDiv.find(".link-contents").html(
annotationinfo.annotation.content.links.map(linkTemplate).join("")
- );
+ ).css({
+ "max-height": $(".main-video").height() - 140
+ });
break;
}
- positionDiv(true);
+ positionDiv();
}
--- a/src/metadatacomposer/templates/partial/metadatacomposer_partial_player.html Wed Jun 26 18:21:15 2013 +0200
+++ b/src/metadatacomposer/templates/partial/metadatacomposer_partial_player.html Wed Jun 26 18:21:38 2013 +0200
@@ -49,7 +49,7 @@
<a href="#" class="close-annotation"></a>
{% include player_about %}
</div>
- <div class="annotation text-annotation white-annotation">
+ <div class="annotation text-annotation white-annotation narrow-annotation">
<a href="#" class="close-annotation"></a>
<h2 class="annotation-title"></h2>
<div class="text-contents"></div>