image preview
This commit is contained in:
parent
97364e4ee7
commit
5bc039e965
1 changed files with 6 additions and 3 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue