Play icon on video files

This commit is contained in:
2019-07-01 19:52:25 +02:00
parent 5b2fc3f854
commit 07c328e244
5 changed files with 36 additions and 6 deletions

View File

@@ -85,7 +85,7 @@ function initPage(asHash) {
//Lightbox options
lightbox.option({
alwaysShowNavOnTouchDevices: true,
albumLabel: "Photo %1 sur %2",
albumLabel: "Média %1 sur %2",
fadeDuration: 300,
imageFadeDuration: 400,
resizeDuration: 600,
@@ -502,10 +502,17 @@ function getPost(asPost) {
);
break;
case 'media':
var sTakenOn = (asPost.taken_on == '0000-00-00 00:00:00')?'':' et prise le '+asPost.taken_on_formatted+self.tmp('site_tz_notice');
var $Image = $('<img>', {'src': asPost.thumb_path, title: 'Click pour zoomer'});
var bVideo = (asPost.subtype == 'video');
$Body = $('<a>', {href: asPost.pic_path, 'data-video': (bVideo?'true':'false'), 'data-lightbox': 'post-pictures', 'data-title': (bVideo?'Vidéo':'Photo')+' ajoutée le '+sAbsTime+sTakenOn, 'data-orientation': asPost.rotate}).append($Image);
var sTakenOn = (asPost.taken_on == '0000-00-00 00:00:00')?'':' et prise le '+asPost.taken_on_formatted+self.tmp('site_tz_notice');
var $Image = $('<img>', {'src': asPost.thumb_path, title: bVideo?'Click pour voir la vidéo':'Click pour zoomer'});
$Body = $('<a>', {
'class': (bVideo?'video':'picture'),
href: asPost.pic_path,
'data-video': (bVideo?'true':'false'),
'data-lightbox': 'post-pictures',
'data-title': (bVideo?'Vidéo':'Photo')+' ajoutée le '+sAbsTime+sTakenOn, 'data-orientation': asPost.rotate
}).append($Image);
break;
case 'post':
$Body = $('<div>')