Posted by Ben on Wed 4 Feb 11:57
report abuse | download | new post
- /* /wp-includes/js/comment-reply.js */
- addComment = {
- moveForm : function(commId, parentId, respondId, postId) {
- CommentTinyMCE_remove();
- 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');
- if ( ! comm || ! respond || ! cancel || ! parent )
- return;
- t.respondId = respondId;
- postId = postId || false;
- if ( ! t.I('wp-temp-form-div') ) {
- div = document.createElement('div');
- div.id = 'wp-temp-form-div';
- div.style.display = 'none';
- respond.parentNode.insertBefore(div, respond);
- }
- comm.parentNode.insertBefore(respond, comm.nextSibling);
- if ( post && postId )
- post.value = postId;
- parent.value = parentId;
- cancel.style.display = '';
- cancel.onclick = function() {
- CommentTinyMCE_remove();
- var t = addComment, temp = t.I('wp-temp-form-div'), respond = t.I(t.respondId);
- if ( ! temp || ! respond )
- return;
- t.I('comment_parent').value = '0';
- temp.parentNode.insertBefore(respond, temp);
- temp.parentNode.removeChild(temp);
- this.style.display = 'none';
- this.onclick = null;
- CommentTinyMCE_add();
- return false;
- }
- CommentTinyMCE_add();
- try { t.I('comment').focus(); }
- catch(e) {}
- return false;
- },
- I : function(e) {
- return document.getElementById(e);
- }
- }
- function CommentTinyMCE_remove() {
- try {
- tinyMCE.triggerSave();
- tinyMCE.execCommand('mceFocus', false,'comment');
- tinyMCE.execCommand('mceRemoveControl', false,'comment');
- } catch(el) {}
- }
- function CommentTinyMCE_add() {
- try {
- tinyMCE.execCommand('mceAddControl', false, 'comment');
- } catch (e) {}
- }
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.