From 3e047e44b3d5ba11b41a74070341983a52507c9c Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 4 Oct 2012 11:42:33 +0200 Subject: [PATCH] update display strings change formatting of votes and likes, as per ticket 1061 --- pandora/config.0xdb.jsonc | 6 +++--- static/js/pandora/infoView.0xdb.js | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pandora/config.0xdb.jsonc b/pandora/config.0xdb.jsonc index 7406febf..837f0e62 100644 --- a/pandora/config.0xdb.jsonc +++ b/pandora/config.0xdb.jsonc @@ -330,15 +330,15 @@ }, { "id": "votes", - "title": "Votes", + "title": "Mainstream Score", "type": "float", "columnWidth": 60, - "format": {"type": "unit", "args": ["%", 2]}, + "format": {"type": "unit", "args": ["%", 1]}, "sort": true }, { "id": "likes", - "title": "Likes", + "title": "Arthouse Score", "type": "float", "columnWidth": 60, "format": {"type": "unit", "args": ["%", 1]}, diff --git a/static/js/pandora/infoView.0xdb.js b/static/js/pandora/infoView.0xdb.js index ba8b28c9..19cdbf3a 100644 --- a/static/js/pandora/infoView.0xdb.js +++ b/static/js/pandora/infoView.0xdb.js @@ -441,15 +441,15 @@ pandora.ui.infoView = function(data) { $div.html(html.join('; ')); } - if (data.rating || data.votes || data.likes) { + if (data.votes || data.likes) { $div = $('
') .css(css) .appendTo($text); html = []; - ['rating', 'votes', 'likes'].forEach(function(key) { - var digits = key == 'rating' ? 0 : key == 'votes' ? 2 : 1; + ['votes', 'likes'].forEach(function(key) { 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('; '));