forked from 0x2620/pandora
fix editing encyclopedia, wiki entries
This commit is contained in:
parent
79cafbc0d4
commit
d00b72d9eb
1 changed files with 11 additions and 4 deletions
|
@ -464,8 +464,6 @@ pandora.ui.infoView = function(data) {
|
||||||
}) : [];
|
}) : [];
|
||||||
data[key] = edit[key];
|
data[key] = edit[key];
|
||||||
$alternativeTitles.html(formatKey(key));
|
$alternativeTitles.html(formatKey(key));
|
||||||
} else if (key == 'encyclopedia') {
|
|
||||||
edit[key] = ['Index', 'Summary'].indexOf(value) > -1 ? value : '';
|
|
||||||
} else if (key == 'year') {
|
} else if (key == 'year') {
|
||||||
edit[key] = value ? parseInt(value) : '';
|
edit[key] = value ? parseInt(value) : '';
|
||||||
} else if (key == 'runtime') {
|
} else if (key == 'runtime') {
|
||||||
|
@ -587,8 +585,8 @@ pandora.ui.infoView = function(data) {
|
||||||
+ (value == 'Summary' ? '240' : '570') + '">'
|
+ (value == 'Summary' ? '240' : '570') + '">'
|
||||||
+ value + '</a>';
|
+ value + '</a>';
|
||||||
} else if (key == 'wiki') {
|
} else if (key == 'wiki') {
|
||||||
ret = '<a href="' + data.wiki + '">'
|
ret = '<a href="' + value + '">'
|
||||||
+ Ox.decodeURI(data.wiki.split('wiki/').pop()) + '</a>';
|
+ Ox.decodeURI(value.split('wiki/').pop()) + '</a>';
|
||||||
} else {
|
} else {
|
||||||
ret = value;
|
ret = value;
|
||||||
}
|
}
|
||||||
|
@ -910,6 +908,15 @@ pandora.ui.infoView = function(data) {
|
||||||
key == 'runtime' && $minutes.show();
|
key == 'runtime' && $minutes.show();
|
||||||
},
|
},
|
||||||
submit: function(data) {
|
submit: function(data) {
|
||||||
|
if (key == 'encyclopedia') {
|
||||||
|
data.value = ['Index', 'Summary'].indexOf(data.value) > -1
|
||||||
|
? data.value
|
||||||
|
: '';
|
||||||
|
this.options({
|
||||||
|
value: data.value
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
editMetadata(key, data.value);
|
editMetadata(key, data.value);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue