Add loader message to homepage toggles

This commit is contained in:
JonnyWong16 2017-08-19 23:49:08 -07:00
commit 4b9b8d61f2

View file

@ -501,6 +501,8 @@
% if 'watch_stats' in config['home_sections']: % if 'watch_stats' in config['home_sections']:
<script> <script>
function getHomeStats(time_range, stats_type, stats_count) { function getHomeStats(time_range, stats_type, stats_count) {
showMsg("Loading watch statistics...", true, false, 0);
$.ajax({ $.ajax({
url: 'home_stats', url: 'home_stats',
type: 'GET', type: 'GET',
@ -513,6 +515,7 @@
}, },
complete: function (xhr, status) { complete: function (xhr, status) {
$("#home-stats").html(xhr.responseText); $("#home-stats").html(xhr.responseText);
$('#ajaxMsg').fadeOut();
} }
}); });
} }
@ -564,6 +567,8 @@
% if 'recently_added' in config['home_sections']: % if 'recently_added' in config['home_sections']:
<script> <script>
function recentlyAdded(recently_added_count, recently_added_type) { function recentlyAdded(recently_added_count, recently_added_type) {
showMsg("Loading recently added items...", true, false, 0);
$.ajax({ $.ajax({
url: 'get_recently_added', url: 'get_recently_added',
type: 'GET', type: 'GET',
@ -574,6 +579,7 @@
}, },
complete: function (xhr, status) { complete: function (xhr, status) {
$("#recentlyAdded").html(xhr.responseText); $("#recentlyAdded").html(xhr.responseText);
$('#ajaxMsg').fadeOut();
highlightAddedScrollerButton(); highlightAddedScrollerButton();
} }
}); });