add studio, use pandora.site.itemKeys for key titles

This commit is contained in:
j 2013-02-26 04:55:04 +00:00
parent 7b0764e74c
commit 8cbfff0ace

View file

@ -142,7 +142,7 @@ pandora.ui.infoView = function(data) {
$browserImages = [], $browserImages = [],
nameKeys = ['actor', 'director', 'writer', 'producer', 'cinematographer', 'editor'], nameKeys = ['actor', 'director', 'writer', 'producer', 'cinematographer', 'editor'],
listKeys = ['country', 'language', 'genre', 'keyword'] + nameKeys; listKeys = ['country', 'language', 'genre', 'keyword', 'productionCompany'] + nameKeys;
//pandora.createLinks($text); // FIXME: this is wrong for editables that already have clickLink //pandora.createLinks($text); // FIXME: this is wrong for editables that already have clickLink
@ -224,7 +224,7 @@ pandora.ui.infoView = function(data) {
$div && $div $div && $div
.appendTo($text); .appendTo($text);
$div = getBlock(['writer', 'producer', 'cinematographer', 'editor']) $div = getBlock(['writer', 'producer', 'cinematographer', 'editor', 'productionCompany'])
$div && $div.appendTo($text); $div && $div.appendTo($text);
$div = getBlock(['actor']) $div = getBlock(['actor'])
@ -511,11 +511,11 @@ pandora.ui.infoView = function(data) {
} }
function formatKey(key, isStatistics) { function formatKey(key, isStatistics) {
var item = Ox.getObjectById(pandora.site.itemKeys, key);
key = item ? item.title : key;
if (key == 'alternativeTitles') { if (key == 'alternativeTitles') {
key = 'Alternative Title' + (data.alternativeTitles && data.alternativeTitles.length == 1 ? '' : 's'); key = 'Alternative Title' + (data.alternativeTitles && data.alternativeTitles.length == 1 ? '' : 's');
} else if (key == 'actor') { } else if (key == 'IMDb') {
key = 'Actors';
} else if (key == 'imdbId') {
key = 'IMDb ID'; key = 'IMDb ID';
} }
return isStatistics return isStatistics