Merge branch 'profile-fields' into next
[Sone.git] / src / main / resources / static / javascript / sone.js
index 8029ccc..2d6c8ec 100644 (file)
@@ -500,7 +500,10 @@ function ajaxifyPost(postElement) {
        });
 
        /* mark everything as known on click. */
-       $(postElement).click(function() {
+       $(postElement).click(function(event) {
+               if ($(event.target).hasClass("click-to-show")) {
+                       return false;
+               }
                markPostAsKnown(this);
        });
 
@@ -793,6 +796,7 @@ function markPostAsKnown(postElements) {
                        (function(postElement) {
                                $.getJSON("markPostAsKnown.ajax", {"formPassword": getFormPassword(), "post": getPostId(postElement)}, function(data, textStatus) {
                                        $(postElement).removeClass("new");
+                                       $(".click-to-show", postElement).removeClass("new");
                                });
                        })(postElement);
                }