| 1 |
if("undefined"!=typeof(inlineEditTax)){(function(b){var a=inlineEditTax.edit;inlineEditTax.edit=function(g){a.apply(this,arguments);var d=0;if(typeof(g)=="object"){d=parseInt(this.getId(g))}if(d>0){var f=b("#edit-"+d);var c=f.find(':input[name="inline_lang_choice"]');c.find("option:selected").removeProp("selected");var e=b("#lang_"+d).html();b("input[name='old_lang']").val(e);c.find('option[value="'+e+'"]').prop("selected",true)}}})(jQuery)}jQuery(document).ready(function(b){function a(){b(".tr_lang").each(function(){var c=b(this).attr("id").substring(8);var d=b(this).parent().siblings(".pll-edit-column");b(this).autocomplete({minLength:0,source:ajaxurl+"?action=pll_terms_not_translated&term_language="+b("#term_lang_choice").val()+"&term_id="+b("input[name='tag_ID']").val()+"&taxonomy="+b("input[name='taxonomy']").val()+"&translation_language="+c+"&post_type="+typenow+"&_pll_nonce="+b("#_pll_nonce").val(),select:function(e,f){b("#htr_lang_"+c).val(f.item.id);d.html(f.item.link)}});b(this).blur(function(){if(!b(this).val()){b("#htr_lang_"+c).val(0);d.html(d.siblings(".hidden").children().clone())}})})}a();b("#term_lang_choice").change(function(){var c={action:"term_lang_choice",lang:b(this).val(),term_id:b("input[name='tag_ID']").val(),taxonomy:b("input[name='taxonomy']").val(),post_type:typenow,_pll_nonce:b("#_pll_nonce").val()};b.post(ajaxurl,c,function(d){var e=wpAjax.parseAjaxResponse(d,"ajax-response");b.each(e.responses,function(){switch(this.what){case"translations":b("#term-translations").html(this.data);a();break;case"parent":b("#parent").replaceWith(this.data);break;case"tag_cloud":b(".tagcloud").replaceWith(this.data);break;default:break}})})})}); |