mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-01 00:10:36 +01:00
5828310157
git-svn-id: http://svn.automattic.com/wordpress/trunk@8869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
37 lines
1.4 KiB
JavaScript
37 lines
1.4 KiB
JavaScript
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";
|
|
} |