From 0c7fc829d12255d839867edd62325b8c04b0c820 Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 29 Sep 2012 09:45:45 +0200 Subject: [PATCH] display likes on info page --- static/js/pandora/infoView.0xdb.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/static/js/pandora/infoView.0xdb.js b/static/js/pandora/infoView.0xdb.js index cdbeeac8..319796a5 100644 --- a/static/js/pandora/infoView.0xdb.js +++ b/static/js/pandora/infoView.0xdb.js @@ -409,14 +409,15 @@ pandora.ui.infoView = function(data) { $div.html(html.join('; ')); } - if (data.rating || data.votes) { + if (data.rating || data.votes || data.likes) { $div = $('
') .css(css) .appendTo($text); html = []; - ['rating', 'votes'].forEach(function(key) { + ['rating', 'votes', 'likes'].forEach(function(key) { + var digits = key == 'rating' ? 0 : key == 'votes' ? 2 : 1; data[key] && html.push( - formatKey(key) + Ox.formatNumber(data[key], key == 'rating' ? 0 : 2) + '%' + formatKey(key) + Ox.formatNumber(data[key], digits) + '%' ); }); $div.html(html.join('; '));