CoreFiles by mySites.guru
categories.js16 lines, 726 bytes, from wordpress-2.1.zip
Raw History Compare with 2.0.11
md5
feedd6ae867a53792e962dc8dbf4e24c
sha1
e00f6c598395575daf7506c656a3c3b958b29619
sha256
670cfee5b96008219a1a1021fc3a1fb7c0cd54d029b556e823bbac3ab2a09df0
addLoadEvent(function() {
	if (!theList.theList) return false;
	document.forms.addcat.submit.onclick = function(e) {return killSubmit('theList.ajaxAdder("cat", "addcat");', e); };
	theList.addComplete = function(what, where, update, transport) {
		var name = getNodeValue(transport.responseXML, 'name');
		var id = transport.responseXML.getElementsByTagName(what)[0].getAttribute('id');
		var options = document.forms['addcat'].category_parent.options;
		options[options.length] = new Option(name, id);
	};
	theList.delComplete = function(what, id) {
		var options = document.forms['addcat'].category_parent.options;
		for ( var o = 0; o < options.length; o++ )
			if ( id == options[o].value )
				options[o] = null;
	};
});

The same content is in 15 releases, WordPress 2.1-beta1 to 2.1.3. See them all, or every version of this file.