mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-14 06:36:47 +01:00
968d57a6b3
This updates the 4.5 branch to support the latest LTS version of NodeJS (currently 14.x), allowing the same version to be used across all WordPress branches that receive security updates as a courtesy. Because older branches use (really) old versions of NodeJS, the local Docker environment cannot be backported since the needed dependencies will not run on these older versions (see #48301). This also blocks the ability to move automated testing over to GitHub Actions (see #50401). This also replaces the `npm-shrinkwrap.json` with a `package-lock.json` file. Lock files were not supported in earlier versions of NPM, but can now be used. In addition to backporting the package updates that happened after branching 4.5, dependencies that were removed in future releases have also been updated to their latest versions. Props desrosj, dd32, netweb, jorbin. Merges [37185,37212,37612,38111,38688,39110,39113-39119,39478,42460-42461,42463,42887,43320,43323,43977,44219,44233,44728,45321,45765,46404,46408-46409,47404,47867-47869,47872-47873,48705,49636,49933,49937,49939,50017,50126,50176,50185,50192] to the 4.5 branch. See #52341. Built from https://develop.svn.wordpress.org/branches/4.5@50208 git-svn-id: http://core.svn.wordpress.org/branches/4.5@49880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 line
3.1 KiB
JavaScript
1 line
3.1 KiB
JavaScript
var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;jQuery(document).ready(function(o){var t,s=o("#welcome-panel"),e=o("#wp_welcome_panel-hide");t=function(e){o.post(ajaxurl,{action:"update-welcome-panel",visible:e,welcomepanelnonce:o("#welcomepanelnonce").val()})},s.hasClass("hidden")&&e.prop("checked")&&s.removeClass("hidden"),o(".welcome-panel-close, .welcome-panel-dismiss a",s).click(function(e){e.preventDefault(),s.addClass("hidden"),t(0),o("#wp_welcome_panel-hide").prop("checked",!1)}),e.click(function(){s.toggleClass("hidden",!this.checked),t(this.checked?1:0)}),ajaxWidgets=["dashboard_primary"],(ajaxPopulateWidgets=function(e){function t(e,t){var s,i=o("#"+t+" div.inside:visible").find(".widget-loading");i.length&&(s=i.parent(),setTimeout(function(){s.load(ajaxurl+"?action=dashboard-widgets&widget="+t+"&pagenow="+pagenow,"",function(){s.hide().slideDown("normal",function(){o(this).css("display","")})})},500*e))}e?(e=e.toString(),-1!==o.inArray(e,ajaxWidgets)&&t(0,e)):o.each(ajaxWidgets,t)})(),postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets}),(quickPressLoad=function(){var t,s,i,n,a,e=o("#quickpost-action");o('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!1),t=o("#quick-press").submit(function(e){e.preventDefault(),o("#dashboard_quick_press #publishing-action .spinner").show(),o('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!0),o.post(t.attr("action"),t.serializeArray(),function(e){var t;o("#dashboard_quick_press .inside").html(e),o("#quick-press").removeClass("initial-form"),quickPressLoad(),(t=o(".drafts ul li").first()).css("background","#fffbe5"),setTimeout(function(){t.css("background","none")},1e3),o("#title").focus()})}),o("#publish").click(function(){e.val("post-quickpress-publish")}),o("#title, #tags-input, #content").each(function(){var e=o(this),t=o("#"+this.id+"-prompt-text");""===this.value&&t.removeClass("screen-reader-text"),t.click(function(){o(this).addClass("screen-reader-text"),e.focus()}),e.blur(function(){""===this.value&&t.removeClass("screen-reader-text")}),e.focus(function(){t.addClass("screen-reader-text")})}),o("#quick-press").on("click focusin",function(){wpActiveEditor="content"}),document.documentMode&&document.documentMode<9||(o("body").append('<div class="quick-draft-textarea-clone" style="display: none;"></div>'),s=o(".quick-draft-textarea-clone"),i=o("#content"),n=i.height(),a=o(window).height()-100,s.css({"font-family":i.css("font-family"),"font-size":i.css("font-size"),"line-height":i.css("line-height"),"padding-bottom":i.css("paddingBottom"),"padding-left":i.css("paddingLeft"),"padding-right":i.css("paddingRight"),"padding-top":i.css("paddingTop"),"white-space":"pre-wrap","word-wrap":"break-word",display:"none"}),i.on("focus input propertychange",function(){var e=o(this),t=e.val()+" ",t=s.css("width",e.css("width")).text(t).outerHeight()+2;i.css("overflow-y","auto"),t===n||a<=t&&a<=n||(n=a<t?a:t,i.css("overflow","hidden"),e.css("height",n+"px"))}))})(),o(".meta-box-sortables").sortable("option","containment","#wpwrap")}); |