--- a/player/js/player.js Thu May 30 19:06:05 2013 +0200
+++ b/player/js/player.js Fri Jun 07 16:17:31 2013 +0200
@@ -272,15 +272,10 @@
annotationDiv.find(".annotation-title").text(annotationinfo.annotation.title);
- var positionDiv = function(anim) {
- var css = {
+ var positionDiv = function() {
+ annotationDiv.css({
top: Math.floor(($(".main-video").height() - annotationDiv.height())/2)+"px"
- };
- if (anim) {
- annotationDiv.animate(css, 800);
- } else {
- annotationDiv.css(css);
- }
+ });
}
switch (annotationinfo.type) {
@@ -299,7 +294,6 @@
var w = imgel.width(),
h = imgel.height();
annotationDiv.find(".annotation-main").css("height","");
- annotationDiv.find(".slideshow-description").css("margin-left",w);
var h2 = annotationDiv.find(".annotation-main").height();
if (h < h2) {
imgel.css("margin-top",Math.floor((h2-h)/2)+"px");
@@ -438,7 +432,7 @@
},
success: function(data) {
annotationDiv.find(".media-frame").html(data.html);
- positionDiv(true);
+ positionDiv();
}
});
return;
@@ -456,7 +450,7 @@
},
success: function(data) {
annotationDiv.find(".media-frame").html(data.html);
- positionDiv(true);
+ positionDiv();
}
});
return;
@@ -476,7 +470,7 @@
},
success: function(data) {
annotationDiv.find(".media-frame").html(data.html);
- positionDiv(true);
+ positionDiv();
}
});
return;
@@ -500,7 +494,7 @@
}));
media.on("loadedmetadata", function() {
- positionDiv(true);
+ positionDiv();
});
annotationDiv.find(".media-frame").html(media);
@@ -515,6 +509,26 @@
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(