| 1 | | function moveAddCommentForm(theId, threadId, respondId) { |
| 2 | | var addComment = document.getElementById(respondId); |
| 3 | | var comment = document.getElementById(theId); |
| 4 | | addComment.parentNode.removeChild(addComment); |
| 5 | | |
| 6 | | comment.appendChild(addComment); |
| 7 | | // if(comment.className.indexOf("alt")>-1) { |
| 8 | | // addComment.className = addComment.className.replace(" alt", ""); |
| 9 | | // } else { |
| 10 | | // addComment.className += " alt"; |
| 11 | | // } |
| 12 | | var replyId = document.getElementById("comment-parent"); |
| 13 | | replyId.value = threadId; |
| 14 | | var reRootElement = document.getElementById("cancel-comment-reply"); |
| 15 | | reRootElement.style.display = "block"; |
| 16 | | var aTags = comment.getElementsByTagName("A"); |
| 17 | | var anc = aTags.item(0).id; |
| 18 | | //document.location.href = "#"+anc; |
| 19 | | document.getElementById("comment").focus(); |
| | 1 | function moveAddCommentForm(theId,threadId,respondId){ |
| | 2 | jQuery("#"+respondId).appendTo("#"+theId); |
| | 3 | jQuery("#comment-parent").val(threadId); |
| | 4 | jQuery("#cancel-comment-reply").show(); |
| | 5 | jQuery("#comment").focus(); |
| 21 | | |
| 22 | | function cancelCommentReply(respondId, respondRoot) { |
| 23 | | var addComment = document.getElementById(respondId); |
| 24 | | var reRootElement = document.getElementById("cancel-comment-reply"); |
| 25 | | reRootElement.style.display = "none"; |
| 26 | | var content = document.getElementById(respondRoot); |
| 27 | | if( content ) { |
| 28 | | addComment.parentNode.removeChild(addComment); |
| 29 | | content.appendChild(addComment); |
| 30 | | } |
| 31 | | // addComment.className = addComment.className.replace(" alt", ""); |
| 32 | | document.location.href = "#respond"; |
| 33 | | document.getElementById("comment").focus(); |
| 34 | | document.getElementById("comment-parent").value = "0"; |
| | 7 | function cancelCommentReply(respondId,respondRoot){ |
| | 8 | jQuery("#cancel-comment-reply").hide(); |
| | 9 | jQuery("#"+respondId).appendTo("#"+respondRoot); |
| | 10 | document.location.href="#respond"; |
| | 11 | jQuery("#comment").focus(); |
| | 12 | jQuery("#comment-parent").val("0"); |