diff options
Diffstat (limited to 'hyperkitty/static')
-rw-r--r-- | hyperkitty/static/css/hyperkitty-user.css | 7 | ||||
-rw-r--r-- | hyperkitty/static/js/hyperkitty.js | 29 |
2 files changed, 36 insertions, 0 deletions
diff --git a/hyperkitty/static/css/hyperkitty-user.css b/hyperkitty/static/css/hyperkitty-user.css index 49edfa6..77d9ad4 100644 --- a/hyperkitty/static/css/hyperkitty-user.css +++ b/hyperkitty/static/css/hyperkitty-user.css @@ -84,3 +84,10 @@ table.user-data label, table.user-data input { margin-bottom: 0; } + + +.ajaxloader { + margin-top: 0; + margin-left: 0; + position: absolute; +} 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. */ |