wp_list_comments() and threaded comment support. First cut. see #7635

git-svn-id: https://develop.svn.wordpress.org/trunk@8869 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-09-11 19:25:50 +00:00
parent 0f6bf551a3
commit 403d9214ed
6 changed files with 194 additions and 36 deletions
+37
View File
@@ -0,0 +1,37 @@
function moveAddCommentForm(theId, threadId, respondId) {
var addComment = document.getElementById(respondId);
var comment = document.getElementById(theId);
addComment.parentNode.removeChild(addComment);
comment.appendChild(addComment);
// if(comment.className.indexOf("alt")>-1) {
// addComment.className = addComment.className.replace(" alt", "");
// } else {
// addComment.className += " alt";
// }
var replyId = document.getElementById("comment-parent");
replyId.value = threadId;
var reRootElement = document.getElementById("cancel-comment-reply");
reRootElement.style.display = "block";
var aTags = comment.getElementsByTagName("A");
var anc = aTags.item(0).id;
//document.location.href = "#"+anc;
document.getElementById("comment").focus();
}
function cancelCommentReply() {
var addComment = document.getElementById("respond");
var reRootElement = document.getElementById("cancel-comment-reply");
reRootElement.style.display = "none";
var content = document.getElementById("content-main");
if( !content )
content = document.getElementById("content");
if( content ) {
addComment.parentNode.removeChild(addComment);
content.appendChild(addComment);
}
// addComment.className = addComment.className.replace(" alt", "");
document.location.href = "#respond";
document.getElementById("comment").focus();
document.getElementById("comment-parent").value = "0";
}