From 3b401b7166ed3e97c074afca0302b59c7b370978 Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 12 Nov 2011 11:50:17 +0000 Subject: [PATCH] correct formatting of rating and votes --- pandora/0xdb.jsonc | 2 +- static/js/pandora/infoView.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora/0xdb.jsonc b/pandora/0xdb.jsonc index 1b454910..fa5e7056 100644 --- a/pandora/0xdb.jsonc +++ b/pandora/0xdb.jsonc @@ -275,7 +275,7 @@ "title": "Rating", "type": "float", "columnWidth": 60, - "format": {"type": "unit", "args": ["%", 2]} + "format": {"type": "unit", "args": ["%", 0]} }, { "id": "votes", diff --git a/static/js/pandora/infoView.js b/static/js/pandora/infoView.js index f84c74a5..3a6e0df9 100644 --- a/static/js/pandora/infoView.js +++ b/static/js/pandora/infoView.js @@ -379,7 +379,7 @@ pandora.ui.infoView = function(data) { html = []; ['rating', 'votes'].forEach(function(key) { data[key] && html.push( - formatKey(key) + Ox.formatNumber(data[key]) + formatKey(key) + Ox.formatNumber(data[key], key == 'rating' ? 0 : 2) ); }); $div.html(html.join('; '));