Enhance javascript “like” functionality to include replies.
[Sone.git] / src / main / resources / templates / include / head.html
index 797e7a9..a43131a 100644 (file)
@@ -1,4 +1,4 @@
-<div id="sone">
+<div id="sone" class="<%ifnull ! currentSone>online<%else>offline<%/if>">
 
        <div id="formPassword"><% formPassword|html></div>
 
                                unlikePost(getPostId(this));
                                return false;
                        });
+                       $("#sone .post .reply .status-line .like").submit(function() {
+                               likeReply(getReplyId(this));
+                               return false;
+                       });
+                       $("#sone .post .reply .status-line .unlike").submit(function() {
+                               unlikeReply(getReplyId(this));
+                               return false;
+                       });
                });
        </script>