image preview

This commit is contained in:
j 2019-12-05 14:38:52 +00:00
parent 97364e4ee7
commit 5bc039e965

View file

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