From 261a9356258c9c60059989e1dd6ec96f4659ee61 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 7 Apr 2011 11:26:24 +0200 Subject: [PATCH] Mark elements as known when a notification is removed. --- src/main/resources/static/javascript/sone.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 1c0ac1c..21f6803 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -981,6 +981,22 @@ function getStatus() { } }); if (!foundNotification) { + if (notificationId == "new-sone-notification") { + $(".sone-id", this).each(function(index, element) { + soneId = $(this).text(); + markSoneAsKnown(getSone(soneId), true); + }); + } else if (notificationId == "new-post-notification") { + $(".post-id", this).each(function(index, element) { + postId = $(this).text(); + markPostAsKnown(getPost(postId), true); + }); + } else if (notificationId == "new-replies-notification") { + $(".reply-id", this).each(function(index, element) { + replyId = $(this).text(); + markReplyAsKnown(getReply(replyId), true); + }); + } $(this).slideUp("normal", function() { $(this).remove(); }); -- 2.7.4