summaryrefslogtreecommitdiffstats
path: root/hyperkitty/static/hyperkitty/js/hyperkitty-common.js
diff options
context:
space:
mode:
authorAurélien Bompard <aurelien@bompard.org>2013-11-28 12:25:25 +0100
committerAurélien Bompard <aurelien@bompard.org>2013-11-28 14:05:18 +0100
commitdc34f0e874c42018e11ed951efc5b3fcfe7e8feb (patch)
treed9aae53bff1beb78a076ecdbd65c86cefd22c85d /hyperkitty/static/hyperkitty/js/hyperkitty-common.js
parentc976dc96c79a897b55ca8430b824eb8063cd0403 (diff)
downloadhyperkitty-dc34f0e874c42018e11ed951efc5b3fcfe7e8feb.tar.gz
hyperkitty-dc34f0e874c42018e11ed951efc5b3fcfe7e8feb.tar.xz
hyperkitty-dc34f0e874c42018e11ed951efc5b3fcfe7e8feb.zip
Load the list's recent activity via AJAX
Diffstat (limited to 'hyperkitty/static/hyperkitty/js/hyperkitty-common.js')
-rw-r--r--hyperkitty/static/hyperkitty/js/hyperkitty-common.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/hyperkitty/static/hyperkitty/js/hyperkitty-common.js b/hyperkitty/static/hyperkitty/js/hyperkitty-common.js
index 464cff5..45c3e47 100644
--- a/hyperkitty/static/hyperkitty/js/hyperkitty-common.js
+++ b/hyperkitty/static/hyperkitty/js/hyperkitty-common.js
@@ -237,6 +237,26 @@ function chart(elem_id, data, default_props) {
}
+function ajax_chart(elem, url, props) {
+ elem = $(elem);
+ $.ajax({
+ dataType: "json",
+ url: url,
+ success: function(data) {
+ chart(elem.get(0), data.evolution, props);
+ },
+ error: function(jqXHR, textStatus, errorThrown) {
+ //alert(jqXHR.responseText);
+ },
+ complete: function(jqXHR, textStatus) {
+ // if the list is private we have no info, remove the img anyway
+ elem.find("img.ajaxloader").remove();
+ }
+ });
+}
+
+
+
/*
* Misc.