From ea52722d9f67a1965759dcf113a8bf5957346b47 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 29 Mar 2015 22:54:05 +0530 Subject: [PATCH] show date instead of undefined in results grid, fixes #2727 --- pandora/config.padma.jsonc | 2 +- static/js/list.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pandora/config.padma.jsonc b/pandora/config.padma.jsonc index 8d8c05a68..15b4e4d8e 100644 --- a/pandora/config.padma.jsonc +++ b/pandora/config.padma.jsonc @@ -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", diff --git a/static/js/list.js b/static/js/list.js index 47066458b..bb5cfa8f9 100644 --- a/static/js/list.js +++ b/static/js/list.js @@ -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])) {