summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2012-10-21 12:22:07 +0200
committerLeif Johansson <leifj@sunet.se>2012-10-21 12:22:07 +0200
commit31efc753b10ed6cdf081266eba9c2f07c6c48200 (patch)
tree050af89130ab1a3d6cb8ae0ae8d7d0dafa854d6d /templates
parent1a3ebb7a6bcbb4cd14c35d8d171eac4d0139c4a0 (diff)
more spinner
Diffstat (limited to 'templates')
-rw-r--r--templates/apps/stats/domain.html34
-rw-r--r--templates/apps/stats/room.html32
2 files changed, 35 insertions, 31 deletions
diff --git a/templates/apps/stats/domain.html b/templates/apps/stats/domain.html
index f7d9ad3..132d819 100644
--- a/templates/apps/stats/domain.html
+++ b/templates/apps/stats/domain.html
@@ -1,22 +1,24 @@
{% extends "base.html" %}
{% load datehumanize %}
{% block widgets %}
-$.ajax({
- url: '/api/stats/domain/{{domain}}',
- method: 'GET',
- success: function (resp) {
- var graph = $('#graph');
- series = [{label: 'Meeting minutes for {{domain}}',data: resp['data']}];
- $.plot(graph,series,{
- lines: { show: true },
- points: { show: true },
- xaxis: { mode: "time" }
- });
- $('#minutes').append(resp['minutes']);
- $('#rooms').append(resp['rooms']);
- $('#users').append(resp['users']);
- }
-});
+ $.ajax({
+ url: '/api/stats/domain/{{domain}}',
+ method: 'GET',
+ beforeSend: function() { $('#graph').spin("flotload"); },
+ success: function (resp) {
+ var graph = $('#graph');
+ graph.spin(false);
+ series = [{label: 'Meeting minutes for {{domain}}',data: resp['data']}];
+ $.plot(graph,series,{
+ lines: { show: true },
+ points: { show: true },
+ xaxis: { mode: "time" }
+ });
+ $('#minutes').append(resp['minutes']);
+ $('#rooms').append(resp['rooms']);
+ $('#users').append(resp['users']);
+ }
+ });
{% endblock %}
{% block content %}
<h1>Meeting statistics for {{domain}}</h1>
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>