show date instead of undefined in results grid, fixes #2727

This commit is contained in:
j 2015-03-29 22:54:05 +05:30
parent 772d1c7ea2
commit ea52722d9f
2 changed files with 4 additions and 2 deletions

View file

@ -548,7 +548,7 @@
"itemTitleKeys" list of itemKeys used to compose the title
via pandora.getItemTitle
*/
"itemTitleKeys": ["title", "director"],
"itemTitleKeys": ["title", "director", "date"],
/*
"itemViews" is an ordered list of available item views.
Implemented views are "info", "documents", "player", "editor",

View file

@ -131,7 +131,9 @@ pandora.ui.list = function() {
) + size + '.jpg?' + data.modified),
format, info, sortKey = sort[0].key;
if (['title', 'director', 'random'].indexOf(sortKey) > -1) {
info = data['year'];
info = data['year'] || data['date'] || '';
window.test = data;
console.log('SORT', sortKey, info, data);
} else {
format = pandora.getSortKeyData(sortKey).format;
if (Ox.isUndefined(data[sortKey]) || Ox.isNull(data[sortKey])) {