WordPress/wp-admin/js/edit-comments.min.js

2 lines
15 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
!function(E){var R,l,I,L,T,p,j,D,s,i,r=document.title,O=E("#dashboard_right_now").length,u=wp.i18n.__;R=function(t){var e=parseInt(t.html().replace(/[^0-9]+/g,""),10);return isNaN(e)?0:e},l=function(t,e){var n="";if(!isNaN(e)){if(3<(e=e<1?"0":e.toString()).length){for(;3<e.length;)n=thousandsSeparator+e.substr(e.length-3)+n,e=e.substr(0,e.length-3);e+=n}t.html(e)}},T=function(n,t){var e,a,o=".post-com-count-"+t,s="comment-count-no-comments",i="comment-count-approved";I("span.approved-count",n),t&&(e=E("span."+i,o),a=E("span."+s,o),e.each(function(){var t=E(this),e=R(t)+n;e<1&&(e=0),0===e?t.removeClass(i).addClass(s):t.addClass(i).removeClass(s),l(t,e)}),a.each(function(){var t=E(this);0<n?t.removeClass(s).addClass(i):t.addClass(s).removeClass(i),l(t,n)}))},I=function(t,n){E(t).each(function(){var t=E(this),e=R(t)+n;e<1&&(e=0),l(t,e)})},j=function(t){O&&t&&t.i18n_comments_text&&E(".comment-count a","#dashboard_right_now").text(t.i18n_comments_text)},D=function(t){t&&t.i18n_moderation_text&&(E(".comments-in-moderation-text").text(t.i18n_moderation_text),O&&t.in_moderation&&E(".comment-mod-count","#dashboard_right_now")[0<t.in_moderation?"removeClass":"addClass"]("hidden"))},p=function(t){var e,n,a,o;i=i||new RegExp(u("Comments (%s)").replace("%s","\\([0-9"+thousandsSeparator+"]+\\)")+"?"),s=s||E("<div />"),e=r,1<=(a=(o=i.exec(document.title))?(o=o[0],s.html(o),R(s)+t):(s.html(0),t))?(l(s,a),(n=i.exec(document.title))&&(e=document.title.replace(n[0],u("Comments (%s)").replace("%s",s.text())+" "))):(n=i.exec(e))&&(e=e.replace(n[0],u("Comments11"))),document.title=e},L=function(n,t){var e,a,o=".post-com-count-"+t,s="comment-count-no-pending",i="post-com-count-no-pending",r="comment-count-pending";O||p(n),E("span.pending-count").each(function(){var t=E(this),e=R(t)+n;e<1&&(e=0),t.closest(".awaiting-mod")[0===e?"addClass":"removeClass"]("count-0"),l(t,e)}),t&&(e=E("span."+r,o),a=E("span."+s,o),e.each(function(){var t=E(this),e=R(t)+n;e<1&&(e=0),0===e?(t.parent().addClass(i),t.removeClass(r).addClass(s)):(t.parent().removeClass(i),t.addClass(r).removeClass(s)),l(t,e)}),a.each(function(){var t=E(this);0<n?(t.parent().removeClass(i),t.removeClass(s).addClass(r)):(t.parent().addClass(i),t.addClass(s).removeClass(r)),l(t,n)}))},window.setCommentsList=function(){var w,d,m,t,e,x,n,b,r,k=0;w=E('input[name="_total"]',"#comments-form"),d=E('input[name="_per_page"]',"#comments-form"),m=E('input[name="_page"]',"#comments-form"),x=function(t,e,n){e<k||(n&&(k=e),w.val(t.toString()))},t=function(t,e){var n,a,o,s,i=E("#"+e.element);!0!==e.parsed&&(s=e.parsed.responses[0]),n=E("#replyrow"),a=E("#comment_ID",n).val(),o=E("#replybtn",n),i.is(".unapproved")?(e.data.id==a&&o.text(u("Approve and Reply")),i.find(".row-actions span.view").addClass("hidden").end().find("div.comment_status").html("0")):(e.data.id==a&&o.text(u("Reply")),i.find(".row-actions span.view").removeClass("hidden").end().find("div.comment_status").html("1")),r=E("#"+e.element).is("."+e.dimClass)?1:-1,s?(j(s.supplemental),D(s.supplemental),L(r,s.supplemental.postId),T(-1*r,s.supplemental.postId)):(L(r),T(-1*r))},e=function(t,e){var n,a,o,s,i,r,l,p=!1,c=E(t.target).attr("data-wp-lists");return t.data._total=w.val()||0,t.data._per_page=d.val()||0,t.data._page=m.val()||0,t.data._url=document.location.href,t.data.comment_status=E('input[name="comment_status"]',"#comments-form").val(),-1!=c.indexOf(":trash=1")?p="trash":-1!=c.indexOf(":spam=1")&&(p="spam"),p&&(a=c.replace(/.*?comment-([0-9]+).*/,"$1"),o=E("#comment-"+a),n=E("#"+p+"-undo-holder").html(),o.find(".check-column :checkbox").prop("checked",!1),o.siblings("#replyrow").length&&commentReply.cid==a&&commentReply.close(),i=o.is("tr")?(s=o.children(":visible").length,l=E(".author strong",o).text(),E('<tr id="undo-'+a+'" class="undo un'+p+'" style="display:none;"><td colspan="'+s+'">'+n+"</td></tr>")):(l=E(".comment-author",o).text(),E('<div id="undo-'+a+'" style="display:none;" class="undo un'+p+'">'+n+"</div>")),o.before(i),E("strong","#undo-"+a).text(l),(r=E(".undo a","#undo-"+a)).attr("href","comment.php?action=un"+p+"comment