fix a bug in statistics dialog

This commit is contained in:
rolux 2012-10-27 19:34:22 +02:00
parent 0ee64f9186
commit 11f746f3ea

View file

@ -509,8 +509,9 @@ pandora.ui.statisticsDialog = function() {
Ox.Chart({
color: function(value) {
var color = Ox.zip(value.split(' / ').map(function(v, i) {
var key = ['system', 'browser'][i];
v = version ? getName(key, v) : v;
return colors[i == 0 ? 'system' : 'browser'][v];
return colors[key][v];
})).map(function(c) {
return Math.round(Ox.sum(c) / 2);
});
@ -547,12 +548,12 @@ pandora.ui.statisticsDialog = function() {
)
);
value.split(' / ').forEach(function(value, i) {
var key = ['system', 'browser'][i];
value = version ? getName(key, value) : value;
$element.append(
$('<img>')
.attr({
src: Ox.UI.PATH + 'png/'
+ (i == 0 ? 'system' : 'browser')
src: Ox.UI.PATH + 'png/' + key
+ value.replace(/ /g, '') + '128.png'
})
.css({