From e54ce7155c6df64ab6171eeb445b456a1153f6f7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 26 Jan 2011 10:12:05 +0100 Subject: [PATCH] =?utf8?q?Remove=20the=20=E2=80=9Cnew=E2=80=9D=20class=20f?= =?utf8?q?rom=20clicked=20items=20immediately.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/resources/static/javascript/sone.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 22b7eb2..251105a 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -1002,10 +1002,9 @@ function markPostAsKnown(postElements) { postElement = this; if ($(postElement).hasClass("new")) { (function(postElement) { - $.getJSON("markAsKnown.ajax", {"formPassword": getFormPassword(), "type": "post", "id": getPostId(postElement)}, function(data, textStatus) { - $(postElement).removeClass("new"); - $(".click-to-show", postElement).removeClass("new"); - }); + $(postElement).removeClass("new"); + $(".click-to-show", postElement).removeClass("new"); + $.getJSON("markAsKnown.ajax", {"formPassword": getFormPassword(), "type": "post", "id": getPostId(postElement)}); })(postElement); } }); @@ -1017,9 +1016,8 @@ function markReplyAsKnown(replyElements) { replyElement = this; if ($(replyElement).hasClass("new")) { (function(replyElement) { - $.getJSON("markAsKnown.ajax", {"formPassword": getFormPassword(), "type": "reply", "id": getReplyId(replyElement)}, function(data, textStatus) { - $(replyElement).removeClass("new"); - }); + $(replyElement).removeClass("new"); + $.getJSON("markAsKnown.ajax", {"formPassword": getFormPassword(), "type": "reply", "id": getReplyId(replyElement)}); })(replyElement); } }); -- 2.7.4