aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-01-25 23:21:01 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-01-25 23:21:01 +0100
commitbd6a7606c0d2364fd472f7903260a72f37b31f3b (patch)
tree610b18e0ceec3d6b6986594e724f1334dd8cb770 /app/views
parenta46ee26e3592f8be95df9265e759796f3dc945eb (diff)
Intégration statistiques
Quelques corrections https://github.com/marienfressinaud/FreshRSS/pull/390 en particulier correction bug chargement asynchrone JavaScript Pour https://github.com/marienfressinaud/FreshRSS/issues/90
Diffstat (limited to 'app/views')
-rw-r--r--app/views/index/stats.phtml15
1 files changed, 13 insertions, 2 deletions
diff --git a/app/views/index/stats.phtml b/app/views/index/stats.phtml
index ab9d0a881..b1f0b8eb3 100644
--- a/app/views/index/stats.phtml
+++ b/app/views/index/stats.phtml
@@ -58,6 +58,15 @@
</div>
<script>
+"use strict";
+function initStats() {
+ if (!window.Flotr) {
+ if (window.console) {
+ console.log('FreshRSS waiting for Flotr…');
+ }
+ window.setTimeout(initStats, 50);
+ return;
+ }
// Entry per day
Flotr.draw(document.getElementById('statsEntryPerDay'),
[<?php echo $this->count ?>],
@@ -65,7 +74,7 @@
bars: {horizontal: false, show: true},
xaxis: {noTicks: 6, showLabels: false, tickDecimals: 0},
yaxis: {showLabels: false},
- mouse: {relative: true, track: true, trackDecimals: 0,trackFormatter: function(obj) {return obj.y;}}
+ mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return obj.y;}}
});
// Feed per category
Flotr.draw(document.getElementById('statsFeedPerCategory'),
@@ -89,4 +98,6 @@
mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return obj.y;}},
legend: {container: document.getElementById('statsEntryPerCategoryLegend')}
});
-</script> \ No newline at end of file
+}
+initStats();
+</script>