From c891601cf55dde9717db30035351e95152aa03b0 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 25 Jun 2013 14:14:44 +0200 Subject: [PATCH] fix links on pad.ma infopage --- static/js/pandora/infoView.padma.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/static/js/pandora/infoView.padma.js b/static/js/pandora/infoView.padma.js index 44014c1bf..c30f101ae 100644 --- a/static/js/pandora/infoView.padma.js +++ b/static/js/pandora/infoView.padma.js @@ -158,14 +158,7 @@ pandora.ui.infoView = function(data) { Ox.EditableContent({ clickLink: pandora.clickLink, format: function(value) { - // FIXME: what?? - return listKeys.indexOf(key) >= 0 - ? formatValue(value.split(', '), { - 'director': 'name', - 'cinematographer': 'name', - 'features': 'name', - }[key] || key) - : value; + return formatValue(value, key); }, placeholder: formatLight(Ox._('unknown')), editable: canEdit, @@ -475,9 +468,14 @@ pandora.ui.infoView = function(data) { ret = value ? Ox.formatDate(value, ['', '%Y', '%B %Y', '%B %e, %Y'][value.split('-').length] ) : ''; + } else if (listKeys.indexOf(key) > -1) { + ret = value.split(', '); } else { ret = value; } + if (nameKeys.indexOf(key) > -1) { + key = 'name'; + } return formatLink(ret, key); }