WordPress/wp-admin/js/xfn.min.js
desrosj 36cc3aab1a Build/Test Tools: Backport GitHub Action and build improvements to the 5.2 branch.
This backports several build and test tool improvements to the 5.2 branch. Most notably, this includes:

- The changes required to allow each workflow to be triggered by the `workflow_dispatch` event so that tests can be run on a schedule [50590].
- The ability to run PHPUnit tests from `src` instead of `build` [50441-50443].
- Splitting single site and multisite tests into parallel jobs [50379].
- Split slow tests into separate, parallel jobs for PHP 5.6 [50444].
- Better branch and path scoping for GitHub Action workflows when running on `pull_request` [50432,50479].
- Several `devDependency` updates.

Merges [50267,50299,50379,50387,50413,50416,50432,50435-50436,50441-50444,50446,50473-50474,50476,50479,50485-50487,50545,50579,50590,50598] to the 5.2 branch.
See #50401, #51734, #51801, #51802, #52548, #52608, #52612, #52623, #52624, #52625, #52645, #52653, #52658, #52660, #52667.
Built from https://develop.svn.wordpress.org/branches/5.2@50606


git-svn-id: http://core.svn.wordpress.org/branches/5.2@50219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-26 20:03:48 +00:00

1 line
3.3 KiB
JavaScript

jQuery(document).ready(function(a){a("#link_rel").prop("readonly",!0),a("#linkxfndiv input").bind("click keyup",function(){var e=a("#me").is(":checked"),t="";a("input.valinp").each(function(){e?a(this).prop("disabled",!0).parent().addClass("disabled"):(a(this).removeAttr("disabled").parent().removeClass("disabled"),a(this).is(":checked")&&""!==a(this).val()&&(t+=a(this).val()+" "))}),a("#link_rel").val(e?"me":t.substr(0,t.length-1))})}),jQuery(document).ready(function(v){var f=window.privacyToolsL10n||{};function h(e,t){e.children().hide(),e.children("."+t).show()}function g(e){e.removeClass("has-request-results"),e.next().hasClass("request-results")&&e.next().remove()}function x(e,t,a,n){var o="",s="request-results";g(e),n.length&&(v.each(n,function(e,t){o=o+"<li>"+t+"</li>"}),o="<ul>"+o+"</ul>"),e.addClass("has-request-results"),e.hasClass("status-request-confirmed")&&(s+=" status-request-confirmed"),e.hasClass("status-request-failed")&&(s+=" status-request-failed"),e.after(function(){return'<tr class="'+s+'"><th colspan="5"><div class="notice inline notice-alt '+t+'"><p>'+a+"</p>"+o+"</div></td></tr>"})}v(".export-personal-data-handle").click(function(e){var t=v(this),s=t.parents(".export-personal-data"),a=t.parents("tr"),r=s.data("request-id"),i=s.data("nonce"),d=s.data("exporters-count"),l=!!s.data("send-as-email");function c(e){h(s,"export-personal-data-failed"),e&&x(a,"notice-error",f.exportError,[e])}e.preventDefault(),e.stopPropagation(),s.blur(),g(a),h(s,"export-personal-data-processing"),function a(n,o){v.ajax({url:window.ajaxurl,data:{action:"wp-privacy-export-personal-data",exporter:n,id:r,page:o,security:i,sendAsEmail:l},method:"post"}).done(function(e){var t=e.data;e.success?t.done?n<d?setTimeout(a(n+1,1)):(t=t.url,h(s,"export-personal-data-success"),void 0!==t?window.location=t:l||c(f.noExportFile)):setTimeout(a(n,o+1)):c(e.data)}).fail(function(e,t,a){c(a)})}(1,1)}),v(".remove-personal-data-handle").click(function(e){var t=v(this),s=t.parents(".remove-personal-data"),r=t.parents("tr"),i=s.data("request-id"),d=s.data("nonce"),l=s.data("erasers-count"),c=!1,u=!1,p=[];function m(){h(s,"remove-personal-data-failed"),x(r,"notice-error",f.removalError,[])}e.stopPropagation(),s.blur(),g(r),h(s,"remove-personal-data-processing"),function a(n,o){v.ajax({url:window.ajaxurl,data:{action:"wp-privacy-erase-personal-data",eraser:n,id:i,page:o,security:d},method:"post"}).done(function(e){var t=e.data;e.success?(t.items_removed&&(c=c||t.items_removed),t.items_retained&&(u=u||t.items_retained),t.messages&&(p=p.concat(t.messages)),t.done?n<l?setTimeout(a(n+1,1)):(t=f.noDataFound,h(s,"remove-personal-data-idle"),t=!1===c?!1===u?f.noDataFound:f.noneRemoved:!1===u?f.foundAndRemoved:f.someNotRemoved,x(r,"notice-success",t,p)):setTimeout(a(n,o+1))):m()}).fail(function(){m()})}(1,1)})}),function(n){n(document).on("click",function(e){var t,a,e=n(e.target);if(e.is("button.privacy-text-copy")&&(t=!(t=(e=e.parent().parent()).find("div.wp-suggested-text")).length?e.find("div.policy-text"):t).length)try{window.getSelection().removeAllRanges(),a=document.createRange(),t.addClass("hide-privacy-policy-tutorial"),a.selectNodeContents(t[0]),window.getSelection().addRange(a),document.execCommand("copy"),t.removeClass("hide-privacy-policy-tutorial"),window.getSelection().removeAllRanges()}catch(e){}})}(jQuery);