Changeset 9114 for trunk/wp-includes/js/comment-reply.js
- Timestamp:
- 10/09/2008 08:27:39 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/comment-reply.js
r9113 r9114 2 2 addComment = { 3 3 moveForm : function(commId, parentId, respondId) { 4 var t = this, div, comm = t.I(commId), respond = t.I(respondId); 5 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'); 5 6 if ( ! comm || ! respond || ! cancel || ! parent ) 7 return; 8 6 9 t.respondId = respondId; 7 10 8 11 if ( ! t.I('wp-temp-form-div') ) { 9 12 div = document.createElement('div'); … … 14 17 15 18 comm.parentNode.insertBefore(respond, comm.nextSibling); 16 17 t.I('comment_parent').value = parentId; 18 19 t.I('cancel-comment-reply-link').style.display = ''; 20 t.I('cancel-comment-reply-link').onclick = function() { 19 parent.value = parentId; 20 cancel.style.display = ''; 21 22 cancel.onclick = function() { 21 23 var t = addComment, temp = t.I('wp-temp-form-div'), respond = t.I(t.respondId); 22 24 25 if ( ! temp || ! respond ) 26 return; 27 23 28 t.I('comment_parent').value = '0'; 24 29 temp.parentNode.insertBefore(respond, temp); 25 30 temp.parentNode.removeChild(temp); 26 t .I('cancel-comment-reply-link').style.display = 'none';27 t .I('cancel-comment-reply-link').onclick = null;31 this.style.display = 'none'; 32 this.onclick = null; 28 33 return false; 29 34 } 30 t.I('comment').focus(); 35 36 try { t.I('comment').focus(); } 37 catch(e) {} 38 39 return false; 31 40 }, 32 41 33 42 I : function(e) { 34 43 return document.getElementById(e);
Note: See TracChangeset
for help on using the changeset viewer.