diff options
Diffstat (limited to 'hyperkitty/static/js/hyperkitty.js')
-rw-r--r-- | hyperkitty/static/js/hyperkitty.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/hyperkitty/static/js/hyperkitty.js b/hyperkitty/static/js/hyperkitty.js index fc8e461..5fcb539 100644 --- a/hyperkitty/static/js/hyperkitty.js +++ b/hyperkitty/static/js/hyperkitty.js @@ -420,6 +420,35 @@ function update_list_properties(url) { /* + * Last viewed threads in the user's profile + */ +function update_last_views(base_url) { + var container = $(".views"); + var loader = container.prev(".ajaxloader"); + function _update(url) { + loader.show(); + $.ajax({ + url: url, + success: function(data) { + container.html(data); + container.find(".pager a").click(function(e) { + e.preventDefault(); + _update(base_url + $(this).attr("href")); + }); + }, + error: function(jqXHR, textStatus, errorThrown) { + //alert(jqXHR.responseText); + }, + complete: function(jqXHR, textStatus) { + loader.hide(); + } + }); + } + _update(base_url); +} + + +/* * Misc. */ |