fixed responsive pie charts

v1.18.x
psychobunny 11 years ago
parent 456f087dea
commit 8c9d362535

@ -277,16 +277,19 @@ define('forum/admin/general/dashboard', ['semver'], function(semver) {
setInterval(updateTrafficGraph, 15000);
updateTrafficGraph();
$(window).on('resize', function() {
$('.pie-chart.legend-up').each(function() {
var $this = $(this);
$(window).on('resize', adjustPieCharts);
adjustPieCharts();
}
if ($this.width() < 320) {
$this.addClass('compact');
} else {
$this.removeClass('compact');
}
});
function adjustPieCharts() {
$('.pie-chart.legend-up').each(function() {
var $this = $(this);
if ($this.width() < 320) {
$this.addClass('compact');
} else {
$this.removeClass('compact');
}
});
}

Loading…
Cancel
Save