WordPress/wp-admin/js/dashboard.min.js
Bot (Assets) 6e798324e9 New develop.svn.wordpress.org repository based on the old core.svn repository.
* All WordPress files move to a src/ directory.
 * New task runner (Grunt), configured to copy a built WordPress to build/.
 * svn:ignore and .gitignore for Gruntfile.js, wp-config.php, and node.js.
 * Remove Akismet external from develop.svn. Still exists in core.svn.
 * Drop minified files from src/. The build process will now generate these.

props koop.
see #24976.

and see http://wp.me/p2AvED-1AI.


Built from https://develop.svn.wordpress.org/trunk@25001


git-svn-id: http://core.svn.wordpress.org/trunk@25001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-07 05:49:02 +00:00

1 line
2.4 KiB
JavaScript

var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;jQuery(document).ready(function(a){var b=a("#welcome-panel"),c=a("#wp_welcome_panel-hide"),d=function(b){a.post(ajaxurl,{action:"update-welcome-panel",visible:b,welcomepanelnonce:a("#welcomepanelnonce").val()})};b.hasClass("hidden")&&c.prop("checked")&&b.removeClass("hidden"),a(".welcome-panel-close, .welcome-panel-dismiss a",b).click(function(c){c.preventDefault(),b.addClass("hidden"),d(0),a("#wp_welcome_panel-hide").prop("checked",!1)}),c.click(function(){b.toggleClass("hidden",!this.checked),d(this.checked?1:0)}),ajaxWidgets=["dashboard_incoming_links","dashboard_primary","dashboard_secondary","dashboard_plugins"],ajaxPopulateWidgets=function(b){function c(b,c){var d,e=a("#"+c+" div.inside:visible").find(".widget-loading");e.length&&(d=e.parent(),setTimeout(function(){d.load(ajaxurl+"?action=dashboard-widgets&widget="+c,"",function(){d.hide().slideDown("normal",function(){a(this).css("display","")})})},500*b))}b?(b=b.toString(),-1!=a.inArray(b,ajaxWidgets)&&c(0,b)):a.each(ajaxWidgets,c)},ajaxPopulateWidgets(),postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets}),quickPressLoad=function(){var b,c=a("#quickpost-action");b=a("#quick-press").submit(function(){return a("#dashboard_quick_press #publishing-action .spinner").show(),a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!0),"post"==c.val()&&c.val("post-quickpress-publish"),a("#dashboard_quick_press div.inside").load(b.attr("action"),b.serializeArray(),function(){a("#dashboard_quick_press #publishing-action .spinner").hide(),a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!1),a("#dashboard_quick_press ul").next("p").remove(),a("#dashboard_quick_press ul").find("li").each(function(){a("#dashboard_recent_drafts ul").prepend(this)}).end().remove(),quickPressLoad()}),!1}),a("#publish").click(function(){c.val("post-quickpress-publish")}),a("#title, #tags-input").each(function(){var b=a(this),c=a("#"+this.id+"-prompt-text");""===this.value&&c.removeClass("screen-reader-text"),c.click(function(){a(this).addClass("screen-reader-text"),b.focus()}),b.blur(function(){""===this.value&&c.removeClass("screen-reader-text")}),b.focus(function(){c.addClass("screen-reader-text")})}),a("#quick-press").on("click focusin",function(){wpActiveEditor="content"})},quickPressLoad()});