From 31efc753b10ed6cdf081266eba9c2f07c6c48200 Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Sun, 21 Oct 2012 12:22:07 +0200 Subject: more spinner --- templates/apps/stats/domain.html | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'templates/apps/stats/domain.html') 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 %}

Meeting statistics for {{domain}}

-- cgit v1.1