diff options
author | Aurélien Bompard <aurelien@bompard.org> | 2013-05-17 16:00:14 +0200 |
---|---|---|
committer | Aurélien Bompard <aurelien@bompard.org> | 2013-05-17 16:17:38 +0200 |
commit | 3759498f4ecf5cae88eecf197b1f2cf075bc0565 (patch) | |
tree | d4b5cb4697b3d338fb955a71b0ad9b3f8b4e96d1 /hyperkitty/static | |
parent | 3640b5249f1afa767dbd997daca628ba18ab949b (diff) | |
download | hyperkitty-3759498f4ecf5cae88eecf197b1f2cf075bc0565.tar.gz hyperkitty-3759498f4ecf5cae88eecf197b1f2cf075bc0565.tar.xz hyperkitty-3759498f4ecf5cae88eecf197b1f2cf075bc0565.zip |
Load the lists descriptions from Mailman dynamically
Diffstat (limited to 'hyperkitty/static')
-rw-r--r-- | hyperkitty/static/js/hyperkitty.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/hyperkitty/static/js/hyperkitty.js b/hyperkitty/static/js/hyperkitty.js index a06aa79..62bacf4 100644 --- a/hyperkitty/static/js/hyperkitty.js +++ b/hyperkitty/static/js/hyperkitty.js @@ -378,6 +378,38 @@ function update_thread_replies(url) { /* + * List descriptions on the front page + */ +function update_list_properties(url) { + $.ajax({ + dataType: "json", + url: url, + success: function(data) { + $(".all-lists .mailinglist").each(function() { + var name = $(this).find(".list-address").text(); + if (!data[name]) { + return; + } + if (data[name]["display_name"]) { + $(this).find(".list-name").text(data[name]["display_name"]); + } + if (data[name]["description"]) { + $(this).find(".list-description") + .text(data[name]["description"]); + } + }); + }, + error: function(jqXHR, textStatus, errorThrown) { + //alert(jqXHR.responseText); + }, + complete: function(jqXHR, textStatus) { + $(".all-lists .mailinglist img.ajaxloader").remove(); + } + }); +} + + +/* * Misc. */ |