<!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>[20164] trunk: Add new comment from post edit screen, partial props: garyc40, see #15527</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/20164">20164</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2012-03-09 01:30:11 +0000 (Fri, 09 Mar 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add new comment from post edit screen, partial props: garyc40, see <a href="http://core.trac.wordpress.org/ticket/15527">#15527</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadmincsscolorsclassicdevcss">trunk/wp-admin/css/colors-classic.dev.css</a></li>
<li><a href="#trunkwpadmincsscolorsfreshdevcss">trunk/wp-admin/css/colors-fresh.dev.css</a></li>
<li><a href="#trunkwpadmincsswpadmindevcss">trunk/wp-admin/css/wp-admin.dev.css</a></li>
<li><a href="#trunkwpadminincludesmetaboxesphp">trunk/wp-admin/includes/meta-boxes.php</a></li>
<li><a href="#trunkwpadminincludestemplatephp">trunk/wp-admin/includes/template.php</a></li>
<li><a href="#trunkwpadminjseditcommentsdevjs">trunk/wp-admin/js/edit-comments.dev.js</a></li>
<li><a href="#trunkwpadminjspostdevjs">trunk/wp-admin/js/post.dev.js</a></li>
<li><a href="#trunkwpincludescsseditorbuttonsdevcss">trunk/wp-includes/css/editor-buttons.dev.css</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmincsscolorsclassicdevcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/colors-classic.dev.css (20163 => 20164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/colors-classic.dev.css        2012-03-08 21:22:24 UTC (rev 20163)
+++ trunk/wp-admin/css/colors-classic.dev.css        2012-03-09 01:30:11 UTC (rev 20164)
</span><span class="lines">@@ -287,8 +287,9 @@
</span><span class="cx">         border-color: #c00 !important;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.submit {
-        border-color: #DFDFDF;
</del><ins>+.submit,
+#commentsdiv #add-new-comment {
+        border-color: #dfdfdf;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> .highlight {
</span></span></pre></div>
<a id="trunkwpadmincsscolorsfreshdevcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/colors-fresh.dev.css (20163 => 20164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/colors-fresh.dev.css        2012-03-08 21:22:24 UTC (rev 20163)
+++ trunk/wp-admin/css/colors-fresh.dev.css        2012-03-09 01:30:11 UTC (rev 20164)
</span><span class="lines">@@ -295,8 +295,9 @@
</span><span class="cx">         border-color: #c00 !important;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.submit {
-        border-color: #DFDFDF;
</del><ins>+.submit,
+#commentsdiv #add-new-comment {
+        border-color: #dfdfdf;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> .highlight {
</span><span class="lines">@@ -1533,11 +1534,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> div.widgets-sortables,
</span><del>-#widgets-left .inactive {
-        background-color: #fcfcfc;
-        border-color: #dfdfdf;
-}
-
</del><ins>+#widgets-left .inactive,
</ins><span class="cx"> #available-widgets .widget-holder {
</span><span class="cx">         background-color: #fcfcfc;
</span><span class="cx">         border-color: #dfdfdf;
</span><span class="lines">@@ -1664,10 +1661,7 @@
</span><span class="cx">         color: #fff;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.list-container {
-        border-color: #DFDFDF;
-}
-
</del><ins>+.list-container,
</ins><span class="cx"> .menu-item-handle {
</span><span class="cx">         border-color: #dfdfdf;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpadmincsswpadmindevcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/wp-admin.dev.css (20163 => 20164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/wp-admin.dev.css        2012-03-08 21:22:24 UTC (rev 20163)
+++ trunk/wp-admin/css/wp-admin.dev.css        2012-03-09 01:30:11 UTC (rev 20164)
</span><span class="lines">@@ -2400,7 +2400,6 @@
</span><span class="cx">         width: 80px;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#commentsdiv .fixed .column-author,
</del><span class="cx"> #comments-form .fixed .column-author {
</span><span class="cx">         width: 20%;
</span><span class="cx"> }
</span><span class="lines">@@ -2410,30 +2409,51 @@
</span><span class="cx">         padding: 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#commentsdiv.postbox .inside .row-actions {
</del><ins>+#commentsdiv .inside .row-actions {
</ins><span class="cx">         line-height:18px;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#commentsdiv.postbox .inside td {
-        padding:1em 10px;
</del><ins>+#commentsdiv .inside .column-author {
+        width: 25%;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-#commentsdiv.postbox .inside .column-author {
-        width:33%;
</del><ins>+#commentsdiv .column-comment p {
+        margin: 0.6em 0;
+        padding: 0;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-#commentsdiv.postbox .inside p {
-        margin:6px 10px 8px;
</del><ins>+#commentsdiv #replyrow td {
+        padding: 0;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-#commentsdiv.postbox .column-comment p {
-        margin:0.6em 0;
</del><ins>+#commentsdiv p {
+        padding: 8px 10px;
+        margin: 0;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-#commentsdiv.postbox #replyrow td {
-        padding:0;
</del><ins>+#commentsdiv #add-new-comment {
+        border-width: 0 0 1px;
+        border-style: none none solid;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#commentsdiv .comments-box {
+        border: 0 none;
+}
+
+#commentsdiv .comments-box thead th {
+        background: transparent;
+        padding: 0 7px 4px;
+        font-style: italic;
+}
+
+#commentsdiv .comments-box tr:last-child td {
+        border-bottom: 0 none;
+}
+
+#commentsdiv img.waiting {
+        padding-left: 5px;
+}
+
</ins><span class="cx"> .sorting-indicator {
</span><span class="cx">         display: none;
</span><span class="cx">         width: 7px;
</span><span class="lines">@@ -3112,7 +3132,7 @@
</span><span class="cx"> #normal-sortables .postbox #replyrow .submit {
</span><span class="cx">         float: none;
</span><span class="cx">         margin: 0;
</span><del>-        padding: 3px 7px;
</del><ins>+        padding: 0 7px 5px;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #side-sortables .submitbox .submit input,
</span><span class="lines">@@ -3126,24 +3146,12 @@
</span><span class="cx">         margin: 11px 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#side-sortables .comments-box,
-#normal-sortables .comments-box {
-        border: 0 none;
-}
-
</del><span class="cx"> ul.category-tabs,
</span><span class="cx"> ul.add-menu-item-tabs,
</span><span class="cx"> ul.wp-tab-bar {
</span><span class="cx">         margin-top: 12px;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#side-sortables .comments-box thead th,
-#normal-sortables .comments-box thead th {
-        background: transparent;
-        padding: 0 7px 4px;
-        font-style: italic;
-}
-
</del><span class="cx"> ul.category-tabs li.tabs,
</span><span class="cx"> ul.add-menu-item-tabs li.tabs,
</span><span class="cx"> .wp-tab-active {
</span><span class="lines">@@ -3151,10 +3159,6 @@
</span><span class="cx">         border-width: 1px 1px 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#commentsdiv img.waiting {
-        padding-left: 5px;
-}
-
</del><span class="cx"> #post-body .category-tabs li.tabs,
</span><span class="cx"> #post-body .add-menu-item-tabs li.tabs {
</span><span class="cx">         border-style: solid none solid solid;
</span></span></pre></div>
<a id="trunkwpadminincludesmetaboxesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/meta-boxes.php (20163 => 20164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/meta-boxes.php        2012-03-08 21:22:24 UTC (rev 20163)
+++ trunk/wp-admin/includes/meta-boxes.php        2012-03-09 01:30:11 UTC (rev 20164)
</span><span class="lines">@@ -471,25 +471,30 @@
</span><span class="cx"> function post_comment_meta_box($post) {
</span><span class="cx">         global $wpdb, $post_ID;
</span><span class="cx"> 
</span><ins>+        wp_nonce_field( 'get-comments', 'add_comment_nonce', false );
+        ?&gt;
+        &lt;p class=&quot;hide-if-no-js&quot; id=&quot;add-new-comment&quot;&gt;&lt;a href=&quot;#commentstatusdiv&quot; onclick=&quot;commentReply.addcomment(&lt;?php echo $post_ID; ?&gt;);return false;&quot;&gt;&lt;?php _e('Add comment'); ?&gt;&lt;/a&gt;&lt;/p&gt;
+        &lt;?php
+
</ins><span class="cx">         $total = $wpdb-&gt;get_var($wpdb-&gt;prepare(&quot;SELECT count(1) FROM $wpdb-&gt;comments WHERE comment_post_ID = '%d' AND ( comment_approved = '0' OR comment_approved = '1')&quot;, $post_ID));
</span><ins>+        $wp_list_table = _get_list_table('WP_Post_Comments_List_Table');
+        $wp_list_table-&gt;display( true );
</ins><span class="cx"> 
</span><span class="cx">         if ( 1 &gt; $total ) {
</span><del>-                echo '&lt;p&gt;' . __('No comments yet.') . '&lt;/p&gt;';
-                return;
</del><ins>+                echo '&lt;p id=&quot;no-comments&quot;&gt;' . __('No comments yet.') . '&lt;/p&gt;';
+        } else {
+                $hidden = get_hidden_meta_boxes('post');
+                if ( ! in_array('commentsdiv', $hidden) ) {
+                        ?&gt;
+                        &lt;script type=&quot;text/javascript&quot;&gt;jQuery(document).ready(function(){commentsBox.get(&lt;?php echo $total; ?&gt;, 10);});&lt;/script&gt;
+                        &lt;?php
+                }
</ins><span class="cx">         }
</span><span class="cx"> 
</span><del>-        wp_nonce_field( 'get-comments', 'add_comment_nonce', false );
</del><ins>+        ?&gt;
+        &lt;p class=&quot;hide-if-no-js hidden&quot; id=&quot;show-comments&quot;&gt;&lt;a href=&quot;#commentstatusdiv&quot; onclick=&quot;commentsBox.get(&lt;?php echo $total; ?&gt;);return false;&quot;&gt;&lt;?php _e('Show comments'); ?&gt;&lt;/a&gt; &lt;img class=&quot;waiting&quot; style=&quot;display:none;&quot; src=&quot;&lt;?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?&gt;&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
+        &lt;?php
</ins><span class="cx"> 
</span><del>-        $wp_list_table = _get_list_table('WP_Post_Comments_List_Table');
-        $wp_list_table-&gt;display( true );
-?&gt;
-&lt;p class=&quot;hide-if-no-js&quot;&gt;&lt;a href=&quot;#commentstatusdiv&quot; id=&quot;show-comments&quot; onclick=&quot;commentsBox.get(&lt;?php echo $total; ?&gt;);return false;&quot;&gt;&lt;?php _e('Show comments'); ?&gt;&lt;/a&gt; &lt;img class=&quot;waiting&quot; style=&quot;display:none;&quot; src=&quot;&lt;?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?&gt;&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
-&lt;?php
-        $hidden = get_hidden_meta_boxes('post');
-        if ( ! in_array('commentsdiv', $hidden) ) { ?&gt;
-                &lt;script type=&quot;text/javascript&quot;&gt;jQuery(document).ready(function(){commentsBox.get(&lt;?php echo $total; ?&gt;, 10);});&lt;/script&gt;
-&lt;?php
-        }
</del><span class="cx">         wp_comment_trashnotice();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpadminincludestemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/template.php (20163 => 20164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/template.php        2012-03-08 21:22:24 UTC (rev 20163)
+++ trunk/wp-admin/includes/template.php        2012-03-09 01:30:11 UTC (rev 20164)
</span><span class="lines">@@ -314,7 +314,7 @@
</span><span class="cx"> &lt;div id=&quot;com-reply&quot; style=&quot;display:none;&quot;&gt;&lt;div id=&quot;replyrow&quot; style=&quot;display:none;&quot;&gt;
</span><span class="cx"> &lt;?php endif; ?&gt;
</span><span class="cx">         &lt;div id=&quot;replyhead&quot; style=&quot;display:none;&quot;&gt;&lt;h5&gt;&lt;?php _e( 'Reply to Comment' ); ?&gt;&lt;/h5&gt;&lt;/div&gt;
</span><del>-
</del><ins>+        &lt;div id=&quot;addhead&quot; style=&quot;display:none;&quot;&gt;&lt;h5&gt;&lt;?php _e('Add new Comment'); ?&gt;&lt;/h5&gt;&lt;/div&gt;
</ins><span class="cx">         &lt;div id=&quot;edithead&quot; style=&quot;display:none;&quot;&gt;
</span><span class="cx">                 &lt;div class=&quot;inside&quot;&gt;
</span><span class="cx">                 &lt;label for=&quot;author&quot;&gt;&lt;?php _e('Name') ?&gt;&lt;/label&gt;
</span><span class="lines">@@ -343,6 +343,7 @@
</span><span class="cx">         &lt;p id=&quot;replysubmit&quot; class=&quot;submit&quot;&gt;
</span><span class="cx">         &lt;a href=&quot;#comments-form&quot; class=&quot;cancel button-secondary alignleft&quot; tabindex=&quot;106&quot;&gt;&lt;?php _e('Cancel'); ?&gt;&lt;/a&gt;
</span><span class="cx">         &lt;a href=&quot;#comments-form&quot; class=&quot;save button-primary alignright&quot; tabindex=&quot;104&quot;&gt;
</span><ins>+        &lt;span id=&quot;addbtn&quot; style=&quot;display:none;&quot;&gt;&lt;?php _e('Add Comment'); ?&gt;&lt;/span&gt;
</ins><span class="cx">         &lt;span id=&quot;savebtn&quot; style=&quot;display:none;&quot;&gt;&lt;?php _e('Update Comment'); ?&gt;&lt;/span&gt;
</span><span class="cx">         &lt;span id=&quot;replybtn&quot; style=&quot;display:none;&quot;&gt;&lt;?php _e('Submit Reply'); ?&gt;&lt;/span&gt;&lt;/a&gt;
</span><span class="cx">         &lt;img class=&quot;waiting&quot; style=&quot;display:none;&quot; src=&quot;&lt;?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?&gt;&quot; alt=&quot;&quot; /&gt;
</span></span></pre></div>
<a id="trunkwpadminjseditcommentsdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/edit-comments.dev.js (20163 => 20164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/edit-comments.dev.js        2012-03-08 21:22:24 UTC (rev 20163)
+++ trunk/wp-admin/js/edit-comments.dev.js        2012-03-09 01:30:11 UTC (rev 20164)
</span><span class="lines">@@ -345,61 +345,72 @@
</span><span class="cx">         },
</span><span class="cx"> 
</span><span class="cx">         close : function() {
</span><del>-                var c;
</del><ins>+                var c, replyrow = $('#replyrow');
</ins><span class="cx"> 
</span><del>-                if ( this.cid ) {
</del><ins>+                // replyrow is not showing?
+                if ( replyrow.parent().is('#com-reply') )
+                        return;
+
+                if ( this.cid &amp;&amp; this.act == 'edit-comment' ) {
</ins><span class="cx">                         c = $('#comment-' + this.cid);
</span><ins>+                        c.fadeIn(300, function(){ c.show() }).css('backgroundColor', '');
+                }
</ins><span class="cx"> 
</span><del>-                        if ( typeof QTags != 'undefined' )
-                                QTags.closeAllTags('replycontent');
</del><ins>+                // reset the Quicktags buttons
+                if ( typeof QTags != 'undefined' )
+                        QTags.closeAllTags('replycontent');
</ins><span class="cx"> 
</span><del>-                        if ( this.act == 'edit-comment' )
-                                c.fadeIn(300, function(){ c.show() }).css('backgroundColor', '');
</del><ins>+                $('#add-new-comment').css('display', '');
</ins><span class="cx"> 
</span><del>-                        $('#replyrow').hide();
-                        $('#com-reply').append( $('#replyrow') );
-                        $('#replycontent').val('');
-                        $('input', '#edithead').val('');
-                        $('.error', '#replysubmit').html('').hide();
-                        $('.waiting', '#replysubmit').hide();
-                        $('#replycontent').css('height', '');
</del><ins>+                replyrow.hide();
+                $('#com-reply').append( replyrow );
+                $('#replycontent').css('height', '').val('');
+                $('#edithead input').val('');
+                $('.error', replyrow).html('').hide();
+                $('.waiting', replyrow).hide();
</ins><span class="cx"> 
</span><del>-                        this.cid = '';
-                }
</del><ins>+                this.cid = '';
</ins><span class="cx">         },
</span><span class="cx"> 
</span><del>-        open : function(id, p, a) {
-                var t = this, editRow, rowData, act, c = $('#comment-' + id), h = c.height(), replyButton;
</del><ins>+        open : function(comment_id, post_id, action) {
+                var t = this, editRow, rowData, act, c = $('#comment-' + comment_id), h = c.height(), replyButton;
</ins><span class="cx"> 
</span><span class="cx">                 t.close();
</span><del>-                t.cid = id;
</del><ins>+                t.cid = comment_id;
</ins><span class="cx"> 
</span><span class="cx">                 editRow = $('#replyrow');
</span><del>-                rowData = $('#inline-'+id);
-                act = t.act = (a == 'edit') ? 'edit-comment' : 'replyto-comment';
</del><ins>+                rowData = $('#inline-'+comment_id);
+                action = action || 'replyto';
+                act = 'edit' == action ? 'edit' : 'replyto';
+                act = t.act = act + '-comment';
</ins><span class="cx"> 
</span><span class="cx">                 $('#action', editRow).val(act);
</span><del>-                $('#comment_post_ID', editRow).val(p);
-                $('#comment_ID', editRow).val(id);
</del><ins>+                $('#comment_post_ID', editRow).val(post_id);
+                $('#comment_ID', editRow).val(comment_id);
</ins><span class="cx"> 
</span><span class="cx">                 if ( h &gt; 120 )
</span><span class="cx">                         $('#replycontent', editRow).css('height', (35+h) + 'px');
</span><span class="cx"> 
</span><del>-                if ( a == 'edit' ) {
</del><ins>+                if ( action == 'edit' ) {
</ins><span class="cx">                         $('#author', editRow).val( $('div.author', rowData).text() );
</span><span class="cx">                         $('#author-email', editRow).val( $('div.author-email', rowData).text() );
</span><span class="cx">                         $('#author-url', editRow).val( $('div.author-url', rowData).text() );
</span><span class="cx">                         $('#status', editRow).val( $('div.comment_status', rowData).text() );
</span><span class="cx">                         $('#replycontent', editRow).val( $('textarea.comment', rowData).val() );
</span><span class="cx">                         $('#edithead, #savebtn', editRow).show();
</span><del>-                        $('#replyhead, #replybtn', editRow).hide();
</del><ins>+                        $('#replyhead, #replybtn, #addhead, #addbtn', editRow).hide();
</ins><span class="cx"> 
</span><span class="cx">                         c.after( editRow ).fadeOut('fast', function(){
</span><span class="cx">                                 $('#replyrow').fadeIn(300, function(){ $(this).show() });
</span><span class="cx">                         });
</span><del>-                } else {
-                        replyButton = $('#replybtn', editRow);
-                        $('#edithead, #savebtn', editRow).hide();
</del><ins>+                } else if ( action == 'add' ) {
+                        $('#addhead, #addbtn', editRow).show();
+                        $('#replyhead, #replybtn, #edithead, #editbtn', editRow).hide();
+                        $('#the-comment-list').prepend(editRow);
+                        $('#replyrow').fadeIn(300);
+                 } else {
+                         replyButton = $('#replybtn', editRow);
+                        $('#edithead, #savebtn, #addhead, #addbtn', editRow).hide();
</ins><span class="cx">                         $('#replyhead, #replybtn', editRow).show();
</span><span class="cx">                         c.after(editRow);
</span><span class="cx"> 
</span><span class="lines">@@ -442,7 +453,8 @@
</span><span class="cx">                 $('#replysubmit .waiting').show();
</span><span class="cx"> 
</span><span class="cx">                 $('#replyrow input').not(':button').each(function() {
</span><del>-                        post[ $(this).attr('name') ] = $(this).val();
</del><ins>+                        var t = $(this);
+                        post[ t.attr('name') ] = t.val();
</ins><span class="cx">                 });
</span><span class="cx"> 
</span><span class="cx">                 post.content = $('#replycontent').val();
</span><span class="lines">@@ -483,6 +495,7 @@
</span><span class="cx">                 r = r.responses[0];
</span><span class="cx">                 c = r.data;
</span><span class="cx">                 id = '#comment-' + r.id;
</span><ins>+
</ins><span class="cx">                 if ( 'edit-comment' == t.act )
</span><span class="cx">                         $(id).remove();
</span><span class="cx"> 
</span><span class="lines">@@ -527,6 +540,16 @@
</span><span class="cx">                 if ( er )
</span><span class="cx">                         $('#replysubmit .error').html(er).show();
</span><span class="cx"> 
</span><ins>+        },
+
+        addcomment: function(post_id) {
+                var t = this;
+
+                $('#add-new-comment').fadeOut(200, function(){
+                        t.open(0, post_id, 'add');
+                        $('table.comments-box').css('display', '');
+                        $('#no-comments').remove();
+                });
</ins><span class="cx">         }
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpadminjspostdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/post.dev.js (20163 => 20164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/post.dev.js        2012-03-08 21:22:24 UTC (rev 20163)
+++ trunk/wp-admin/js/post.dev.js        2012-03-09 01:30:11 UTC (rev 20164)
</span><span class="lines">@@ -211,10 +211,11 @@
</span><span class="cx">                                         if ( commentsBox.st &gt; commentsBox.total )
</span><span class="cx">                                                 $('#show-comments').hide();
</span><span class="cx">                                         else
</span><del>-                                                $('#show-comments').html(postL10n.showcomm);
</del><ins>+                                                $('#show-comments').show().children('a').html(postL10n.showcomm);
+
</ins><span class="cx">                                         return;
</span><span class="cx">                                 } else if ( 1 == r ) {
</span><del>-                                        $('#show-comments').parent().html(postL10n.endcomm);
</del><ins>+                                        $('#show-comments').html(postL10n.endcomm);
</ins><span class="cx">                                         return;
</span><span class="cx">                                 }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpincludescsseditorbuttonsdevcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/css/editor-buttons.dev.css (20163 => 20164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/css/editor-buttons.dev.css        2012-03-08 21:22:24 UTC (rev 20163)
+++ trunk/wp-includes/css/editor-buttons.dev.css        2012-03-09 01:30:11 UTC (rev 20164)
</span><span class="lines">@@ -1082,7 +1082,7 @@
</span><span class="cx">         border-top-right-radius: 3px;
</span><span class="cx">         border-top-left-radius: 3px;
</span><span class="cx">         padding: 2px 8px 0;
</span><del>-        min-height: 30px;
</del><ins>+        min-height: 29px;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> .quicktags-toolbar &gt; div {
</span></span></pre>
</div>
</div>

</body>
</html>