summaryrefslogtreecommitdiffstats
path: root/hyperkitty/static
diff options
context:
space:
mode:
authorAurélien Bompard <aurelien@bompard.org>2013-05-23 15:45:22 +0200
committerAurélien Bompard <aurelien@bompard.org>2013-05-23 17:48:16 +0200
commitea032ba8b321fad5e896750eae508456676041c1 (patch)
tree026c8af089391ecddd9dcae5a05d5ee9e07ad3a0 /hyperkitty/static
parente9e92bf1ac15421b9a29c366b9ef6bf2c1b94943 (diff)
downloadhyperkitty-ea032ba8b321fad5e896750eae508456676041c1.tar.gz
hyperkitty-ea032ba8b321fad5e896750eae508456676041c1.tar.xz
hyperkitty-ea032ba8b321fad5e896750eae508456676041c1.zip
Display the last viewed threads in the user profile
Diffstat (limited to 'hyperkitty/static')
-rw-r--r--hyperkitty/static/css/hyperkitty-user.css7
-rw-r--r--hyperkitty/static/js/hyperkitty.js29
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.
*/