Initial implementation of homepage top lists

* Top lists for all stats, default max 5 items
This commit is contained in:
Jonathan Wong 2015-08-24 12:13:38 -07:00
commit 8ae2f718f4
6 changed files with 585 additions and 162 deletions

View file

@ -45,12 +45,12 @@
<script src="interfaces/default/js/moment-with-locale.js"></script>
<script>
function getHomeStats(days, plays) {
function getHomeStats(days, stat_type, stat_count) {
$.ajax({
url: 'home_stats',
cache: false,
async: true,
data: {time_range: days, stat_type: plays},
data: {time_range: days, stat_type: stat_type, stat_count: stat_count},
complete: function(xhr, status) {
$("#home-stats").html(xhr.responseText);
}
@ -110,7 +110,7 @@
});
});
getHomeStats(${config['home_stats_length']}, ${config['home_stats_type']});
getHomeStats(${config['home_stats_length']}, ${config['home_stats_type']}, ${config['home_stats_count']});
</script>