2008-09-11 21:25:50 +02:00
|
|
|
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();
|
|
|
|
}
|
|
|
|
|
2008-09-12 23:19:40 +02:00
|
|
|
function cancelCommentReply(respondId, respondRoot) {
|
|
|
|
var addComment = document.getElementById(respondId);
|
2008-09-11 21:25:50 +02:00
|
|
|
var reRootElement = document.getElementById("cancel-comment-reply");
|
|
|
|
reRootElement.style.display = "none";
|
2008-09-12 23:19:40 +02:00
|
|
|
var content = document.getElementById(respondRoot);
|
2008-09-11 21:25:50 +02:00
|
|
|
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";
|
2008-09-30 19:27:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
jQuery(document).ready(function($){
|
|
|
|
$(".thread-odd").find("div.reply").css("display", "block");
|
|
|
|
$(".thread-even").find("div.reply").css("display", "block");
|
|
|
|
});
|