fix display of icon infos

This commit is contained in:
rlx 2016-01-14 12:48:41 +05:30
parent 9b95bb067e
commit 9a6c79842a
2 changed files with 12 additions and 8 deletions

View File

@ -17,10 +17,13 @@ oml.ui.browser = function() {
width = Math.round(ratio >= 1 ? size : size * ratio),
height = Math.round(ratio <= 1 ? size : size / ratio),
sortKey = sort[0].key,
info = Ox.getObjectById(oml.config.sortKeys, sortKey).format(
Ox.contains(['title', 'random'], sortKey)
? (data.author || '') : data[sortKey]
);
info = Ox.isNull(data[sortKey])
? ''
: Ox.contains(['title', 'random'], sortKey)
? (data.author || []).join(', ')
: Ox.getObjectById(
oml.config.sortKeys, sortKey
).format(data[sortKey]);
size = size || 64;
return {
extra: ui.showIconInfo ? $('<div>')

View File

@ -18,10 +18,11 @@ oml.ui.gridView = function() {
sortKey = sort[0].key,
info = Ox.isNull(data[sortKey])
? ''
: Ox.getObjectById(oml.config.sortKeys, sortKey).format(
Ox.contains(['title', 'random'], sortKey)
? (data.author || '') : data[sortKey]
);
: Ox.contains(['title', 'random'], sortKey)
? (data.author || []).join(', ')
: Ox.getObjectById(
oml.config.sortKeys, sortKey
).format(data[sortKey]);
size = size || 128;
return {
extra: ui.showIconInfo ? $('<div>')