From eb8d6cb360fd57eeccc692f631f6b9b7d8f41729 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 26 Nov 2010 12:50:14 +0100 Subject: [PATCH] Add click-to-mark-known function to all posts and replies. --- src/main/resources/static/javascript/sone.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 4b60dd9..c02e240 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -497,6 +497,11 @@ function ajaxifyPost(postElement) { }); }); + /* mark everything as known on click. */ + $(postElement).click(function() { + markPostAsKnown(this); + }); + /* hide reply input field. */ $(postElement).find(".create-reply").addClass("hidden"); } @@ -526,6 +531,11 @@ function ajaxifyReply(replyElement) { }); })(replyElement); addCommentLink(getPostId(replyElement), replyElement, $(replyElement).find(".reply-status-line .time")); + + /* mark post and all replies as known on click. */ + $(replyElement).click(function() { + markPostAsKnown(getPostElement(replyElement)); + }); } /** -- 2.7.4