fix links on pad.ma infopage

This commit is contained in:
j 2013-06-25 14:14:44 +02:00
parent fc61bb8ef8
commit c891601cf5

View file

@ -158,14 +158,7 @@ pandora.ui.infoView = function(data) {
Ox.EditableContent({ Ox.EditableContent({
clickLink: pandora.clickLink, clickLink: pandora.clickLink,
format: function(value) { format: function(value) {
// FIXME: what?? return formatValue(value, key);
return listKeys.indexOf(key) >= 0
? formatValue(value.split(', '), {
'director': 'name',
'cinematographer': 'name',
'features': 'name',
}[key] || key)
: value;
}, },
placeholder: formatLight(Ox._('unknown')), placeholder: formatLight(Ox._('unknown')),
editable: canEdit, editable: canEdit,
@ -475,9 +468,14 @@ pandora.ui.infoView = function(data) {
ret = value ? Ox.formatDate(value, ret = value ? Ox.formatDate(value,
['', '%Y', '%B %Y', '%B %e, %Y'][value.split('-').length] ['', '%Y', '%B %Y', '%B %e, %Y'][value.split('-').length]
) : ''; ) : '';
} else if (listKeys.indexOf(key) > -1) {
ret = value.split(', ');
} else { } else {
ret = value; ret = value;
} }
if (nameKeys.indexOf(key) > -1) {
key = 'name';
}
return formatLink(ret, key); return formatLink(ret, key);
} }