diff options
Diffstat (limited to 'templates/apps/stats/room.html')
-rw-r--r-- | templates/apps/stats/room.html | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/templates/apps/stats/room.html b/templates/apps/stats/room.html index d5e35dd..fdc8bc9 100644 --- a/templates/apps/stats/room.html +++ b/templates/apps/stats/room.html @@ -1,21 +1,23 @@ {% extends "base.html" %} {% load datehumanize %} {% block widgets %} -$.ajax({ - url: '/api/stats/room/{{room.id}}', - method: 'GET', - success: function (resp) { - var graph = $('#graph'); - series = [{label: 'Meeting minutes for {{room.name}}',data: resp['data']}]; - $.plot(graph,series,{ - lines: { show: true }, - points: { show: true }, - xaxis: { mode: "time" } - }); - $('#minutes').append(resp['minutes']); - $('#users').append(resp['users']); - } -}); + $.ajax({ + url: '/api/stats/room/{{room.id}}', + method: 'GET', + beforeSend: function() { $('#graph').spin("flotload"); }, + success: function (resp) { + var graph = $('#graph'); + graph.spin(false); + series = [{label: 'Meeting minutes for {{room.name}}',data: resp['data']}]; + $.plot(graph,series,{ + lines: { show: true }, + points: { show: true }, + xaxis: { mode: "time" } + }); + $('#minutes').append(resp['minutes']); + $('#users').append(resp['users']); + } + }); {% endblock %} {% block content %} <h1>Meeting statistics for {{room.name}}</h1> |