diff --git a/static/js/pandora/infoView.0xdb.js b/static/js/pandora/infoView.0xdb.js index a250134c5..5efdadb0f 100644 --- a/static/js/pandora/infoView.0xdb.js +++ b/static/js/pandora/infoView.0xdb.js @@ -270,8 +270,37 @@ pandora.ui.infoView = function(data) { ) .appendTo($text); - // fixme: episodeDirector seems to be always missing - if (data.episodeDirector || data.writer || data.producer || data.cinematographer || data.editor) { + // FIXME: we will want to check for data.seriesId here + if (isEditable && data.seriesTitle) { + var $div = $('
') + .css(Ox.extend(css, {marginTop: '20px'})) // FIXME: just a guess + .appendTo($text); + ['episodeDirector', 'seriesYear'].forEach(function(key, i) { + i && $('
').css({float: 'left'}).html('; ').appendTo($div); + $('
') + .css({float: 'left'}) + .html(formatKey(Ox.toUnderscores(key).replace(/_/g, ' ')).replace('', ' ')) + .appendTo($div); + Ox.Editable({ + clickLink: pandora.clickLink, + format: function(value) { + return formatValue(value.split(', '), key) + }, + placeholder: formatLight('unknown'), + tooltip: 'Doubleclick to edit', + value: key == 'episodeDirector' + ? (data[key] ? data[key].join(', ') : ['']) + : data[key] || '' + }) + .css({float: 'left'}) + .bindEvent({ + submit: function(event) { + editMetadata(key, event.value); + } + }) + .appendTo($div); + }); + } else if (data.episodeDirector || data.writer || data.producer || data.cinematographer || data.editor) { $div = $('
') .css(css) .appendTo($text);