use placeholder

This commit is contained in:
rlx 2018-09-12 20:16:48 +02:00
parent 68cc64728b
commit 5fcb69331c

View file

@ -584,9 +584,7 @@ pandora.ui.infoView = function(data) {
function formatValue(key, value) { function formatValue(key, value) {
var ret; var ret;
if (key == 'originalTitle') { if (key == 'year') {
ret = value || data.title;
} else if (key == 'year') {
ret = formatLink(value, 'year'); ret = formatLink(value, 'year');
} else if (['releasedate', 'dateofcensorcertificate'].indexOf(key) > -1) { } else if (['releasedate', 'dateofcensorcertificate'].indexOf(key) > -1) {
ret = value ? Ox.formatDate(value, ret = value ? Ox.formatDate(value,
@ -795,7 +793,11 @@ pandora.ui.infoView = function(data) {
format: function(value) { format: function(value) {
return formatValue(key, value); return formatValue(key, value);
}, },
placeholder: formatLight(Ox._('unknown')), placeholder: formatLight(
key == 'originalTitle'
? data.title
: Ox._('unknown')
),
tooltip: canEdit ? pandora.getEditTooltip() : '', tooltip: canEdit ? pandora.getEditTooltip() : '',
value: getValue(key, data[key]) value: getValue(key, data[key])
}) })