fix info in item documents panel

This commit is contained in:
j 2020-09-13 11:06:22 +02:00
parent 5024a2ba0c
commit 945ac98dad

View file

@ -810,9 +810,8 @@ pandora.ui.documentsPanel = function(options) {
item: function(data, sort, size) { item: function(data, sort, size) {
var sortKey = sort[0].key, var sortKey = sort[0].key,
infoKey = sortKey == 'title' ? 'extension' : sortKey, infoKey = sortKey == 'title' ? 'extension' : sortKey,
info = ( key = Ox.getObjectById(pandora.site.documentKeys, infoKey),
Ox.getObjectById(pandora.site.documentKeys, infoKey).format || Ox.identity info = pandora.formatDocumentKey(key, data, size),
)(data[infoKey]),
size = size || 128; size = size || 128;
return { return {
height: Math.round(data.ratio > 1 ? size / data.ratio : size), height: Math.round(data.ratio > 1 ? size / data.ratio : size),