projects
/
Sone.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d03286f
)
Don’t show distrust button when trust is assigned. Fixes #55.
author
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Sun, 16 Jan 2011 14:18:29 +0000
(15:18 +0100)
committer
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Sun, 16 Jan 2011 14:18:29 +0000
(15:18 +0100)
src/main/resources/static/javascript/sone.js
patch
|
blob
|
history
src/main/resources/templates/include/viewPost.html
patch
|
blob
|
history
src/main/resources/templates/include/viewReply.html
patch
|
blob
|
history
diff --git
a/src/main/resources/static/javascript/sone.js
b/src/main/resources/static/javascript/sone.js
index
7fe842b
..
e790e9e
100644
(file)
--- a/
src/main/resources/static/javascript/sone.js
+++ b/
src/main/resources/static/javascript/sone.js
@@
-457,14
+457,14
@@
function updateTrustControls(soneId, trustValue) {
$("#sone .post").each(function() {
if (getPostAuthor(this) == soneId) {
getPostElement(this).find(".post-trust").toggleClass("hidden", trustValue != null);
$("#sone .post").each(function() {
if (getPostAuthor(this) == soneId) {
getPostElement(this).find(".post-trust").toggleClass("hidden", trustValue != null);
- getPostElement(this).find(".post-distrust").toggleClass("hidden",
(trustValue != null) && (trustValue < 0)
);
+ getPostElement(this).find(".post-distrust").toggleClass("hidden",
trustValue != null
);
getPostElement(this).find(".post-untrust").toggleClass("hidden", trustValue == null);
}
});
$("#sone .reply").each(function() {
if (getReplyAuthor(this) == soneId) {
getReplyElement(this).find(".reply-trust").toggleClass("hidden", trustValue != null);
getPostElement(this).find(".post-untrust").toggleClass("hidden", trustValue == null);
}
});
$("#sone .reply").each(function() {
if (getReplyAuthor(this) == soneId) {
getReplyElement(this).find(".reply-trust").toggleClass("hidden", trustValue != null);
- getReplyElement(this).find(".reply-distrust").toggleClass("hidden",
(trustValue != null) && (trustValue < 0)
);
+ getReplyElement(this).find(".reply-distrust").toggleClass("hidden",
trustValue != null
);
getReplyElement(this).find(".reply-untrust").toggleClass("hidden", trustValue == null);
}
});
getReplyElement(this).find(".reply-untrust").toggleClass("hidden", trustValue == null);
}
});
diff --git
a/src/main/resources/templates/include/viewPost.html
b/src/main/resources/templates/include/viewPost.html
index
6d96840
..
64fddea
100644
(file)
--- a/
src/main/resources/templates/include/viewPost.html
+++ b/
src/main/resources/templates/include/viewPost.html
@@
-48,7
+48,7
@@
<input type="hidden" name="sone" value="<% post.sone.id|html>" />
<button type="submit" title="<%= View.Trust.Tooltip.Trust|l10n|html>">✓</button>
</form>
<input type="hidden" name="sone" 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">
+ <form class="distrust post-distrust
<%if post.sone.trust.assigned> hidden<%/if>
" 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="sone" value="<% post.sone.id|html>" />
<input type="hidden" name="formPassword" value="<% formPassword|html>" />
<input type="hidden" name="returnPage" value="<% request.uri|html>" />
<input type="hidden" name="sone" value="<% post.sone.id|html>" />
diff --git
a/src/main/resources/templates/include/viewReply.html
b/src/main/resources/templates/include/viewReply.html
index
2fbca43
..
4daf302
100644
(file)
--- a/
src/main/resources/templates/include/viewReply.html
+++ b/
src/main/resources/templates/include/viewReply.html
@@
-40,7
+40,7
@@
<input type="hidden" name="sone" value="<% reply.sone.id|html>" />
<button type="submit" title="<%= View.Trust.Tooltip.Trust|l10n|html>">✓</button>
</form>
<input type="hidden" name="sone" 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">
+ <form class="distrust reply-distrust
<%if reply.sone.trust.assigned> hidden<%/if>
" 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="sone" value="<% reply.sone.id|html>" />
<input type="hidden" name="formPassword" value="<% formPassword|html>" />
<input type="hidden" name="returnPage" value="<% request.uri|html>" />
<input type="hidden" name="sone" value="<% reply.sone.id|html>" />