diff options
author | Aurélien Bompard <aurelien@bompard.org> | 2013-11-28 12:25:25 +0100 |
---|---|---|
committer | Aurélien Bompard <aurelien@bompard.org> | 2013-11-28 14:05:18 +0100 |
commit | dc34f0e874c42018e11ed951efc5b3fcfe7e8feb (patch) | |
tree | d9aae53bff1beb78a076ecdbd65c86cefd22c85d /hyperkitty/static/hyperkitty/js/hyperkitty-common.js | |
parent | c976dc96c79a897b55ca8430b824eb8063cd0403 (diff) | |
download | hyperkitty-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.js | 20 |
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. |