mp-wp_genesis 1
mp-wp_genesis 2 addComment = {
mp-wp_genesis 3 moveForm : function(commId, parentId, respondId, postId) {
mp-wp_genesis 4 var t = this, div, comm = t.I(commId), respond = t.I(respondId), cancel = t.I('cancel-comment-reply-link'), parent = t.I('comment_parent'), post = t.I('comment_post_ID');
mp-wp_genesis 5
mp-wp_genesis 6 if ( ! comm || ! respond || ! cancel || ! parent )
mp-wp_genesis 7 return;
mp-wp_genesis 8
mp-wp_genesis 9 t.respondId = respondId;
mp-wp_genesis 10 postId = postId || false;
mp-wp_genesis 11
mp-wp_genesis 12 if ( ! t.I('wp-temp-form-div') ) {
mp-wp_genesis 13 div = document.createElement('div');
mp-wp_genesis 14 div.id = 'wp-temp-form-div';
mp-wp_genesis 15 div.style.display = 'none';
mp-wp_genesis 16 respond.parentNode.insertBefore(div, respond);
mp-wp_genesis 17 }
mp-wp_genesis 18
mp-wp_genesis 19 comm.parentNode.insertBefore(respond, comm.nextSibling);
mp-wp_genesis 20 if ( post && postId )
mp-wp_genesis 21 post.value = postId;
mp-wp_genesis 22 parent.value = parentId;
mp-wp_genesis 23 cancel.style.display = '';
mp-wp_genesis 24
mp-wp_genesis 25 cancel.onclick = function() {
mp-wp_genesis 26 var t = addComment, temp = t.I('wp-temp-form-div'), respond = t.I(t.respondId);
mp-wp_genesis 27
mp-wp_genesis 28 if ( ! temp || ! respond )
mp-wp_genesis 29 return;
mp-wp_genesis 30
mp-wp_genesis 31 t.I('comment_parent').value = '0';
mp-wp_genesis 32 temp.parentNode.insertBefore(respond, temp);
mp-wp_genesis 33 temp.parentNode.removeChild(temp);
mp-wp_genesis 34 this.style.display = 'none';
mp-wp_genesis 35 this.onclick = null;
mp-wp_genesis 36 return false;
mp-wp_genesis 37 }
mp-wp_genesis 38
mp-wp_genesis 39 try { t.I('comment').focus(); }
mp-wp_genesis 40 catch(e) {}
mp-wp_genesis 41
mp-wp_genesis 42 return false;
mp-wp_genesis 43 },
mp-wp_genesis 44
mp-wp_genesis 45 I : function(e) {
mp-wp_genesis 46 return document.getElementById(e);
mp-wp_genesis 47 }
mp-wp_genesis 48 }