forked from 0x2620/pandora
fix #923 (in info view, make series title a link)
This commit is contained in:
parent
547601d7a3
commit
4daf115dad
1 changed files with 6 additions and 2 deletions
|
@ -151,6 +151,7 @@ pandora.ui.infoView = function(data) {
|
||||||
})
|
})
|
||||||
.append(
|
.append(
|
||||||
Ox.Editable({
|
Ox.Editable({
|
||||||
|
clickLink: pandora.clickLink,
|
||||||
editable: isEditable,
|
editable: isEditable,
|
||||||
format: function(value) {
|
format: function(value) {
|
||||||
return formatTitle(value);
|
return formatTitle(value);
|
||||||
|
@ -317,6 +318,7 @@ pandora.ui.infoView = function(data) {
|
||||||
.css(css)
|
.css(css)
|
||||||
.html(
|
.html(
|
||||||
formatKey('cast') + data.cast.map(function(value) {
|
formatKey('cast') + data.cast.map(function(value) {
|
||||||
|
// FIXME: 'uncredited' should be removed on the backend
|
||||||
value.character = value.character.replace('(uncredited)', '').trim();
|
value.character = value.character.replace('(uncredited)', '').trim();
|
||||||
return formatValue(value.actor, 'name')
|
return formatValue(value.actor, 'name')
|
||||||
+ (value.character ? ' '
|
+ (value.character ? ' '
|
||||||
|
@ -569,9 +571,11 @@ pandora.ui.infoView = function(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatTitle(title) {
|
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) {
|
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 + (
|
return title + (
|
||||||
data.internationalTitle && data.internationalTitle != title
|
data.internationalTitle && data.internationalTitle != title
|
||||||
|
|
Loading…
Reference in a new issue