update display strings change formatting of votes and likes, as per ticket 1061
This commit is contained in:
parent
d7026cc5dc
commit
3e047e44b3
2 changed files with 7 additions and 7 deletions
|
@ -330,15 +330,15 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "votes",
|
"id": "votes",
|
||||||
"title": "Votes",
|
"title": "Mainstream Score",
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"columnWidth": 60,
|
"columnWidth": 60,
|
||||||
"format": {"type": "unit", "args": ["%", 2]},
|
"format": {"type": "unit", "args": ["%", 1]},
|
||||||
"sort": true
|
"sort": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "likes",
|
"id": "likes",
|
||||||
"title": "Likes",
|
"title": "Arthouse Score",
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"columnWidth": 60,
|
"columnWidth": 60,
|
||||||
"format": {"type": "unit", "args": ["%", 1]},
|
"format": {"type": "unit", "args": ["%", 1]},
|
||||||
|
|
|
@ -441,15 +441,15 @@ pandora.ui.infoView = function(data) {
|
||||||
$div.html(html.join('; '));
|
$div.html(html.join('; '));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.rating || data.votes || data.likes) {
|
if (data.votes || data.likes) {
|
||||||
$div = $('<div>')
|
$div = $('<div>')
|
||||||
.css(css)
|
.css(css)
|
||||||
.appendTo($text);
|
.appendTo($text);
|
||||||
html = [];
|
html = [];
|
||||||
['rating', 'votes', 'likes'].forEach(function(key) {
|
['votes', 'likes'].forEach(function(key) {
|
||||||
var digits = key == 'rating' ? 0 : key == 'votes' ? 2 : 1;
|
|
||||||
data[key] && html.push(
|
data[key] && html.push(
|
||||||
formatKey(key) + Ox.formatNumber(data[key], digits) + '%'
|
formatKey(key == 'votes' ? 'Mainstream Score' : 'Arthouse Score')
|
||||||
|
+ Ox.formatNumber(data[key], 1) + '%'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
$div.html(html.join('; '));
|
$div.html(html.join('; '));
|
||||||
|
|
Loading…
Reference in a new issue