From 966c6954b3a04cb900a7c6daa7cf876ab10dc5c8 Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 23 Dec 2012 03:33:20 +0100 Subject: [PATCH] fix #1187 (missing formatNumber in filter item count column) --- static/js/pandora/filter.js | 9 ++++++--- static/js/pandora/utils.js | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/static/js/pandora/filter.js b/static/js/pandora/filter.js index ddddb045..77c63c5b 100644 --- a/static/js/pandora/filter.js +++ b/static/js/pandora/filter.js @@ -35,7 +35,7 @@ pandora.ui.filter = function(id) { .addClass('flagname') .css({ float: 'left', - width: pandora.user.ui.filterSizes[i] - 64 - Ox.UI.SCROLLBAR_SIZE, + width: pandora.user.ui.filterSizes[i] - 68 - Ox.UI.SCROLLBAR_SIZE, textOverflow: 'ellipsis', overflowX: 'hidden' }) @@ -46,15 +46,18 @@ pandora.ui.filter = function(id) { operator: filter.type == 'string' ? '+' : '-', title: title, visible: true, - width: pandora.user.ui.filterSizes[i] - 40 - Ox.UI.SCROLLBAR_SIZE + width: pandora.user.ui.filterSizes[i] - 44 - Ox.UI.SCROLLBAR_SIZE }, { align: 'right', + format: function(value) { + return Ox.formatNumber(value); + }, id: 'items', operator: '-', title: '#', visible: true, - width: 40 + width: 44 } ], columnsVisible: true, diff --git a/static/js/pandora/utils.js b/static/js/pandora/utils.js index c545fd70..0af3b472 100644 --- a/static/js/pandora/utils.js +++ b/static/js/pandora/utils.js @@ -1084,9 +1084,9 @@ pandora.resizeFilters = function(width) { .size(0, pandora.user.ui.filterSizes[1]) .size(2, pandora.user.ui.filterSizes[3]); pandora.$ui.filters.forEach(function($list, i) { - $list.resizeColumn('name', pandora.user.ui.filterSizes[i] - 40 - Ox.UI.SCROLLBAR_SIZE); + $list.resizeColumn('name', pandora.user.ui.filterSizes[i] - 44 - Ox.UI.SCROLLBAR_SIZE); if (pandora.user.ui.showFlags) { - $list.find('.flagname').css({width: pandora.user.ui.filterSizes[i] - 64 - Ox.UI.SCROLLBAR_SIZE}) + $list.find('.flagname').css({width: pandora.user.ui.filterSizes[i] - 68 - Ox.UI.SCROLLBAR_SIZE}) } }); };