diff --git a/templates/web/common/HTML5Video.html.twig b/templates/web/common/HTML5Video.html.twig
index 29dfaf492d..8cd9193793 100644
--- a/templates/web/common/HTML5Video.html.twig
+++ b/templates/web/common/HTML5Video.html.twig
@@ -34,9 +34,10 @@
_V_("{{ unique_id }}", {}, function(){
var player = this;
- $('#{{ unique_id }}').parent().bind('resize-video-js', function(){
- player.width($(this).width());
- player.height($(this).height());
+ $('#{{ unique_id }}').bind('resize-video-js', function(){
+ var parent = $(this).parent();
+ player.width(parent.width());
+ player.height(parent.height());
});
$('#{{ unique_id }}').bind('unload-video-js', function(){
diff --git a/templates/web/lightbox/index.twig b/templates/web/lightbox/index.twig
index 35568a3cac..9635eec4d1 100644
--- a/templates/web/lightbox/index.twig
+++ b/templates/web/lightbox/index.twig
@@ -11,6 +11,7 @@
{% block stylesheet %}
+
{% endblock %}
{% block icon %}
diff --git a/templates/web/lightbox/validate.twig b/templates/web/lightbox/validate.twig
index 2a4a142a3b..728b42d685 100644
--- a/templates/web/lightbox/validate.twig
+++ b/templates/web/lightbox/validate.twig
@@ -13,7 +13,8 @@
{% block stylesheet %}
- {% endblock %}
+
+{% endblock %}
diff --git a/www/include/jquery.p4.preview.js b/www/include/jquery.p4.preview.js
index b43d1a64aa..5551edd8e0 100644
--- a/www/include/jquery.p4.preview.js
+++ b/www/include/jquery.p4.preview.js
@@ -498,7 +498,7 @@ function setPreview(){
top: t,
left: l
}).attr('width',w).attr('height',h);
- $('#PREVIEWIMGCONT .record').trigger('resize-video-js');
+ $('#PREVIEWIMGCONT .videoTips.video-js').trigger('resize-video-js');
}
function classicMode(){
diff --git a/www/skins/lightbox/jquery.lightbox.js b/www/skins/lightbox/jquery.lightbox.js
index c3ed51e9f9..a6c431ade7 100644
--- a/www/skins/lightbox/jquery.lightbox.js
+++ b/www/skins/lightbox/jquery.lightbox.js
@@ -363,6 +363,8 @@ function scid_click(event, el)
.empty()
.append(data.options_html);
+ $('.videoTips.video-js', $('.container', container)).trigger('unload-video-js');
+
$('.container', container).empty()
.append(data.preview+data.selector_html+data.note_html);
@@ -1017,7 +1019,14 @@ function set_image_position(smooth, image, width, height, container, callback)
}
if(typeof callback == 'undefined')
{
- callback = function(){};
+ callback = function(){
+ $('.videoTips.video-js', $(image).closest('.container')).trigger('resize-video-js');
+ };
+ } else {
+ callback = function(){
+ $('.videoTips.video-js', $(image).closest('.container')).trigger('resize-video-js');
+ callback();
+ };
}
dimensions.width = width;
@@ -1030,7 +1039,7 @@ function set_image_position(smooth, image, width, height, container, callback)
else
{
$(image).css(dimensions);
- callback;
+ callback();
}
}