WordPress/wp-admin/js/privacy-tools.min.js
desrosj e22ba4ed45 Build/Test Tools: Backport GitHub Action and build improvements to the 5.4 branch.
This backports several build and test tool improvements to the 5.4 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.4 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.4@50604


git-svn-id: http://core.svn.wordpress.org/branches/5.4@50217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-26 18:21:57 +00:00

2 lines
3.9 KiB
JavaScript

/*! This file is auto-generated */
jQuery(document).ready(function(g){var h=window.privacyToolsL10n||{};function w(e,t){e.children().addClass("hidden"),e.children("."+t).removeClass("hidden")}function x(e){e.removeClass("has-request-results"),e.next().hasClass("request-results")&&e.next().remove()}function T(e,t,o,n){var a="",s="request-results";x(e),n.length&&(g.each(n,function(e,t){a=a+"<li>"+t+"</li>"}),a="<ul>"+a+"</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>'+o+"</p>"+a+"</div></td></tr>"})}g(".export-personal-data-handle").click(function(e){var t=g(this),s=t.parents(".export-personal-data"),r=t.parents("tr"),o=r.find(".export-progress"),i=t.parents(".row-actions"),c=s.data("request-id"),d=s.data("nonce"),u=s.data("exporters-count"),l=!!s.data("send-as-email");function p(e){w(s,"export-personal-data-failed"),e&&T(r,"notice-error",h.exportError,[e]),setTimeout(function(){i.removeClass("processing")},500)}function m(e){e=Math.round(100*(0<u?e/u:0)).toString()+"%";o.html(e)}e.preventDefault(),e.stopPropagation(),i.addClass("processing"),s.blur(),x(r),m(0),w(s,"export-personal-data-processing"),function t(n,a){g.ajax({url:window.ajaxurl,data:{action:"wp-privacy-export-personal-data",exporter:n,id:c,page:a,security:d,sendAsEmail:l},method:"post"}).done(function(e){var o=e.data;e.success?o.done?(m(n),n<u?setTimeout(t(n+1,1)):setTimeout(function(){var e,t;e=o.url,t=h.emailSent,w(s,"export-personal-data-success"),T(r,"notice-success",t,[]),void 0!==e?window.location=e:l||p(h.noExportFile),setTimeout(function(){i.removeClass("processing")},500)},500)):setTimeout(t(n,a+1)):setTimeout(function(){p(e.data)},500)}).fail(function(e,t,o){setTimeout(function(){p(o)},500)})}(1,1)}),g(".remove-personal-data-handle").click(function(e){var t=g(this),s=t.parents(".remove-personal-data"),r=t.parents("tr"),o=r.find(".erasure-progress"),i=t.parents(".row-actions"),c=s.data("request-id"),d=s.data("nonce"),u=s.data("erasers-count"),l=!1,p=!1,m=[];function f(){w(s,"remove-personal-data-failed"),T(r,"notice-error",h.removalError,[]),setTimeout(function(){i.removeClass("processing")},500)}function v(e){e=Math.round(100*(0<u?e/u:0)).toString()+"%";o.html(e)}e.preventDefault(),e.stopPropagation(),i.addClass("processing"),s.blur(),x(r),v(0),w(s,"remove-personal-data-processing"),function o(n,a){g.ajax({url:window.ajaxurl,data:{action:"wp-privacy-erase-personal-data",eraser:n,id:c,page:a,security:d},method:"post"}).done(function(e){var t=e.data;e.success?(t.items_removed&&(l=l||t.items_removed),t.items_retained&&(p=p||t.items_retained),t.messages&&(m=m.concat(t.messages)),t.done?(v(n),n<u?setTimeout(o(n+1,1)):setTimeout(function(){var e,t;e=h.noDataFound,t="notice-success",w(s,"remove-personal-data-success"),!1===l?!1===p?e=h.noDataFound:(e=h.noneRemoved,t="notice-warning"):!1===p?e=h.foundAndRemoved:(e=h.someNotRemoved,t="notice-warning"),T(r,t,e,m),setTimeout(function(){i.removeClass("processing")},500)},500)):setTimeout(o(n,a+1))):setTimeout(function(){f()},500)}).fail(function(){setTimeout(function(){f()},500)})}(1,1)}),g(document).on("click",function(e){var t,o,e=g(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{var n=document.documentElement.scrollTop,a=document.body.scrollTop;window.getSelection().removeAllRanges(),o=document.createRange(),t.addClass("hide-privacy-policy-tutorial"),o.selectNodeContents(t[0]),window.getSelection().addRange(o),document.execCommand("copy"),t.removeClass("hide-privacy-policy-tutorial"),window.getSelection().removeAllRanges(),0<n&&n!==document.documentElement.scrollTop?document.documentElement.scrollTop=n:0<a&&a!==document.body.scrollTop&&(document.body.scrollTop=a)}catch(e){}})});