min-height: 64px;
}
+#sone .sone-menu .follow, #sone .sone-menu .unfollow {
+ cursor: pointer;
+}
+
#sone .post > .avatar {
position: absolute;
}
$(postElement).find(".create-reply").addClass("hidden");
/* show Sone menu when hovering over the avatar. */
- $(postElement).find(".avatar").mouseover(function() {
+ $(postElement).find(".post-avatar").mouseover(function() {
$(".sone-post-menu", postElement).mouseleave(function() {
$(this).fadeOut();
}).fadeIn();
return false;
});
+ (function(postElement) {
+ $(".sone-post-menu .follow", postElement).click(function() {
+ var followElement = this;
+ ajaxGet("followSone.ajax", { "sone": $(".sone-id", postElement).text(), "formPassword": getFormPassword() }, function() {
+ $(followElement).addClass("hidden");
+ $(followElement).parent().find(".unfollow").removeClass("hidden");
+ });
+ return false;
+ });
+ $(".sone-post-menu .unfollow", postElement).click(function() {
+ var unfollowElement = this;
+ ajaxGet("unfollowSone.ajax", { "sone": $(".sone-id", postElement).text(), "formPassword": getFormPassword() }, function() {
+ $(unfollowElement).addClass("hidden");
+ $(unfollowElement).parent().find(".follow").removeClass("hidden");
+ });
+ return false;
+ });
+ })(postElement);
}
/**
--- /dev/null
+<div class="sone-menu <% class|css|html>">
+ <div class="sone-id hidden"><%sone.id|html></div>
+ <img class="avatar" src="/WebOfTrust/GetIdenticon?identity=<%sone.id|html>&width=64&height=64" width="64" height="64" alt="Avatar Image" />
+ <div class="inner-menu">
+ <div>
+ <a class="author" href="viewSone.html?sone=<%sone.id|html>"><%sone.niceName|html></a>
+ <span class="author-wot-link">(<a href="/WebOfTrust/ShowIdentity?id=<%sone.id|html>"><% =View.Post.WebOfTrustLink|l10n|html></a>)</span>
+ </div>
+ <div>
+ <a class="follow<%if sone.friend> hidden<%/if>"><%= View.Sone.Button.FollowSone|l10n|html></a>
+ <a class="unfollow<%if !sone.friend> hidden<%/if>"><%= View.Sone.Button.UnfollowSone|l10n|html></a>
+ </div>
+ </div>
+</div>
<div class="post-time hidden"><% post.time|html></div>
<div class="post-author hidden"><% post.sone.id|html></div>
<div class="post-author-local hidden"><% post.sone.local></div>
- <div class="sone-post-menu">
- <div class="sone-id hidden"><%post.sone.id|html></div>
- <img class="avatar" src="/WebOfTrust/GetIdenticon?identity=<% post.sone.id|html>&width=64&height=64" width="64" height="64" alt="Avatar Image" />
- <div class="inner-menu">
- <div>
- <a class="author" href="viewSone.html?sone=<% post.sone.id|html>"><% post.sone.niceName|html></a>
- <span class="author-wot-link">(<a href="/WebOfTrust/ShowIdentity?id=<% post.sone.id|html>"><% =View.Post.WebOfTrustLink|l10n|html></a>)</span>
- </div>
- </div>
- </div>
- <div class="avatar">
+ <%include include/soneMenu.html class=="sone-post-menu" sone=post.sone>
+ <div class="avatar post-avatar" >
<%if post.loaded>
<img src="/WebOfTrust/GetIdenticon?identity=<% post.sone.id|html>&width=48&height=48" width="48" height="48" alt="Avatar Image" />
<%else>