CoreFiles by mySites.guru
comment-reply.js45 lines, 1,107 bytes, from wordpress-2.7-beta2.zip
Raw History Compare with 2.7-beta1
md5
a4ca2cf838201f28f10d0ebc78d075f9
sha1
888d8223bfb9e72c503280eacb9768704f8e17b9
sha256
667e737d6de145b2c8a0354ca43962ea192b393a7cd3c6e37e36072b1b3c5749

addComment = {
	moveForm : function(commId, parentId, respondId) {
		var t = this, div, comm = t.I(commId), respond = t.I(respondId), cancel = t.I('cancel-comment-reply-link'), parent = t.I('comment_parent');

		if ( ! comm || ! respond || ! cancel || ! parent )
			return;

		t.respondId = respondId;

		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);
		parent.value = parentId;
		cancel.style.display = '';

		cancel.onclick = function() {
			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;
			return false;
		}

		try { t.I('comment').focus(); }
		catch(e) {}

		return false;
	},

	I : function(e) {
		return document.getElementById(e);
	}
}

The same content is in 5 releases, WordPress 2.7-beta1 to 2.7-RC2. See them all, or every version of this file.