-jQuery(function($) {
- var options = false
-
- var addAfter = function( r, settings ) {
- var name = $("<span>" + $('name', r).text() + "</span>").html();
- var id = $('tag', r).attr('id');
- options[options.length] = new Option(name, id);
-
- }
-
- var addAfter2 = function( x, r ) {
- var t = $(r.parsed.responses[0].data);
- if ( t.length == 1 )
- inlineEditTax.addEvents($(t.id));
- }
-
- var delAfter = function( r, settings ) {
- var id = $('tag', r).attr('id');
- for ( var o = 0; o < options.length; o++ )
- if ( id == options[o].value )
- options[o] = null;
- }
-
- if ( options )
- $('#the-list').wpList( { addAfter: addAfter, delAfter: delAfter } );
- else
- $('#the-list').wpList({ addAfter: addAfter2 });
-
- columns.init('edit-tags');
-});
\ No newline at end of file
+jQuery(document).ready(function(a){a(".delete-tag").live("click",function(g){var b=a(this),f=b.parents("tr"),c=true,d;if("undefined"!=showNotice){c=showNotice.warn()}if(c){d=b.attr("href").replace(/[^?]*\?/,"").replace(/action=delete/,"action=delete-tag");a.post(ajaxurl,d,function(e){if("1"==e){a("#ajax-response").empty();f.fadeOut("normal",function(){f.remove()});a("select#parent option[value="+d.match(/tag_ID=(\d+)/)[1]+"]").remove();a("a.tag-link-"+d.match(/tag_ID=(\d+)/)[1]).remove()}else{if("-1"==e){a("#ajax-response").empty().append('<div class="error"><p>'+tagsl10n.noPerm+"</p></div>");f.children().css("backgroundColor","")}else{a("#ajax-response").empty().append('<div class="error"><p>'+tagsl10n.broken+"</p></div>");f.children().css("backgroundColor","")}}});f.children().css("backgroundColor","#f33")}return false});a("#submit").click(function(){var b=a(this).parents("form");if(!validateForm(b)){return false}a.post(ajaxurl,a("#addtag").serialize(),function(h){a("#ajax-response").empty();var f=wpAjax.parseAjaxResponse(h,"ajax-response");if(!f){return}var g=b.find("select#parent").val();if(g>0&&a("#tag-"+g).length>0){a(".tags #tag-"+g).after(f.responses[0].supplemental.noparents)}else{a(".tags").prepend(f.responses[0].supplemental.parents)}a(".tags .no-items").remove();if(b.find("select#parent")){var e=f.responses[1].supplemental;var c="";for(var d=0;d<f.responses[1].position;d++){c+=" "}b.find("select#parent option:selected").after('<option value="'+e.term_id+'">'+c+e.name+"</option>")}a('input[type="text"]:visible, textarea:visible',b).val("")});return false})});
\ No newline at end of file