diff --git a/static/js/infoView.indiancinema.js b/static/js/infoView.indiancinema.js index 98cf75760..2dc6da0af 100644 --- a/static/js/infoView.indiancinema.js +++ b/static/js/infoView.indiancinema.js @@ -21,16 +21,19 @@ pandora.ui.infoView = function(data) { isCopyrighted = !data.year || parseInt(data.year) + 60 >= new Date().getFullYear(), listWidth = 0, margin = 16, - nameKeys = [ - 'director', 'producer', 'codirector', 'writer', 'cinematographer', - 'editor', 'composer', 'lyricist', 'actor' - ], - listKeys = nameKeys.concat([ - 'country', 'language', 'color', 'sound', 'genre', 'keyword', 'links' - ]), - posterKeys = ['title', 'director', 'year'], // these may contain commas, and are thus separated by semicolons specialListKeys = ['alternativeTitles', 'productionCompany'], + nameKeys = pandora.site.itemKeys.filter(function(key) { + return key.sortType == 'person'; + }).map(function(key) { + return key.id; + }), + listKeys = pandora.site.itemKeys.filter(function(key) { + return Ox.isArray(key.type) && !Ox.contains(specialListKeys, key.id); + }).map(function(key){ + return key.id; + }), + posterKeys = ['title', 'director', 'year'], descriptions = { names: getNames(), studios: getStudios() diff --git a/static/js/infoView.js b/static/js/infoView.js index 2843729bc..85875da2b 100644 --- a/static/js/infoView.js +++ b/static/js/infoView.js @@ -18,8 +18,16 @@ pandora.ui.infoView = function(data) { iconLeft = iconSize == 256 ? Math.floor((iconSize - iconWidth) / 2) : 0, borderRadius = ui.icons == 'posters' ? 0 : iconSize / 8, margin = 16, - nameKeys = ['director'], - listKeys = nameKeys.concat(['country', 'groups']), + nameKeys = pandora.site.itemKeys.filter(function(key) { + return key.sortType == 'person'; + }).map(function(key) { + return key.id; + }), + listKeys = pandora.site.itemKeys.filter(function(key) { + return Ox.isArray(key.type); + }).map(function(key){ + return key.id; + }), posterKeys = nameKeys.concat(['title', 'year']), statisticsWidth = 128, @@ -181,7 +189,7 @@ pandora.ui.infoView = function(data) { }); if (!canEdit) { - pandora.createLinks($info); + pandora.createLinks($info); } // Title ------------------------------------------------------------------- diff --git a/static/js/infoView.padma.js b/static/js/infoView.padma.js index 9438b09c3..d3f9f97e5 100644 --- a/static/js/infoView.padma.js +++ b/static/js/infoView.padma.js @@ -18,8 +18,16 @@ pandora.ui.infoView = function(data) { iconLeft = iconSize == 256 ? Math.floor((iconSize - iconWidth) / 2) : 0, borderRadius = ui.icons == 'posters' ? 0 : iconSize / 8, margin = 16, - nameKeys = ['director', 'cinematographer', 'featuring'], - listKeys = nameKeys.concat(['language', 'topic', 'license', 'groups']), + nameKeys = pandora.site.itemKeys.filter(function(key) { + return key.sortType == 'person'; + }).map(function(key) { + return key.id; + }), + listKeys = pandora.site.itemKeys.filter(function(key) { + return Ox.isArray(key.type); + }).map(function(key){ + return key.id; + }), posterKeys = ['title', 'date'], statisticsWidth = 128, @@ -203,7 +211,7 @@ pandora.ui.infoView = function(data) { }); if (!canEdit) { - pandora.createLinks($info); + pandora.createLinks($info); } // Source & Project --------------------------------------------------------