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({
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);
}