<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[18650] trunk: Don't hide the comment reply or quick edit row if an error is returned.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/18650">18650</a></dd>
<dt>Author</dt> <dd>duck_</dd>
<dt>Date</dt> <dd>2011-09-07 19:48:25 +0000 (Wed, 07 Sep 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>Don't hide the comment reply or quick edit row if an error is returned. Props ocean90. Fixes <a href="http://core.trac.wordpress.org/ticket/18350">#18350</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminjseditcommentsdevjs">trunk/wp-admin/js/edit-comments.dev.js</a></li>
<li><a href="#trunkwpadminjseditcommentsjs">trunk/wp-admin/js/edit-comments.js</a></li>
<li><a href="#trunkwpincludesscriptloaderphp">trunk/wp-includes/script-loader.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminjseditcommentsdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/edit-comments.dev.js (18649 => 18650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/edit-comments.dev.js        2011-09-07 13:53:53 UTC (rev 18649)
+++ trunk/wp-admin/js/edit-comments.dev.js        2011-09-07 19:48:25 UTC (rev 18650)
</span><span class="lines">@@ -473,8 +473,6 @@
</span><span class="cx">         show : function(xml) {
</span><span class="cx">                 var t = this, r, c, id, bg, pid;
</span><span class="cx"> 
</span><del>-                t.revert();
-
</del><span class="cx">                 if ( typeof(xml) == 'string' ) {
</span><span class="cx">                         t.error({'responseText': xml});
</span><span class="cx">                         return false;
</span><span class="lines">@@ -486,6 +484,8 @@
</span><span class="cx">                         return false;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><ins>+                t.revert();
+
</ins><span class="cx">                 r = r.responses[0];
</span><span class="cx">                 c = r.data;
</span><span class="cx">                 id = '#comment-' + r.id;
</span></span></pre></div>
<a id="trunkwpadminjseditcommentsjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/edit-comments.js (18649 => 18650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/edit-comments.js        2011-09-07 13:53:53 UTC (rev 18649)
+++ trunk/wp-admin/js/edit-comments.js        2011-09-07 19:48:25 UTC (rev 18650)
</span><span class="lines">@@ -1 +1 @@
</span><del>-var theList,theExtraList,toggleWithKeyboard=false,getCount,updateCount,updatePending,dashboardTotals;(function(a){setCommentsList=function(){var c,e,g,j=0,f,h,d,i,b;c=a('input[name=&quot;_total&quot;]',&quot;#comments-form&quot;);e=a('input[name=&quot;_per_page&quot;]',&quot;#comments-form&quot;);g=a('input[name=&quot;_page&quot;]',&quot;#comments-form&quot;);f=function(n,l){var p=a(&quot;#&quot;+l.element),k,o,m;k=a(&quot;#replyrow&quot;);o=a(&quot;#comment_ID&quot;,k).val();m=a(&quot;#replybtn&quot;,k);if(p.is(&quot;.unapproved&quot;)){if(l.data.id==o){m.text(adminCommentsL10n.replyApprove)}p.find(&quot;div.comment_status&quot;).html(&quot;0&quot;)}else{if(l.data.id==o){m.text(adminCommentsL10n.reply)}p.find(&quot;div.comment_status&quot;).html(&quot;1&quot;)}a(&quot;span.pending-count&quot;).each(function(){var q=a(this),s,r;s=q.html().replace(/[^0-9]+/g,&quot;&quot;);s=parseInt(s,10);if(isNaN(s)){return}r=a(&quot;#&quot;+l.element).is(&quot;.&quot;+l.dimClass
 )?1:-1;s=s+r;if(s&lt;0){s=0}q.closest(&quot;.awaiting-mod&quot;)[0==s?&quot;addClass&quot;:&quot;removeClass&quot;](&quot;count-0&quot;);updateCount(q,s);dashboardTotals()})};h=function(o,s){var u=a(o.target).attr(&quot;class&quot;),k,l,m,r,t,q,p=false;o.data._total=c.val()||0;o.data._per_page=e.val()||0;o.data._page=g.val()||0;o.data._url=document.location.href;o.data.comment_status=a('input[name=&quot;comment_status&quot;]',&quot;#comments-form&quot;).val();if(u.indexOf(&quot;:trash=1&quot;)!=-1){p=&quot;trash&quot;}else{if(u.indexOf(&quot;:spam=1&quot;)!=-1){p=&quot;spam&quot;}}if(p){k=u.replace(/.*?comment-([0-9]+).*/,&quot;$1&quot;);l=a(&quot;#comment-&quot;+k);note=a(&quot;#&quot;+p+&quot;-undo-holder&quot;).html();l.find(&quot;.check-column :checkbox&quot;).prop(&quot;checked&quot;,false);if(l.siblings(&quot;#replyrow&quot;).length&amp;&amp;commentReply.cid==k){commentReply.close()}if(l.is(&quot;tr&quot;)){m=l.children(&quot;:visible&quot;).length;q=a(&quot;.author st
 rong&quot;,l).text();r=a('&lt;tr id=&quot;undo-'+k+'&quot; class=&quot;undo un'+p+'&quot; style=&quot;display:none;&quot;&gt;&lt;td colspan=&quot;'+m+'&quot;&gt;'+note+&quot;&lt;/td&gt;&lt;/tr&gt;&quot;)}else{q=a(&quot;.comment-author&quot;,l).text();r=a('&lt;div id=&quot;undo-'+k+'&quot; style=&quot;display:none;&quot; class=&quot;undo un'+p+'&quot;&gt;'+note+&quot;&lt;/div&gt;&quot;)}l.before(r);a(&quot;strong&quot;,&quot;#undo-&quot;+k).text(q+&quot; &quot;);t=a(&quot;.undo a&quot;,&quot;#undo-&quot;+k);t.attr(&quot;href&quot;,&quot;comment.php?action=un&quot;+p+&quot;comment&amp;c=&quot;+k+&quot;&amp;_wpnonce=&quot;+o.data._ajax_nonce);t.attr(&quot;class&quot;,&quot;delete:the-comment-list:comment-&quot;+k+&quot;::un&quot;+p+&quot;=1 vim-z vim-destructive&quot;);a(&quot;.avatar&quot;,l).clone().prependTo(&quot;#undo-&quot;+k+&quot; .&quot;+p+&quot;-undo-inside&quot;);t.click(function(){s.wpList.del(this);a(&quot;#undo-&quot;+k).css({backgroundColor:&quot;#ceb&quot;}).fad
 eOut(350,function(){a(this).remove();a(&quot;#comment-&quot;+k).css(&quot;backgroundColor&quot;,&quot;&quot;).fadeIn(300,function(){a(this).show()})});return false})}return o};d=function(k,l,m){if(l&lt;j){return}if(m){j=l}c.val(k.toString());a(&quot;span.total-type-count&quot;).each(function(){updateCount(a(this),k)})};dashboardTotals=function(q){var p=a(&quot;#dashboard_right_now&quot;),l,o,m,k;q=q||0;if(isNaN(q)||!p.length){return}l=a(&quot;span.total-count&quot;,p);o=a(&quot;span.approved-count&quot;,p);m=getCount(l);m=m+q;k=m-getCount(a(&quot;span.pending-count&quot;,p))-getCount(a(&quot;span.spam-count&quot;,p));updateCount(l,m);updateCount(o,k)};getCount=function(k){var l=parseInt(k.html().replace(/[^0-9]+/g,&quot;&quot;),10);if(isNaN(l)){return 0}return l};updateCount=function(l,m){var k=&quot;&quot;;if(isNaN(m)){return}m=m&lt;1?&quot;0&quot;:m.toString();if(m.length&gt;3){while(m.length&gt;3){k=thousandsSeparator+m.substr(m.length-3)+k;m=m.substr(0,m.length-3)}m=m+k}
 l.html(m)};updatePending=function(k){a(&quot;span.pending-count&quot;).each(function(){var l=a(this);if(k&lt;0){k=0}l.closest(&quot;.awaiting-mod&quot;)[0==k?&quot;addClass&quot;:&quot;removeClass&quot;](&quot;count-0&quot;);updateCount(l,k);dashboardTotals()})};i=function(k,n){var q,o,u=a(n.target).parent().is(&quot;span.untrash&quot;),m=a(n.target).parent().is(&quot;span.unspam&quot;),t,s,l,p=a(&quot;#&quot;+n.element).is(&quot;.unapproved&quot;);function v(r){if(a(n.target).parent().is(&quot;span.&quot;+r)){return 1}else{if(a(&quot;#&quot;+n.element).is(&quot;.&quot;+r)){return -1}}return 0}t=v(&quot;spam&quot;);s=v(&quot;trash&quot;);if(u){s=-1}if(m){t=-1}l=getCount(a(&quot;span.pending-count&quot;).eq(0));if(a(n.target).parent().is(&quot;span.unapprove&quot;)||((u||m)&amp;&amp;p)){l=l+1}else{if(p){l=l-1}}updatePending(l);a(&quot;span.spam-count&quot;).each(function(){var r=a(this),w=getCount(r)+t;updateCount(r,w)});a(&quot;span.trash-count&quot;).each(function(){var r=a
 (this),w=getCount(r)+s;updateCount(r,w)});if(a(&quot;#dashboard_right_now&quot;).length){o=s?-1*s:0;dashboardTotals(o)}else{q=c.val()?parseInt(c.val(),10):0;q=q-t-s;if(q&lt;0){q=0}if((&quot;object&quot;==typeof k)&amp;&amp;j&lt;n.parsed.responses[0].supplemental.time){total_items_i18n=n.parsed.responses[0].supplemental.total_items_i18n||&quot;&quot;;if(total_items_i18n){a(&quot;.displaying-num&quot;).text(total_items_i18n);a(&quot;.total-pages&quot;).text(n.parsed.responses[0].supplemental.total_pages_i18n);a(&quot;.tablenav-pages&quot;).find(&quot;.next-page, .last-page&quot;).toggleClass(&quot;disabled&quot;,n.parsed.responses[0].supplemental.total_pages==a(&quot;.current-page&quot;).val())}d(q,n.parsed.responses[0].supplemental.time,true)}else{d(q,k,false)}}if(!theExtraList||theExtraList.size()==0||theExtraList.children().size()==0||u||m){return}theList.get(0).wpList.add(theExtraList.children(&quot;:eq(0)&quot;).remove().clone());b()};b=function(n){var l=a.query.get(),k=a
 (&quot;.total-pages&quot;).text(),m=a('input[name=&quot;_per_page&quot;]',&quot;#comments-form&quot;).val();if(!l.paged){l.paged=1}if(l.paged&gt;k){return}if(n){theExtraList.empty();l.number=Math.min(8,m)}else{l.number=1;l.offset=Math.min(8,m)-1}l.no_placeholder=true;l.paged++;if(true===l.comment_type){l.comment_type=&quot;&quot;}l=a.extend(l,{action:&quot;fetch-list&quot;,list_args:list_args,_ajax_fetch_list_nonce:a(&quot;#_ajax_fetch_list_nonce&quot;).val()});a.ajax({url:ajaxurl,global:false,dataType:&quot;json&quot;,data:l,success:function(o){theExtraList.get(0).wpList.add(o.rows)}})};theExtraList=a(&quot;#the-extra-comment-list&quot;).wpList({alt:&quot;&quot;,delColor:&quot;none&quot;,addColor:&quot;none&quot;});theList=a(&quot;#the-comment-list&quot;).wpList({alt:&quot;&quot;,delBefore:h,dimAfter:f,delAfter:i,addColor:&quot;none&quot;}).bind(&quot;wpListDelEnd&quot;,function(l,k){var m=k.element.replace(/[^0-9]+/g,&quot;&quot;);if(k.target.className.indexOf(&quot;:trash
 =1&quot;)!=-1||k.target.className.indexOf(&quot;:spam=1&quot;)!=-1){a(&quot;#undo-&quot;+m).fadeIn(300,function(){a(this).show()})}})};commentReply={cid:&quot;&quot;,act:&quot;&quot;,init:function(){var b=a(&quot;#replyrow&quot;);a(&quot;a.cancel&quot;,b).click(function(){return commentReply.revert()});a(&quot;a.save&quot;,b).click(function(){return commentReply.send()});a(&quot;input#author, input#author-email, input#author-url&quot;,b).keypress(function(c){if(c.which==13){commentReply.send();c.preventDefault();return false}});a(&quot;#the-comment-list .column-comment &gt; p&quot;).dblclick(function(){commentReply.toggle(a(this).parent())});a(&quot;#doaction, #doaction2, #post-query-submit&quot;).click(function(c){if(a(&quot;#the-comment-list #replyrow&quot;).length&gt;0){commentReply.close()}});this.comments_listing=a('#comments-form &gt; input[name=&quot;comment_status&quot;]').val()||&quot;&quot;},addEvents:function(b){b.each(function(){a(this).find(&quot;.column-comment
  &gt; p&quot;).dblclick(function(){commentReply.toggle(a(this).parent())})})},toggle:function(b){if(a(b).css(&quot;display&quot;)!=&quot;none&quot;){a(b).find(&quot;a.vim-q&quot;).click()}},revert:function(){if(a(&quot;#the-comment-list #replyrow&quot;).length&lt;1){return false}a(&quot;#replyrow&quot;).fadeOut(&quot;fast&quot;,function(){commentReply.close()});return false},close:function(){var b;if(this.cid){b=a(&quot;#comment-&quot;+this.cid);if(typeof QTags!=&quot;undefined&quot;){QTags.closeAllTags(&quot;replycontent&quot;)}if(this.act==&quot;edit-comment&quot;){b.fadeIn(300,function(){b.show()}).css(&quot;backgroundColor&quot;,&quot;&quot;)}a(&quot;#replyrow&quot;).hide();a(&quot;#com-reply&quot;).append(a(&quot;#replyrow&quot;));a(&quot;#replycontent&quot;).val(&quot;&quot;);a(&quot;input&quot;,&quot;#edithead&quot;).val(&quot;&quot;);a(&quot;.error&quot;,&quot;#replysubmit&quot;).html(&quot;&quot;).hide();a(&quot;.waiting&quot;,&quot;#replysubmit&quot;).hide();a(&quo
 t;#replycontainer, #replycontent&quot;).height(120);this.cid=&quot;&quot;}},open:function(b,d,k){var m=this,e,f,i,j=a(&quot;#comment-&quot;+b),g=j.height(),l;m.close();m.cid=b;e=a(&quot;#replyrow&quot;);f=a(&quot;#inline-&quot;+b);i=m.act=(k==&quot;edit&quot;)?&quot;edit-comment&quot;:&quot;replyto-comment&quot;;a(&quot;#action&quot;,e).val(i);a(&quot;#comment_post_ID&quot;,e).val(d);a(&quot;#comment_ID&quot;,e).val(b);if(g&gt;220){a(&quot;#replycontainer, #replycontent&quot;,e).height(g-104)}if(k==&quot;edit&quot;){a(&quot;#author&quot;,e).val(a(&quot;div.author&quot;,f).text());a(&quot;#author-email&quot;,e).val(a(&quot;div.author-email&quot;,f).text());a(&quot;#author-url&quot;,e).val(a(&quot;div.author-url&quot;,f).text());a(&quot;#status&quot;,e).val(a(&quot;div.comment_status&quot;,f).text());a(&quot;#replycontent&quot;,e).val(a(&quot;textarea.comment&quot;,f).val());a(&quot;#edithead, #savebtn&quot;,e).show();a(&quot;#replyhead, #replybtn&quot;,e).hide();j.after(e).fa
 deOut(&quot;fast&quot;,function(){a(&quot;#replyrow&quot;).fadeIn(300,function(){a(this).show()})})}else{l=a(&quot;#replybtn&quot;,e);a(&quot;#edithead, #savebtn&quot;,e).hide();a(&quot;#replyhead, #replybtn&quot;,e).show();j.after(e);if(j.hasClass(&quot;unapproved&quot;)){l.text(adminCommentsL10n.replyApprove)}else{l.text(adminCommentsL10n.reply)}a(&quot;#replyrow&quot;).fadeIn(300,function(){a(this).show()})}setTimeout(function(){var o,h,p,c,n;o=a(&quot;#replyrow&quot;).offset().top;h=o+a(&quot;#replyrow&quot;).height();p=window.pageYOffset||document.documentElement.scrollTop;c=document.documentElement.clientHeight||self.innerHeight||0;n=p+c;if(n-20&lt;h){window.scroll(0,h-c+35)}else{if(o-20&lt;p){window.scroll(0,o-35)}}a(&quot;#replycontent&quot;).focus().keyup(function(q){if(q.which==27){commentReply.revert()}})},600);return false},send:function(){var b={};a(&quot;#replysubmit .error&quot;).hide();a(&quot;#replysubmit .waiting&quot;).show();a(&quot;#replyrow input&quot;)
 .not(&quot;:button&quot;).each(function(){b[a(this).attr(&quot;name&quot;)]=a(this).val()});b.content=a(&quot;#replycontent&quot;).val();b.id=b.comment_post_ID;b.comments_listing=this.comments_listing;b.p=a('[name=&quot;p&quot;]').val();if(a(&quot;#comment-&quot;+a(&quot;#comment_ID&quot;).val()).hasClass(&quot;unapproved&quot;)){b.approve_parent=1}a.ajax({type:&quot;POST&quot;,url:ajaxurl,data:b,success:function(c){commentReply.show(c)},error:function(c){commentReply.error(c)}});return false},show:function(d){var f=this,g,i,h,e,b;f.revert();if(typeof(d)==&quot;string&quot;){f.error({responseText:d});return false}g=wpAjax.parseAjaxResponse(d);if(g.errors){f.error({responseText:wpAjax.broken});return false}g=g.responses[0];i=g.data;h=&quot;#comment-&quot;+g.id;if(&quot;edit-comment&quot;==f.act){a(h).remove()}if(g.supplemental.parent_approved){b=a(&quot;#comment-&quot;+g.supplemental.parent_approved);updatePending(getCount(a(&quot;span.pending-count&quot;).eq(0))-1);if(this.c
 omments_listing==&quot;moderated&quot;){b.animate({backgroundColor:&quot;#CCEEBB&quot;},400,function(){b.fadeOut()});return}}a(i).hide();a(&quot;#replyrow&quot;).after(i);h=a(h);f.addEvents(h);e=h.hasClass(&quot;unapproved&quot;)?&quot;#FFFFE0&quot;:h.closest(&quot;.widefat&quot;).css(&quot;backgroundColor&quot;);h.animate({backgroundColor:&quot;#CCEEBB&quot;},300).animate({backgroundColor:e},300,function(){if(b&amp;&amp;b.length){b.animate({backgroundColor:&quot;#CCEEBB&quot;},300).animate({backgroundColor:e},300).removeClass(&quot;unapproved&quot;).addClass(&quot;approved&quot;).find(&quot;div.comment_status&quot;).html(&quot;1&quot;)}})},error:function(b){var c=b.statusText;a(&quot;#replysubmit .waiting&quot;).hide();if(b.responseText){c=b.responseText.replace(/&lt;.[^&lt;&gt;]*?&gt;/g,&quot;&quot;)}if(c){a(&quot;#replysubmit .error&quot;).html(c).show()}}};a(document).ready(function(){var e,b,c,d;setCommentsList();commentReply.init();a(document).delegate(&quot;span.delet
 e a.delete&quot;,&quot;click&quot;,function(){return false});if(typeof QTags!=&quot;undefined&quot;){quicktags({id:&quot;replycontent&quot;,buttons:&quot;strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close&quot;})}if(typeof a.table_hotkeys!=&quot;undefined&quot;){e=function(f){return function(){var h,g;h=&quot;next&quot;==f?&quot;first&quot;:&quot;last&quot;;g=a(&quot;.tablenav-pages .&quot;+f+&quot;-page:not(.disabled)&quot;);if(g.length){window.location=g[0].href.replace(/\&amp;hotkeys_highlight_(first|last)=1/g,&quot;&quot;)+&quot;&amp;hotkeys_highlight_&quot;+h+&quot;=1&quot;}}};b=function(g,f){window.location=a(&quot;span.edit a&quot;,f).attr(&quot;href&quot;)};c=function(){toggleWithKeyboard=true;a(&quot;input:checkbox&quot;,&quot;#cb&quot;).click().prop(&quot;checked&quot;,false);toggleWithKeyboard=false};d=function(f){return function(){var g=a('select[name=&quot;action&quot;]');a('option[value=&quot;'+f+'&quot;]',g).prop(&quot;selected&quot;,true);a(&quot;#doa
 ction&quot;).click()}};a.table_hotkeys(a(&quot;table.widefat&quot;),[&quot;a&quot;,&quot;u&quot;,&quot;s&quot;,&quot;d&quot;,&quot;r&quot;,&quot;q&quot;,&quot;z&quot;,[&quot;e&quot;,b],[&quot;shift+x&quot;,c],[&quot;shift+a&quot;,d(&quot;approve&quot;)],[&quot;shift+s&quot;,d(&quot;spam&quot;)],[&quot;shift+d&quot;,d(&quot;delete&quot;)],[&quot;shift+t&quot;,d(&quot;trash&quot;)],[&quot;shift+z&quot;,d(&quot;untrash&quot;)],[&quot;shift+u&quot;,d(&quot;unapprove&quot;)]],{highlight_first:adminCommentsL10n.hotkeys_highlight_first,highlight_last:adminCommentsL10n.hotkeys_highlight_last,prev_page_link_cb:e(&quot;prev&quot;),next_page_link_cb:e(&quot;next&quot;)})}})})(jQuery);
</del><span class="cx">\ No newline at end of file
</span><ins>+var theList,theExtraList,toggleWithKeyboard=false,getCount,updateCount,updatePending,dashboardTotals;(function($){setCommentsList=function(){var totalInput,perPageInput,pageInput,lastConfidentTime=0,dimAfter,delBefore,updateTotalCount,delAfter,refillTheExtraList;totalInput=$('input[name=&quot;_total&quot;]',&quot;#comments-form&quot;);perPageInput=$('input[name=&quot;_per_page&quot;]',&quot;#comments-form&quot;);pageInput=$('input[name=&quot;_page&quot;]',&quot;#comments-form&quot;);dimAfter=function(r,settings){var c=$(&quot;#&quot;+settings.element),editRow,replyID,replyButton;editRow=$(&quot;#replyrow&quot;);replyID=$(&quot;#comment_ID&quot;,editRow).val();replyButton=$(&quot;#replybtn&quot;,editRow);if(c.is(&quot;.unapproved&quot;)){if(settings.data.id==replyID){replyButton.text(adminCommentsL10n.replyApprove)}c.find(&quot;div.comment_status&quot;).html(&quot;0&quot;)}else{if(settings.data.id==replyID){replyButton.text(adminCommentsL10n.reply)}c.find(&quot;di
 v.comment_status&quot;).html(&quot;1&quot;)}$(&quot;span.pending-count&quot;).each(function(){var a=$(this),n,dif;n=a.html().replace(/[^0-9]+/g,&quot;&quot;);n=parseInt(n,10);if(isNaN(n)){return}dif=$(&quot;#&quot;+settings.element).is(&quot;.&quot;+settings.dimClass)?1:-1;n=n+dif;if(n&lt;0){n=0}a.closest(&quot;.awaiting-mod&quot;)[0==n?&quot;addClass&quot;:&quot;removeClass&quot;](&quot;count-0&quot;);updateCount(a,n);dashboardTotals()})};delBefore=function(settings,list){var cl=$(settings.target).attr(&quot;class&quot;),id,el,n,h,a,author,action=false;settings.data._total=totalInput.val()||0;settings.data._per_page=perPageInput.val()||0;settings.data._page=pageInput.val()||0;settings.data._url=document.location.href;settings.data.comment_status=$('input[name=&quot;comment_status&quot;]',&quot;#comments-form&quot;).val();if(cl.indexOf(&quot;:trash=1&quot;)!=-1){action=&quot;trash&quot;}else{if(cl.indexOf(&quot;:spam=1&quot;)!=-1){action=&quot;spam&quot;}}if(action){id=cl.re
 place(/.*?comment-([0-9]+).*/,&quot;$1&quot;);el=$(&quot;#comment-&quot;+id);note=$(&quot;#&quot;+action+&quot;-undo-holder&quot;).html();el.find(&quot;.check-column :checkbox&quot;).prop(&quot;checked&quot;,false);if(el.siblings(&quot;#replyrow&quot;).length&amp;&amp;commentReply.cid==id){commentReply.close()}if(el.is(&quot;tr&quot;)){n=el.children(&quot;:visible&quot;).length;author=$(&quot;.author strong&quot;,el).text();h=$('&lt;tr id=&quot;undo-'+id+'&quot; class=&quot;undo un'+action+'&quot; style=&quot;display:none;&quot;&gt;&lt;td colspan=&quot;'+n+'&quot;&gt;'+note+&quot;&lt;/td&gt;&lt;/tr&gt;&quot;)}else{author=$(&quot;.comment-author&quot;,el).text();h=$('&lt;div id=&quot;undo-'+id+'&quot; style=&quot;display:none;&quot; class=&quot;undo un'+action+'&quot;&gt;'+note+&quot;&lt;/div&gt;&quot;)}el.before(h);$(&quot;strong&quot;,&quot;#undo-&quot;+id).text(author+&quot; &quot;);a=$(&quot;.undo a&quot;,&quot;#undo-&quot;+id);a.attr(&quot;href&quot;,&quot;comment.php?ac
 tion=un&quot;+action+&quot;comment&amp;c=&quot;+id+&quot;&amp;_wpnonce=&quot;+settings.data._ajax_nonce);a.attr(&quot;class&quot;,&quot;delete:the-comment-list:comment-&quot;+id+&quot;::un&quot;+action+&quot;=1 vim-z vim-destructive&quot;);$(&quot;.avatar&quot;,el).clone().prependTo(&quot;#undo-&quot;+id+&quot; .&quot;+action+&quot;-undo-inside&quot;);a.click(function(){list.wpList.del(this);$(&quot;#undo-&quot;+id).css({backgroundColor:&quot;#ceb&quot;}).fadeOut(350,function(){$(this).remove();$(&quot;#comment-&quot;+id).css(&quot;backgroundColor&quot;,&quot;&quot;).fadeIn(300,function(){$(this).show()})});return false})}return settings};updateTotalCount=function(total,time,setConfidentTime){if(time&lt;lastConfidentTime){return}if(setConfidentTime){lastConfidentTime=time}totalInput.val(total.toString());$(&quot;span.total-type-count&quot;).each(function(){updateCount($(this),total)})};dashboardTotals=function(n){var dash=$(&quot;#dashboard_right_now&quot;),total,appr,totalN
 ,apprN;n=n||0;if(isNaN(n)||!dash.length){return}total=$(&quot;span.total-count&quot;,dash);appr=$(&quot;span.approved-count&quot;,dash);totalN=getCount(total);totalN=totalN+n;apprN=totalN-getCount($(&quot;span.pending-count&quot;,dash))-getCount($(&quot;span.spam-count&quot;,dash));updateCount(total,totalN);updateCount(appr,apprN)};getCount=function(el){var n=parseInt(el.html().replace(/[^0-9]+/g,&quot;&quot;),10);if(isNaN(n)){return 0}return n};updateCount=function(el,n){var n1=&quot;&quot;;if(isNaN(n)){return}n=n&lt;1?&quot;0&quot;:n.toString();if(n.length&gt;3){while(n.length&gt;3){n1=thousandsSeparator+n.substr(n.length-3)+n1;n=n.substr(0,n.length-3)}n=n+n1}el.html(n)};updatePending=function(n){$(&quot;span.pending-count&quot;).each(function(){var a=$(this);if(n&lt;0){n=0}a.closest(&quot;.awaiting-mod&quot;)[0==n?&quot;addClass&quot;:&quot;removeClass&quot;](&quot;count-0&quot;);updateCount(a,n);dashboardTotals()})};delAfter=function(r,settings){var total,N,untrash=$(set
 tings.target).parent().is(&quot;span.untrash&quot;),unspam=$(settings.target).parent().is(&quot;span.unspam&quot;),spam,trash,pending,unapproved=$(&quot;#&quot;+settings.element).is(&quot;.unapproved&quot;);function getUpdate(s){if($(settings.target).parent().is(&quot;span.&quot;+s)){return 1}else{if($(&quot;#&quot;+settings.element).is(&quot;.&quot;+s)){return -1}}return 0}spam=getUpdate(&quot;spam&quot;);trash=getUpdate(&quot;trash&quot;);if(untrash){trash=-1}if(unspam){spam=-1}pending=getCount($(&quot;span.pending-count&quot;).eq(0));if($(settings.target).parent().is(&quot;span.unapprove&quot;)||((untrash||unspam)&amp;&amp;unapproved)){pending=pending+1}else{if(unapproved){pending=pending-1}}updatePending(pending);$(&quot;span.spam-count&quot;).each(function(){var a=$(this),n=getCount(a)+spam;updateCount(a,n)});$(&quot;span.trash-count&quot;).each(function(){var a=$(this),n=getCount(a)+trash;updateCount(a,n)});if($(&quot;#dashboard_right_now&quot;).length){N=trash?-1*tras
 h:0;dashboardTotals(N)}else{total=totalInput.val()?parseInt(totalInput.val(),10):0;total=total-spam-trash;if(total&lt;0){total=0}if((&quot;object&quot;==typeof r)&amp;&amp;lastConfidentTime&lt;settings.parsed.responses[0].supplemental.time){total_items_i18n=settings.parsed.responses[0].supplemental.total_items_i18n||&quot;&quot;;if(total_items_i18n){$(&quot;.displaying-num&quot;).text(total_items_i18n);$(&quot;.total-pages&quot;).text(settings.parsed.responses[0].supplemental.total_pages_i18n);$(&quot;.tablenav-pages&quot;).find(&quot;.next-page, .last-page&quot;).toggleClass(&quot;disabled&quot;,settings.parsed.responses[0].supplemental.total_pages==$(&quot;.current-page&quot;).val())}updateTotalCount(total,settings.parsed.responses[0].supplemental.time,true)}else{updateTotalCount(total,r,false)}}if(!theExtraList||theExtraList.size()==0||theExtraList.children().size()==0||untrash||unspam){return}theList.get(0).wpList.add(theExtraList.children(&quot;:eq(0)&quot;).remove().cl
 one());refillTheExtraList()};refillTheExtraList=function(ev){var args=$.query.get(),total_pages=$(&quot;.total-pages&quot;).text(),per_page=$('input[name=&quot;_per_page&quot;]',&quot;#comments-form&quot;).val();if(!args.paged){args.paged=1}if(args.paged&gt;total_pages){return}if(ev){theExtraList.empty();args.number=Math.min(8,per_page)}else{args.number=1;args.offset=Math.min(8,per_page)-1}args.no_placeholder=true;args.paged++;if(true===args.comment_type){args.comment_type=&quot;&quot;}args=$.extend(args,{action:&quot;fetch-list&quot;,list_args:list_args,_ajax_fetch_list_nonce:$(&quot;#_ajax_fetch_list_nonce&quot;).val()});$.ajax({url:ajaxurl,global:false,dataType:&quot;json&quot;,data:args,success:function(response){theExtraList.get(0).wpList.add(response.rows)}})};theExtraList=$(&quot;#the-extra-comment-list&quot;).wpList({alt:&quot;&quot;,delColor:&quot;none&quot;,addColor:&quot;none&quot;});theList=$(&quot;#the-comment-list&quot;).wpList({alt:&quot;&quot;,delBefore:delBe
 fore,dimAfter:dimAfter,delAfter:delAfter,addColor:&quot;none&quot;}).bind(&quot;wpListDelEnd&quot;,function(e,s){var id=s.element.replace(/[^0-9]+/g,&quot;&quot;);if(s.target.className.indexOf(&quot;:trash=1&quot;)!=-1||s.target.className.indexOf(&quot;:spam=1&quot;)!=-1){$(&quot;#undo-&quot;+id).fadeIn(300,function(){$(this).show()})}})};commentReply={cid:&quot;&quot;,act:&quot;&quot;,init:function(){var row=$(&quot;#replyrow&quot;);$(&quot;a.cancel&quot;,row).click(function(){return commentReply.revert()});$(&quot;a.save&quot;,row).click(function(){return commentReply.send()});$(&quot;input#author, input#author-email, input#author-url&quot;,row).keypress(function(e){if(e.which==13){commentReply.send();e.preventDefault();return false}});$(&quot;#the-comment-list .column-comment &gt; p&quot;).dblclick(function(){commentReply.toggle($(this).parent())});$(&quot;#doaction, #doaction2, #post-query-submit&quot;).click(function(e){if($(&quot;#the-comment-list #replyrow&quot;).leng
 th&gt;0){commentReply.close()}});this.comments_listing=$('#comments-form &gt; input[name=&quot;comment_status&quot;]').val()||&quot;&quot;},addEvents:function(r){r.each(function(){$(this).find(&quot;.column-comment &gt; p&quot;).dblclick(function(){commentReply.toggle($(this).parent())})})},toggle:function(el){if($(el).css(&quot;display&quot;)!=&quot;none&quot;){$(el).find(&quot;a.vim-q&quot;).click()}},revert:function(){if($(&quot;#the-comment-list #replyrow&quot;).length&lt;1){return false}$(&quot;#replyrow&quot;).fadeOut(&quot;fast&quot;,function(){commentReply.close()});return false},close:function(){var c;if(this.cid){c=$(&quot;#comment-&quot;+this.cid);if(typeof QTags!=&quot;undefined&quot;){QTags.closeAllTags(&quot;replycontent&quot;)}if(this.act==&quot;edit-comment&quot;){c.fadeIn(300,function(){c.show()}).css(&quot;backgroundColor&quot;,&quot;&quot;)}$(&quot;#replyrow&quot;).hide();$(&quot;#com-reply&quot;).append($(&quot;#replyrow&quot;));$(&quot;#replycontent&quot
 ;).val(&quot;&quot;);$(&quot;input&quot;,&quot;#edithead&quot;).val(&quot;&quot;);$(&quot;.error&quot;,&quot;#replysubmit&quot;).html(&quot;&quot;).hide();$(&quot;.waiting&quot;,&quot;#replysubmit&quot;).hide();$(&quot;#replycontainer, #replycontent&quot;).height(120);this.cid=&quot;&quot;}},open:function(id,p,a){var t=this,editRow,rowData,act,c=$(&quot;#comment-&quot;+id),h=c.height(),replyButton;t.close();t.cid=id;editRow=$(&quot;#replyrow&quot;);rowData=$(&quot;#inline-&quot;+id);act=t.act=(a==&quot;edit&quot;)?&quot;edit-comment&quot;:&quot;replyto-comment&quot;;$(&quot;#action&quot;,editRow).val(act);$(&quot;#comment_post_ID&quot;,editRow).val(p);$(&quot;#comment_ID&quot;,editRow).val(id);if(h&gt;220){$(&quot;#replycontainer, #replycontent&quot;,editRow).height(h-104)}if(a==&quot;edit&quot;){$(&quot;#author&quot;,editRow).val($(&quot;div.author&quot;,rowData).text());$(&quot;#author-email&quot;,editRow).val($(&quot;div.author-email&quot;,rowData).text());$(&quot;#author
 -url&quot;,editRow).val($(&quot;div.author-url&quot;,rowData).text());$(&quot;#status&quot;,editRow).val($(&quot;div.comment_status&quot;,rowData).text());$(&quot;#replycontent&quot;,editRow).val($(&quot;textarea.comment&quot;,rowData).val());$(&quot;#edithead, #savebtn&quot;,editRow).show();$(&quot;#replyhead, #replybtn&quot;,editRow).hide();c.after(editRow).fadeOut(&quot;fast&quot;,function(){$(&quot;#replyrow&quot;).fadeIn(300,function(){$(this).show()})})}else{replyButton=$(&quot;#replybtn&quot;,editRow);$(&quot;#edithead, #savebtn&quot;,editRow).hide();$(&quot;#replyhead, #replybtn&quot;,editRow).show();c.after(editRow);if(c.hasClass(&quot;unapproved&quot;)){replyButton.text(adminCommentsL10n.replyApprove)}else{replyButton.text(adminCommentsL10n.reply)}$(&quot;#replyrow&quot;).fadeIn(300,function(){$(this).show()})}setTimeout(function(){var rtop,rbottom,scrollTop,vp,scrollBottom;rtop=$(&quot;#replyrow&quot;).offset().top;rbottom=rtop+$(&quot;#replyrow&quot;).height();sc
 rollTop=window.pageYOffset||document.documentElement.scrollTop;vp=document.documentElement.clientHeight||self.innerHeight||0;scrollBottom=scrollTop+vp;if(scrollBottom-20&lt;rbottom){window.scroll(0,rbottom-vp+35)}else{if(rtop-20&lt;scrollTop){window.scroll(0,rtop-35)}}$(&quot;#replycontent&quot;).focus().keyup(function(e){if(e.which==27){commentReply.revert()}})},600);return false},send:function(){var post={};$(&quot;#replysubmit .error&quot;).hide();$(&quot;#replysubmit .waiting&quot;).show();$(&quot;#replyrow input&quot;).not(&quot;:button&quot;).each(function(){post[$(this).attr(&quot;name&quot;)]=$(this).val()});post.content=$(&quot;#replycontent&quot;).val();post.id=post.comment_post_ID;post.comments_listing=this.comments_listing;post.p=$('[name=&quot;p&quot;]').val();if($(&quot;#comment-&quot;+$(&quot;#comment_ID&quot;).val()).hasClass(&quot;unapproved&quot;)){post.approve_parent=1}$.ajax({type:&quot;POST&quot;,url:ajaxurl,data:post,success:function(x){commentReply.sho
 w(x)},error:function(r){commentReply.error(r)}});return false},show:function(xml){var t=this,r,c,id,bg,pid;if(typeof(xml)==&quot;string&quot;){t.error({responseText:xml});return false}r=wpAjax.parseAjaxResponse(xml);if(r.errors){t.error({responseText:wpAjax.broken});return false}t.revert();r=r.responses[0];c=r.data;id=&quot;#comment-&quot;+r.id;if(&quot;edit-comment&quot;==t.act){$(id).remove()}if(r.supplemental.parent_approved){pid=$(&quot;#comment-&quot;+r.supplemental.parent_approved);updatePending(getCount($(&quot;span.pending-count&quot;).eq(0))-1);if(this.comments_listing==&quot;moderated&quot;){pid.animate({backgroundColor:&quot;#CCEEBB&quot;},400,function(){pid.fadeOut()});return}}$(c).hide();$(&quot;#replyrow&quot;).after(c);id=$(id);t.addEvents(id);bg=id.hasClass(&quot;unapproved&quot;)?&quot;#FFFFE0&quot;:id.closest(&quot;.widefat&quot;).css(&quot;backgroundColor&quot;);id.animate({backgroundColor:&quot;#CCEEBB&quot;},300).animate({backgroundColor:bg},300,function
 (){if(pid&amp;&amp;pid.length){pid.animate({backgroundColor:&quot;#CCEEBB&quot;},300).animate({backgroundColor:bg},300).removeClass(&quot;unapproved&quot;).addClass(&quot;approved&quot;).find(&quot;div.comment_status&quot;).html(&quot;1&quot;)}})},error:function(r){var er=r.statusText;$(&quot;#replysubmit .waiting&quot;).hide();if(r.responseText){er=r.responseText.replace(/&lt;.[^&lt;&gt;]*?&gt;/g,&quot;&quot;)}if(er){$(&quot;#replysubmit .error&quot;).html(er).show()}}};$(document).ready(function(){var make_hotkeys_redirect,edit_comment,toggle_all,make_bulk;setCommentsList();commentReply.init();$(document).delegate(&quot;span.delete a.delete&quot;,&quot;click&quot;,function(){return false});if(typeof QTags!=&quot;undefined&quot;){quicktags({id:&quot;replycontent&quot;,buttons:&quot;strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close&quot;})}if(typeof $.table_hotkeys!=&quot;undefined&quot;){make_hotkeys_redirect=function(which){return function(){var first_last,l;first
 _last=&quot;next&quot;==which?&quot;first&quot;:&quot;last&quot;;l=$(&quot;.tablenav-pages .&quot;+which+&quot;-page:not(.disabled)&quot;);if(l.length){window.location=l[0].href.replace(/\&amp;hotkeys_highlight_(first|last)=1/g,&quot;&quot;)+&quot;&amp;hotkeys_highlight_&quot;+first_last+&quot;=1&quot;}}};edit_comment=function(event,current_row){window.location=$(&quot;span.edit a&quot;,current_row).attr(&quot;href&quot;)};toggle_all=function(){toggleWithKeyboard=true;$(&quot;input:checkbox&quot;,&quot;#cb&quot;).click().prop(&quot;checked&quot;,false);toggleWithKeyboard=false};make_bulk=function(value){return function(){var scope=$('select[name=&quot;action&quot;]');$('option[value=&quot;'+value+'&quot;]',scope).prop(&quot;selected&quot;,true);$(&quot;#doaction&quot;).click()}};$.table_hotkeys($(&quot;table.widefat&quot;),[&quot;a&quot;,&quot;u&quot;,&quot;s&quot;,&quot;d&quot;,&quot;r&quot;,&quot;q&quot;,&quot;z&quot;,[&quot;e&quot;,edit_comment],[&quot;shift+x&quot;,toggl
 e_all],[&quot;shift+a&quot;,make_bulk(&quot;approve&quot;)],[&quot;shift+s&quot;,make_bulk(&quot;spam&quot;)],[&quot;shift+d&quot;,make_bulk(&quot;delete&quot;)],[&quot;shift+t&quot;,make_bulk(&quot;trash&quot;)],[&quot;shift+z&quot;,make_bulk(&quot;untrash&quot;)],[&quot;shift+u&quot;,make_bulk(&quot;unapprove&quot;)]],{highlight_first:adminCommentsL10n.hotkeys_highlight_first,highlight_last:adminCommentsL10n.hotkeys_highlight_last,prev_page_link_cb:make_hotkeys_redirect(&quot;prev&quot;),next_page_link_cb:make_hotkeys_redirect(&quot;next&quot;)})}})})(jQuery);
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (18649 => 18650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2011-09-07 13:53:53 UTC (rev 18649)
+++ trunk/wp-includes/script-loader.php        2011-09-07 19:48:25 UTC (rev 18650)
</span><span class="lines">@@ -269,7 +269,7 @@
</span><span class="cx"> 
</span><span class="cx">                 $scripts-&gt;add( 'admin-custom-fields', &quot;/wp-admin/js/custom-fields$suffix.js&quot;, array('wp-lists'), '20110429', 1 );
</span><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'admin-comments', &quot;/wp-admin/js/edit-comments$suffix.js&quot;, array('wp-lists', 'quicktags', 'jquery-query'), '20110820', 1 );
</del><ins>+                $scripts-&gt;add( 'admin-comments', &quot;/wp-admin/js/edit-comments$suffix.js&quot;, array('wp-lists', 'quicktags', 'jquery-query'), '20110907', 1 );
</ins><span class="cx">                 $scripts-&gt;add_script_data( 'admin-comments', 'adminCommentsL10n', array(
</span><span class="cx">                         'hotkeys_highlight_first' =&gt; isset($_GET['hotkeys_highlight_first']),
</span><span class="cx">                         'hotkeys_highlight_last' =&gt; isset($_GET['hotkeys_highlight_last']),
</span></span></pre>
</div>
</div>

</body>
</html>