WordPress/wp-admin/js/xfn.min.js
Aaron Jorbin a870c7e8f3 Build/Test: Update dependencies for 5.0
Updates package dependencies to more modern versions, also adds .nvmrc and package-lock.json as followups to [43683] and [43571].

See #44600.
Fixes #45064.


Built from https://develop.svn.wordpress.org/branches/5.0@43684


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-09 02:52:45 +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),r=t.parents(".export-personal-data"),a=t.parents("tr"),i=r.data("request-id"),d=r.data("nonce"),l=r.data("exporters-count"),c=!!r.data("send-as-email");function u(e){h(r,"export-personal-data-failed"),e&&x(a,"notice-error",f.exportError,[e])}e.preventDefault(),e.stopPropagation(),r.blur(),g(a),h(r,"export-personal-data-processing"),function n(o,s){v.ajax({url:window.ajaxurl,data:{action:"wp-privacy-export-personal-data",exporter:o,id:i,page:s,security:d,sendAsEmail:c},method:"post"}).done(function(e){var t,a=e.data;e.success?a.done?o<l?setTimeout(n(o+1,1)):(t=a.url,h(r,"export-personal-data-success"),void 0!==t?window.location=t:c||u(f.noExportFile)):setTimeout(n(o,s+1)):u(e.data)}).fail(function(e,t,a){u(a)})}(1,1)}),v(".remove-personal-data-handle").click(function(e){var t=v(this),r=t.parents(".remove-personal-data"),i=t.parents("tr"),a=r.data("request-id"),d=r.data("nonce"),l=r.data("erasers-count"),c=!1,u=!1,p=[];function m(){h(r,"remove-personal-data-failed"),x(i,"notice-error",f.removalError,[])}e.stopPropagation(),r.blur(),g(i),h(r,"remove-personal-data-processing"),function n(o,s){v.ajax({url:window.ajaxurl,data:{action:"wp-privacy-erase-personal-data",eraser:o,id:a,page:s,security:d},method:"post"}).done(function(e){var t,a=e.data;e.success?(a.items_removed&&(c=c||a.items_removed),a.items_retained&&(u=u||a.items_retained),a.messages&&(p=p.concat(a.messages)),a.done?o<l?setTimeout(n(o+1,1)):(t=f.noDataFound,h(r,"remove-personal-data-idle"),t=!1===c?!1===u?f.noDataFound:f.noneRemoved:!1===u?f.foundAndRemoved:f.someNotRemoved,x(i,"notice-success",t,p)):setTimeout(n(o,s+1))):m()}).fail(function(){m()})}(1,1)})}),function(s){s(document).on("click",function(e){var t,a,n,o=s(e.target);if(o.is("button.privacy-text-copy")&&((a=(t=o.parent().parent()).find("div.wp-suggested-text")).length||(a=t.find("div.policy-text")),a.length))try{window.getSelection().removeAllRanges(),n=document.createRange(),a.addClass("hide-privacy-policy-tutorial"),n.selectNodeContents(a[0]),window.getSelection().addRange(n),document.execCommand("copy"),a.removeClass("hide-privacy-policy-tutorial"),window.getSelection().removeAllRanges()}catch(e){}})}(jQuery);