2019-10-05 15:49:10 -04:00
|
|
|
jQuery(document).ready(function(i){var t,s,e,c=!1;i("#link_name").focus(),postboxes.add_postbox_toggles("link"),i("#category-tabs a").click(function(){var t=i(this).attr("href");return i(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),i(".tabs-panel").hide(),i(t).show(),"#categories-all"==t?deleteUserSetting("cats"):setUserSetting("cats","pop"),!1}),getUserSetting("cats")&&i('#category-tabs a[href="#categories-pop"]').click(),t=i("#newcat").one("focus",function(){i(this).val("").removeClass("form-input-tip")}),i("#link-category-add-submit").click(function(){t.focus()}),s=function(){if(!c){c=!0;var t=i(this),e=t.is(":checked"),a=t.val().toString();i("#in-link-category-"+a+", #in-popular-link_category-"+a).prop("checked",e),c=!1}},e=function(t,e){i(e.what+" response_data",t).each(function(){i(i(this).text()).find("label").each(function(){var t=i(this),e=t.find("input").val(),a=t.find("input")[0].id,c=i.trim(t.text());i("#"+a).change(s),i('<option value="'+parseInt(e,10)+'"></option>').text(c)})})},i("#categorychecklist").wpList({alt:"",what:"link-category",response:"category-ajax-response",addAfter:e}),i('a[href="#categories-all"]').click(function(){deleteUserSetting("cats")}),i('a[href="#categories-pop"]').click(function(){setUserSetting("cats","pop")}),"pop"==getUserSetting("cats")&&i('a[href="#categories-pop"]').click(),i("#category-add-toggle").click(function(){return i(this).parents("div:first").toggleClass("wp-hidden-children"),i('#category-tabs a[href="#categories-all"]').click(),i("#newcategory").focus(),!1}),i(".categorychecklist :checkbox").change(s).filter(":checked").change()});
|