X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/7688c6ba71852cd89123b62b2d57683535e4702a..refs/tags/wordpress-3.2:/wp-admin/js/categories.js diff --git a/wp-admin/js/categories.js b/wp-admin/js/categories.js index 3cee6c68..45c2358a 100644 --- a/wp-admin/js/categories.js +++ b/wp-admin/js/categories.js @@ -1,16 +1 @@ -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').unescapeHTML(); - 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; - }; -}); +jQuery(document).ready(function(d){var b=false,e,c,a;if(document.forms.addcat.category_parent){b=document.forms.addcat.category_parent.options}e=function(h,g){var f,i;f=d(""+d("name",h).text()+"").text();i=d("cat",h).attr("id");b[b.length]=new Option(f,i)};a=function(g,f){var i=d("cat",g).attr("id"),h;for(h=0;h