add preview on info page

This commit is contained in:
j 2019-06-06 18:13:16 +01:00
parent 90aa328706
commit e15c042a79

View file

@ -269,6 +269,21 @@ pandora.ui.documentInfoView = function(data, isMixed) {
.appendTo($text);
}
// Preview
if (data.extension == 'pdf') {
var $div = $('<div>').css({
marginTop: '12px',
}).html(
Ox.range(1, data.dimensions + 1).map(function(page) {
return '<a href="/document/'
+ data.id + '/' + page
+ '"><img src="/documents/'+ data.id + '/128p'+ page + '.jpg"></a>'
}).join('\n')
)
pandora.createLinks($div);
$div.appendTo($text)
}
// Referenced --------------------------------------------------------------
if (
!isMultiple && (