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); setInterval(updateTrafficGraph, 15000);
updateTrafficGraph(); updateTrafficGraph();
$(window).on('resize', function() { $(window).on('resize', adjustPieCharts);
$('.pie-chart.legend-up').each(function() { adjustPieCharts();
var $this = $(this); }
if ($this.width() < 320) { function adjustPieCharts() {
$this.addClass('compact'); $('.pie-chart.legend-up').each(function() {
} else { var $this = $(this);
$this.removeClass('compact');
} if ($this.width() < 320) {
}); $this.addClass('compact');
} else {
$this.removeClass('compact');
}
}); });
} }

Loading…
Cancel
Save