2009-07-21 05:11:12 +02:00
|
|
|
var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){a("#adminmenu div.wp-menu-toggle").each(function(){if(a(this).siblings(".wp-submenu").length){a(this).click(function(){adminMenu.toggle(a(this).siblings(".wp-submenu"))})}else{a(this).hide()}});this.favorites();a("a.separator").click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("#adminmenu li.wp-has-submenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){b.slideToggle(150,function(){b.css("display","")}).parent().toggleClass("wp-menu-open");a("#adminmenu li.wp-has-submenu").each(function(d,f){var c=a(f).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+d,c)});return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=d.parent().offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a("body").scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)});a("#favorite-toggle, #favorite-inside").bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){a(".hide-column-tog").click(function(){var c=a(this).val(),b=a(this).attr("checked");if(b){a(".column-"+c).show()}else{a(".column-"+c).hide()}columns.save_manage_columns_state()})},save_manage_columns_state:function(){var b=a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",");a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})}};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").change(function(){a(this).removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(d){var f=false,a,e,c,b;d(".fade").animate({backgroundColor:"#ffffe0"},300).animate({backgroundColor:"#fffbcc"},300).animate({backgroundColor:"#ffffe0"},300).animate({backgroundColor:"#fffbcc"},300);d("div.wrap h2 ~ div.updated, div.wrap h2 ~ div.error").addClass("below-h2");d("div.updated, div.error").not(".below-h2").insertAfter("div.wrap h2:first");d("#doaction, #doaction2").click(function(){if(d('select[name="action"]').val()=="destroy"||d('select[name="action2"]').val()=="destroy"){return showNotice.warn()}});d("#destroy_all, #destroy_all2").click(function(){return showNotice.warn()});d("#show-settings-link").click(function(){if(!d("#screen-options-wrap").hasClass("screen-options-open")){d("#contextual-help-link-wrap").css("visibility","hidden")}d("#screen-options-wrap").slideToggle("fast",function(
|