2014-11-16 03:22:21 +01:00
|
|
|
var showNotice,adminMenu,columns,validateForm,screenMeta;!function(a,b){adminMenu={init:function(){},fold:function(){},restoreMenuState:function(){},toggle:function(){},favorites:function(){}},columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var c=a(this),d=c.val();c.prop("checked")?b.checked(d):b.unchecked(d),columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show(),this.colSpanChange(1)},unchecked:function(b){a(".column-"+b).hide(),this.colSpanChange(-1)},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var a=this.id;return a.substring(a,a.length-5)}).get().join(",")}},colSpanChange:function(b){var c,d=a("table").find(".colspanchange");d.length&&(c=parseInt(d.attr("colspan"),10)+b,d.attr("colspan",c.toString()))}},a(document).ready(function(){columns.init()}),validateForm=function(b){return!a(b).find(".form-required").filter(function(){return""===a("input:visible",this).val()}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()},showNotice={warn:function(){var a=commonL10n.warnDelete||"";return confirm(a)?!0:!1},note:function(a){alert(a)}},screenMeta={element:null,toggles:null,page:null,init:function(){this.element=a("#screen-meta"),this.toggles=a(".screen-meta-toggle a"),this.page=a("#wpcontent"),this.toggles.click(this.toggleEvent)},toggleEvent:function(b){var c=a(this.href.replace(/.+#/,"#"));b.preventDefault(),c.length&&(c.is(":visible")?screenMeta.close(c,a(this)):screenMeta.open(c,a(this)))},open:function(b,c){a(".screen-meta-toggle").not(c.parent()).css("visibility","hidden"),b.parent().show(),b.slideDown("fast",function(){b.focus(),c.addClass("screen-meta-active").attr("aria-expanded",!0)}),a(document).trigger("screen:options:open")},close:function(b,c){b.slideUp("fast",function(){c.removeClass("screen-meta-active").attr("aria-expanded",!1),a(".screen-meta-toggle").css("visibility",""),b.parent().hide()}),a(document).trigger("screen:options:close")}},a(".contextual-help-tabs").delegate("a","click",function(b){var c,d=a(this);return b.preventDefault(),d.is(".active a")?!1:(a(".contextual-help-tabs .active").removeClass("active"),d.parent("li").addClass("active"),c=a(d.attr("href")),a(".help-tab-content").not(c).removeClass("active").hide(),void c.addClass("active").show())}),a(document).ready(function(){function c(a){var b,c,d,e,f,g,h,i=a.find(".wp-submenu");f=a.offset().top,g=v.scrollTop(),h=f-g-30,b=f+i.height()+1,c=y.height(),d=60+b-c,e=v.height()+g-50,b-d>e&&(d=b-e),d>h&&(d=h),d>1?i.css("margin-top","-"+d+"px"):i.css("margin-top","")}function d(){var a=v.scrollTop();if(!(r||t||z.data("wp-responsive"))){if(K.menu+K.adminbar+20>K.wpwrap)return void e();K.menu+K.adminbar>K.window&&(a>G?H?(H=!1,J=x.offset().top-K.adminbar-(a-G),J+K.menu+K.adminbar<a+K.window&&(J=a+K.window-K.menu-K.adminbar),x.css({position:"absolute",top:J,bottom:""})):!I&&x.offset().top+K.menu<a+K.window&&(I=!0,x.css({position:"fixed",top:"",bottom:0})):G>a?I?(I=!1,J=x.offset().top-K.adminbar+(G-a),J+K.menu>a+K.window&&(J=a),x.css({position:"absolute",top:J,bottom:""})):!H&&x.offset().top>=a+K.adminbar&&(H=!0,x.css({position:"fixed",top:"",bottom:""})):(H=I=!1,J=a+K.window-K.menu-K.adminbar-1,J>0?x.css({position:"absolute",top:J,bottom:""}):e())),G=a}}function e(){r||(H=I=!1,x.css({position:"",top:"",bottom:""}))}function f(){z.data("wp-responsive")?(w.removeClass("sticky-menu"),e()):K.menu+K.adminbar>K.window?(d(),w.removeClass("sticky-menu")):(w.addClass("sticky-menu"),e())}var g,h,i,j,k,l,m,n,o=!1,p=a("input.current-page"),q=p.val(),r=/iPhone|iPad|iPod/.test(navigator.userAgent),s=-1!==navigator.userAgent.indexOf("Android"),t=a(document.documentElement).h
|