Fix missing preview launcher in Videos Table

video-slicer-reencoder
Moe 2022-09-01 18:47:46 -07:00
parent 1529e1511d
commit 7354e13a13
3 changed files with 11 additions and 1 deletions

View File

@ -1082,6 +1082,7 @@
"Channel ID": "Channel ID",
"Recipient ID": "Recipient ID",
"New Authentication Token": "New Authentication Token",
"No Image": "No Image",
"All Logs": "All Logs",
"For Group": "For Group",
"Basic Authentication": "Basic Authentication",

View File

@ -938,6 +938,14 @@ $(document).ready(function(){
// })
.on('click','.pop-image',function(){
var imageSrc = $(this).attr('src')
if(!imageSrc){
new PNotify({
title: lang['Action Failed'],
text: lang['No Image'],
type: 'warning'
})
return;
};
popImage(imageSrc)
})
.on('click','.popped-image',function(){

View File

@ -34,7 +34,7 @@ $(document).ready(function(e){
const endDate = el.attr('data-end')
const imgBlock = el.find('.video-thumbnail-img-block')
const href = await getSnapshotFromVideoTimeFrame(monitorId,startDate,endDate)
imgBlock.html(`<img class="pop-image cursor-pointer" src="${href}">`)
imgBlock.find('img').attr('src',href)
})
}
function openVideosTableView(monitorId,startDate,endDate){
@ -161,6 +161,7 @@ $(document).ready(function(e){
return {
image: `<div class="video-thumbnail" data-mid="${file.mid}" data-ke="${file.ke}" data-time="${file.time}" data-end="${file.end}" data-filename="${file.filename}">
<div class="video-thumbnail-img-block">
<img class="pop-image cursor-pointer" src="${href}" style="min-width: 100px;min-height: 75px;">
</div>
<div class="video-thumbnail-buttons d-flex">
<a class="video-thumbnail-button-cell open-snapshot p-3">