From 4daf115dad94d2abdac33555357dafe1e4ce2f46 Mon Sep 17 00:00:00 2001 From: rolux Date: Tue, 25 Sep 2012 10:52:33 +0000 Subject: [PATCH] fix #923 (in info view, make series title a link) --- static/js/pandora/infoView.0xdb.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/static/js/pandora/infoView.0xdb.js b/static/js/pandora/infoView.0xdb.js index be29eac5..cdbeeac8 100644 --- a/static/js/pandora/infoView.0xdb.js +++ b/static/js/pandora/infoView.0xdb.js @@ -151,6 +151,7 @@ pandora.ui.infoView = function(data) { }) .append( Ox.Editable({ + clickLink: pandora.clickLink, editable: isEditable, format: function(value) { return formatTitle(value); @@ -317,6 +318,7 @@ pandora.ui.infoView = function(data) { .css(css) .html( formatKey('cast') + data.cast.map(function(value) { + // FIXME: 'uncredited' should be removed on the backend value.character = value.character.replace('(uncredited)', '').trim(); return formatValue(value.actor, 'name') + (value.character ? ' ' @@ -569,9 +571,11 @@ pandora.ui.infoView = function(data) { } function formatTitle(title) { - var match = /(\(S\d{2}E\d{2}\))/.exec(title); + var match = /(.+) (\(S\d{2}E\d{2}\))/.exec(title); if (match) { - title = title.replace(match[0], formatLight(match[0])); + title = formatValue(match[1], 'title') + ' ' + + formatLight(match[2]) + + title.substr(match[0].length); } return title + ( data.internationalTitle && data.internationalTitle != title