Display trust control with only two buttons and no numbers.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 2 Jan 2011 12:16:51 +0000 (13:16 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 2 Jan 2011 12:16:51 +0000 (13:16 +0100)
src/main/resources/i18n/sone.en.properties
src/main/resources/static/css/sone.css
src/main/resources/static/javascript/sone.js
src/main/resources/templates/include/viewPost.html
src/main/resources/templates/include/viewReply.html

index 5b07391..4353ac2 100644 (file)
@@ -159,9 +159,9 @@ View.Post.Reply.DeleteLink=Delete
 View.Post.LikeLink=Like
 View.Post.UnlikeLink=Unlike
 
-View.Trust.Label=Trust:
-View.Trust.IncreaseTrustLink=↑
-View.Trust.DecreaseTrustLink=↓
+View.Trust.Tooltip.Trust=Trust this person
+View.Trust.Tooltip.Distrust=Assign negative trust to this person
+View.Trust.Tooltip.Untrust=Remove your trust assignment for this person
 
 WebInterface.DefaultText.StatusUpdate=What’s on your mind?
 WebInterface.DefaultText.Message=Write a Message…
index c978bac..f1a89db 100644 (file)
@@ -1,7 +1,7 @@
 /* Sone Main CSS File */
 
 /* first, override some fproxy rules. */
-#sone .post .reply div,#sone .post .time,#sone .post .delete,#sone .post .show-reply-form, input[type=text], textarea {
+#sone div, #sone span, #sone .post .time,#sone .post .delete,#sone .post .show-reply-form, input[type=text], textarea {
        font: inherit;
 }
 
@@ -177,19 +177,6 @@ textarea {
        min-height: 48px;
 }
 
-#sone .trust {
-       font-size: 85%;
-       text-align: center;
-}
-
-#sone .trust .explicit {
-       color: rgb(0, 128, 0);
-}
-
-#sone .trust .implicit {
-       color: rgb(128, 128, 128);
-}
-
 #sone .post .author, #sone .post .recipient {
        display: inline;
        font-weight: bold;
@@ -205,12 +192,17 @@ textarea {
        font-size: 85%;
 }
 
+#sone .separator {
+       font: inherit;
+       color: rgb(28, 131, 191);
+}
+
 #sone .post .time {
        display: inline;
        color: #666;
 }
 
-#sone .post .delete, #sone .post .likes, #sone .post .like, #sone .post .unlike, #sone .post .increase-trust, #sone .post .decrease-trust {
+#sone .post .delete, #sone .post .likes, #sone .post .like, #sone .post .unlike, #sone .post .trust, #sone .post .distrust, #sone .post .untrust {
        display: inline;
        font: inherit;
        margin: 0px;
@@ -220,11 +212,11 @@ textarea {
        display: none;
 }
 
-#sone .post .like.hidden, #sone .post .unlike.hidden {
+#sone .post .like.hidden, #sone .post .unlike.hidden, #sone .post .trust.hidden, #sone .post .distrust.hidden, #sone .post .untrust.hidden {
        display: none;
 }
 
-#sone .post .delete button, #sone .post .like button, #sone .post .unlike button, #sone .post .increase-trust button, #sone .post .decrease-trust button {
+#sone .post .delete button, #sone .post .like button, #sone .post .unlike button, #sone .post .trust button, #sone .post .distrust button, #sone .post .untrust button {
        border: 0px;
        background: none;
        padding: 0px;
@@ -233,7 +225,19 @@ textarea {
        margin: 0px;
 }
 
-#sone .post .delete button:hover, #sone .post .like button:hover, #sone .post .unlike button:hover, #sone .post .increase-trust button:hover, #sone .post .decrease-trust button:hover {
+#sone .post .trust button {
+       color: rgb(0, 128, 0);
+}
+
+#sone .post .distrust button {
+       color: rgb(255, 0, 0);
+}
+
+#sone .post .untrust button {
+       color: rgb(64, 64, 64);
+}
+
+#sone .post .delete button:hover, #sone .post .like button:hover, #sone .post .unlike button:hover, #sone .post .trust button:hover, #sone .post .distrust button:hover, #sone .post .untrust button:hover {
        border: 0px;
        background: none;
        padding: 0px;
