forked from 0x2620/pandora
fix a bug in statistics dialog
This commit is contained in:
parent
0ee64f9186
commit
11f746f3ea
1 changed files with 4 additions and 3 deletions
|
@ -509,8 +509,9 @@ pandora.ui.statisticsDialog = function() {
|
||||||
Ox.Chart({
|
Ox.Chart({
|
||||||
color: function(value) {
|
color: function(value) {
|
||||||
var color = Ox.zip(value.split(' / ').map(function(v, i) {
|
var color = Ox.zip(value.split(' / ').map(function(v, i) {
|
||||||
|
var key = ['system', 'browser'][i];
|
||||||
v = version ? getName(key, v) : v;
|
v = version ? getName(key, v) : v;
|
||||||
return colors[i == 0 ? 'system' : 'browser'][v];
|
return colors[key][v];
|
||||||
})).map(function(c) {
|
})).map(function(c) {
|
||||||
return Math.round(Ox.sum(c) / 2);
|
return Math.round(Ox.sum(c) / 2);
|
||||||
});
|
});
|
||||||
|
@ -547,12 +548,12 @@ pandora.ui.statisticsDialog = function() {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
value.split(' / ').forEach(function(value, i) {
|
value.split(' / ').forEach(function(value, i) {
|
||||||
|
var key = ['system', 'browser'][i];
|
||||||
value = version ? getName(key, value) : value;
|
value = version ? getName(key, value) : value;
|
||||||
$element.append(
|
$element.append(
|
||||||
$('<img>')
|
$('<img>')
|
||||||
.attr({
|
.attr({
|
||||||
src: Ox.UI.PATH + 'png/'
|
src: Ox.UI.PATH + 'png/' + key
|
||||||
+ (i == 0 ? 'system' : 'browser')
|
|
||||||
+ value.replace(/ /g, '') + '128.png'
|
+ value.replace(/ /g, '') + '128.png'
|
||||||
})
|
})
|
||||||
.css({
|
.css({
|
||||||
|
|
Loading…
Reference in a new issue