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:
950fe12
)
Add element after which the “comment” link is to be inserted to the parameters.
author
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Thu, 25 Nov 2010 19:50:37 +0000
(20:50 +0100)
committer
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Thu, 25 Nov 2010 19:50:37 +0000
(20:50 +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
39999e9
..
f195d59
100644
(file)
--- a/
src/main/resources/static/javascript/sone.js
+++ b/
src/main/resources/static/javascript/sone.js
@@
-63,7
+63,7
@@
function registerInputTextareaSwap(inputElement, defaultText, inputFieldName, op
* @param element
* The element to add a “comment” link to
*/
* @param element
* The element to add a “comment” link to
*/
-function addCommentLink(postId, element) {
+function addCommentLink(postId, element
, insertAfterThisElement
) {
if ($(element).find(".show-reply-form").length > 0) {
return;
}
if ($(element).find(".show-reply-form").length > 0) {
return;
}
@@
-86,9
+86,7
@@
function addCommentLink(postId, element) {
});
return commentElement;
})(postId);
});
return commentElement;
})(postId);
- $(element).find(".status-line .time").each(function() {
- $(this).after(commentElement.clone(true));
- });
+ $(insertAfterThisElement).after(commentElement.clone(true));
}
var translations = {};
}
var translations = {};
@@
-527,7
+525,7
@@
function ajaxifyReply(replyElement) {
});
});
})(replyElement);
});
});
})(replyElement);
- addCommentLink(getPostId(replyElement), replyElement);
+ addCommentLink(getPostId(replyElement), replyElement
, $(replyElement).find(".reply-status-line .time")
);
}
/**
}
/**
diff --git
a/src/main/resources/templates/include/viewPost.html
b/src/main/resources/templates/include/viewPost.html
index
452513b
..
e351fd0
100644
(file)
--- a/
src/main/resources/templates/include/viewPost.html
+++ b/
src/main/resources/templates/include/viewPost.html
@@
-9,7
+9,7
@@
<div class="author profile-link"><a href="viewSone.html?sone=<% post.sone.id|html>"><% post.sone.niceName|html></a></div>
<div class="text"><% post.text|html></div>
</div>
<div class="author profile-link"><a href="viewSone.html?sone=<% post.sone.id|html>"><% post.sone.niceName|html></a></div>
<div class="text"><% post.text|html></div>
</div>
- <div class="status-line">
+ <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>
<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>
<div class="time"><a href="viewPost.html?post=<% post.id|html>"><% post.time|date format="MMM d, yyyy, HH:mm:ss"></a></div>
<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>
diff --git
a/src/main/resources/templates/include/viewReply.html
b/src/main/resources/templates/include/viewReply.html
index
d0a7842
..
d77625b
100644
(file)
--- a/
src/main/resources/templates/include/viewReply.html
+++ b/
src/main/resources/templates/include/viewReply.html
@@
-9,7
+9,7
@@
<div class="author profile-link"><a href="viewSone.html?sone=<% reply.sone.id|html>"><% reply.sone.niceName|html></a></div>
<div class="text"><% reply.text|html></div>
</div>
<div class="author profile-link"><a href="viewSone.html?sone=<% reply.sone.id|html>"><% reply.sone.niceName|html></a></div>
<div class="text"><% reply.text|html></div>
</div>
- <div class="status-line">
+ <div class="
reply-status-line
status-line">
<div class="time"><% reply.time|date format="MMM d, yyyy, HH:mm:ss"></div>
<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>
<div class="time"><% reply.time|date format="MMM d, yyyy, HH:mm:ss"></div>
<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>