From 5db08d4142418ed4e53056bdda108d4de3f879e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 26 Nov 2010 06:52:53 +0100 Subject: [PATCH] Marks posts as known when clicking a new post or reply. --- src/main/resources/static/javascript/sone.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index e07c51e..4b60dd9 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -608,7 +608,9 @@ function loadNewPost(postId) { return false; } }); - newPost = $(data.post.html).addClass("hidden"); + newPost = $(data.post.html).addClass("hidden").click(function() { + markPostAsKnown(this); + }); if (firstOlderPost != null) { newPost.insertBefore(firstOlderPost); } else { @@ -637,7 +639,9 @@ function loadNewReply(replyId) { return false; } }); - newReply = $(data.reply.html).addClass("hidden"); + newReply = $(data.reply.html).addClass("hidden").click(function() { + markPostAsKnown(getPostElement(this)); + }); if (firstNewerReply != null) { newReply.insertBefore(firstNewerReply); } else { -- 2.7.4