@@ -241,28 +245,11 @@ textarea {
        cursor: pointer;
 }
 
-#sone .post .delete:before, #sone .post .likes:before, #sone .post .like:before, #sone .post .unlike:before {
-       content: ' ‧ ';
-}
-
 #sone .post .likes span {
        font: inherit;
        color: green;
 }
 
-#sone .post .trust {
-       display: inline;
-}
-
-#sone .post .trust:before {
-       content: ' · ';
-}
-
-#sone .trust .explicit, #sone .trust .implicit {
-       font: inherit;
-       display: inline;
-}
-
 #sone .post .replies {
        clear: both;
        padding-top: 0.2ex;
@@ -322,10 +309,6 @@ textarea {
        color: rgb(255, 172, 0);
 }
 
-#sone .post .show-reply-form:before {
-       content: ' ‧ ';
-}
-
 #sone .post .create-reply {
        clear: both;
        background-color: #f0f0ff;
index 9aa0b82..d6e0964 100644 (file)
@@ -68,6 +68,7 @@ function addCommentLink(postId, element, insertAfterThisElement) {
                return;
        }
        commentElement = (function(postId) {
+               separator = $("<span> · </span>").addClass("separator");
                var commentElement = $("<div><span>Comment</span></div>").addClass("show-reply-form").click(function() {
                        markPostAsKnown(getPostElement(this));
                        replyElement = $("#sone .post#" + postId + " .create-reply");
@@ -87,6 +88,7 @@ function addCommentLink(postId, element, insertAfterThisElement) {
                return commentElement;
        })(postId);
        $(insertAfterThisElement).after(commentElement.clone(true));
+       $(insertAfterThisElement).after(separator);
 }
 
 var translations = {};
index 8667bac..afb1728 100644 (file)
@@ -19,6 +19,7 @@
                </div>
                <div class="post-status-line status-line">
                        <div class="time"><a href="viewPost.html?post=<% post.id|html>"><% post.time|date format="MMM d, yyyy, HH:mm:ss"></a></div>
+                       <span class='separator'>·</span>
                        <div class="likes<%if post.likes.size|match value=0> hidden<%/if>"><span title="<% post.likes.soneNames|html>">↑<span class="like-count"><% post.likes.size></span></span></div>
                        <%ifnull ! currentSone>
                                <form class="like like-post<%if post.liked> hidden<%/if>" action="like.html" method="post">
                                </form>
                        <%/if>
                        <%if !post.sone.current>
-                               <div class="trust">
-                                       <%= View.Trust.Label|l10n|html>
-                                       <%if post.sone.trust.assigned>
-                                               <div class="explicit"><% post.sone.trust.explicit></div>
-                                       <%else>
-                                               <div class="implicit"><% post.sone.trust.implicit><%if post.sone.trust.hasDistance> (<% post.sone.trust.distance>)<%/if></div>
-                                       <%/if>
-                                       <%if !post.sone.trust.maximum>
-                                               <form class="increase-trust increase-post-trust" action="increaseTrust.html" method="post">
-                                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-                                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
-                                                       <input type="hidden" name="identity" value="<% post.sone.id|html>" />
-                                                       <button type="submit"><%= View.Trust.IncreaseTrustLink|l10n|html></button>
-                                               </form>
-                                       <%/if>
-                                       <form class="decrease-trust decrease-post-trust" action="decreaseTrust.html" method="post">
-                                               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-                                               <input type="hidden" name="returnPage" value="<% request.uri|html>" />
-                                               <input type="hidden" name="identity" value="<% post.sone.id|html>" />
-                                               <button type="submit"><%= View.Trust.DecreaseTrustLink|l10n|html></button>
-                                       </form>
-                               </div>
+                               <span class='separator'>·</span>
+                               <form class="trust post-trust<%if post.sone.trust.assigned> hidden<%/if>" action="trust.html" method="post">
+                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+                                       <input type="hidden" name="identity" value="<% post.sone.id|html>" />
+                                       <button type="submit" title="<%= View.Trust.Tooltip.Trust|l10n|html>">✓</button>
+                               </form>
+                               <form class="distrust post-distrust" action="distrust.html" method="post">
+                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+                                       <input type="hidden" name="identity" value="<% post.sone.id|html>" />
+                                       <button type="submit" title="<%= View.Trust.Tooltip.Distrust|l10n|html>">✗</button>
+                               </form>
+                               <form class="untrust post-untrust<%if !post.sone.trust.assigned> hidden<%/if>" action="untrust.html" method="post">
+                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+                                       <input type="hidden" name="identity" value="<% post.sone.id|html>" />
+                                       <button type="submit" title="<%= View.Trust.Tooltip.Untrust|l10n|html>">↶</button>
+                               </form>
                        <%/if>
                        <%if post.sone.current>
                                <form class="delete delete-post" action="deletePost.html" method="post">
index a9b308e..398aed5 100644 (file)
@@ -11,6 +11,7 @@
                </div>
                <div class="reply-status-line status-line">
                        <div class="time"><% reply.time|date format="MMM d, yyyy, HH:mm:ss"></div>
+                       <span class='separator'>·</span>
                        <div class="likes<%if reply.likes.size|match value=0> hidden<%/if>"><span title="<% reply.likes.soneNames|html>">↑<span class="like-count"><% reply.likes.size></span></span></div>
                        <%ifnull ! currentSone>
                                <form class="like like-reply<%if reply.liked> hidden<%/if>" action="like.html" method="post">
                                </form>
                        <%/if>
                        <%if !reply.sone.current>
-                               <div class="trust">
-                                       <%= View.Trust.Label|l10n|html>
-                                       <%if reply.sone.trust.assigned>
-                                               <div class="explicit"><% reply.sone.trust.explicit></div>
-                                       <%else>
-                                               <div class="implicit"><% reply.sone.trust.implicit><%if reply.sone.trust.hasDistance> (<% reply.sone.trust.distance>)<%/if></div>
-                                       <%/if>
-                                       <%if !reply.sone.trust.maximum>
-                                               <form class="increase-trust increase-reply-trust" action="increaseTrust.html" method="post">
-                                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-                                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
-                                                       <input type="hidden" name="identity" value="<% reply.sone.id|html>" />
-                                                       <button type="submit"><%= View.Trust.IncreaseTrustLink|l10n|html></button>
-                                               </form>
-                                       <%/if>
-                                       <form class="decrease-trust decrease-reply-trust" action="decreaseTrust.html" method="post">
-                                               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-                                               <input type="hidden" name="returnPage" value="<% request.uri|html>" />
-                                               <input type="hidden" name="identity" value="<% reply.sone.id|html>" />
-                                               <button type="submit"><%= View.Trust.DecreaseTrustLink|l10n|html></button>
-                                       </form>
-                               </div>
+                               <span class='separator'>·</span>
+                               <form class="trust reply-trust<%if reply.sone.trust.assigned> hidden<%/if>" action="trust.html" method="post">
+                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+                                       <input type="hidden" name="identity" value="<% reply.sone.id|html>" />
+                                       <button type="submit" title="<%= View.Trust.Tooltip.Trust|l10n|html>">✓</button>
+                               </form>
+                               <form class="distrust reply-distrust" action="distrust.html" method="post">
+                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+                                       <input type="hidden" name="identity" value="<% reply.sone.id|html>" />
+                                       <button type="submit" title="<%= View.Trust.Tooltip.Distrust|l10n|html>">✗</button>
+                               </form>
+                               <form class="untrust reply-untrust<%if !reply.sone.trust.assigned> hidden<%/if>" action="untrust.html" method="post">
+                                       <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                                       <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+                                       <input type="hidden" name="identity" value="<% reply.sone.id|html>" />
+                                       <button type="submit" title="<%= View.Trust.Tooltip.Untrust|l10n|html>">↶</button>
+                               </form>
                        <%/if>
                        <%if reply.sone.current>
                                <form class="delete delete-reply" action="deleteReply.html" method="post">