Make WordPress Core

Ticket #15527: 15527-3.patch

File 15527-3.patch, 12.2 KB (added by azaozz, 12 years ago)
  • wp-admin/css/colors-classic.dev.css

     
    287287        border-color: #c00 !important;
    288288}
    289289
    290 .submit {
    291         border-color: #DFDFDF;
     290.submit,
     291#commentsdiv #add-new-comment {
     292        border-color: #dfdfdf;
    292293}
    293294
    294295.highlight {
  • wp-admin/css/colors-fresh.dev.css

     
    295295        border-color: #c00 !important;
    296296}
    297297
    298 .submit {
    299         border-color: #DFDFDF;
     298.submit,
     299#commentsdiv #add-new-comment {
     300        border-color: #dfdfdf;
    300301}
    301302
    302303.highlight {
     
    15331534}
    15341535
    15351536div.widgets-sortables,
    1536 #widgets-left .inactive {
    1537         background-color: #fcfcfc;
    1538         border-color: #dfdfdf;
    1539 }
    1540 
     1537#widgets-left .inactive,
    15411538#available-widgets .widget-holder {
    15421539        background-color: #fcfcfc;
    15431540        border-color: #dfdfdf;
     
    16641661        color: #fff;
    16651662}
    16661663
    1667 .list-container {
    1668         border-color: #DFDFDF;
    1669 }
    1670 
     1664.list-container,
    16711665.menu-item-handle {
    16721666        border-color: #dfdfdf;
    16731667}
  • wp-admin/css/wp-admin.dev.css

     
    24002400        width: 80px;
    24012401}
    24022402
    2403 #commentsdiv .fixed .column-author,
    24042403#comments-form .fixed .column-author {
    24052404        width: 20%;
    24062405}
     
    24102409        padding: 0;
    24112410}
    24122411
    2413 #commentsdiv.postbox .inside .row-actions {
     2412#commentsdiv .inside .row-actions {
    24142413        line-height:18px;
    24152414}
    24162415
    2417 #commentsdiv.postbox .inside td {
    2418         padding:1em 10px;
     2416#commentsdiv .inside .column-author {
     2417        width: 25%;
    24192418}
    24202419
    2421 #commentsdiv.postbox .inside .column-author {
    2422         width:33%;
     2420#commentsdiv .column-comment p {
     2421        margin: 0.6em 0;
     2422        padding: 0;
    24232423}
    24242424
    2425 #commentsdiv.postbox .inside p {
    2426         margin:6px 10px 8px;
     2425#commentsdiv #replyrow td {
     2426        padding: 0;
    24272427}
    24282428
    2429 #commentsdiv.postbox .column-comment p {
    2430         margin:0.6em 0;
     2429#commentsdiv p {
     2430        padding: 8px 10px;
     2431        margin: 0;
    24312432}
    24322433
    2433 #commentsdiv.postbox #replyrow td {
    2434         padding:0;
     2434#commentsdiv #add-new-comment {
     2435        border-width: 0 0 1px;
     2436        border-style: none none solid;
    24352437}
    24362438
     2439#commentsdiv .comments-box {
     2440        border: 0 none;
     2441}
     2442
     2443#commentsdiv .comments-box thead th {
     2444        background: transparent;
     2445        padding: 0 7px 4px;
     2446        font-style: italic;
     2447}
     2448
     2449#commentsdiv .comments-box tr:last-child td {
     2450        border-bottom: 0 none;
     2451}
     2452
     2453#commentsdiv img.waiting {
     2454        padding-left: 5px;
     2455}
     2456
    24372457.sorting-indicator {
    24382458        display: none;
    24392459        width: 7px;
     
    31123132#normal-sortables .postbox #replyrow .submit {
    31133133        float: none;
    31143134        margin: 0;
    3115         padding: 3px 7px;
     3135        padding: 0 7px 5px;
    31163136}
    31173137
    31183138#side-sortables .submitbox .submit input,
     
    31263146        margin: 11px 0;
    31273147}
    31283148
    3129 #side-sortables .comments-box,
    3130 #normal-sortables .comments-box {
    3131         border: 0 none;
    3132 }
    3133 
    31343149ul.category-tabs,
    31353150ul.add-menu-item-tabs,
    31363151ul.wp-tab-bar {
    31373152        margin-top: 12px;
    31383153}
    31393154
    3140 #side-sortables .comments-box thead th,
    3141 #normal-sortables .comments-box thead th {
    3142         background: transparent;
    3143         padding: 0 7px 4px;
    3144         font-style: italic;
    3145 }
    3146 
    31473155ul.category-tabs li.tabs,
    31483156ul.add-menu-item-tabs li.tabs,
    31493157.wp-tab-active {
     
    31513159        border-width: 1px 1px 0;
    31523160}
    31533161
    3154 #commentsdiv img.waiting {
    3155         padding-left: 5px;
    3156 }
    3157 
    31583162#post-body .category-tabs li.tabs,
    31593163#post-body .add-menu-item-tabs li.tabs {
    31603164        border-style: solid none solid solid;
  • wp-admin/includes/meta-boxes.php

     
    471471function post_comment_meta_box($post) {
    472472        global $wpdb, $post_ID;
    473473
     474        wp_nonce_field( 'get-comments', 'add_comment_nonce', false );
     475        ?>
     476        <p class="hide-if-no-js" id="add-new-comment"><a href="#commentstatusdiv" onclick="commentReply.addcomment(<?php echo $post_ID; ?>);return false;"><?php _e('Add comment'); ?></a></p>
     477        <?php
     478
    474479        $total = $wpdb->get_var($wpdb->prepare("SELECT count(1) FROM $wpdb->comments WHERE comment_post_ID = '%d' AND ( comment_approved = '0' OR comment_approved = '1')", $post_ID));
     480        $wp_list_table = _get_list_table('WP_Post_Comments_List_Table');
     481        $wp_list_table->display( true );
    475482
    476483        if ( 1 > $total ) {
    477                 echo '<p>' . __('No comments yet.') . '</p>';
    478                 return;
     484                echo '<p id="no-comments">' . __('No comments yet.') . '</p>';
     485        } else {
     486                $hidden = get_hidden_meta_boxes('post');
     487                if ( ! in_array('commentsdiv', $hidden) ) {
     488                        ?>
     489                        <script type="text/javascript">jQuery(document).ready(function(){commentsBox.get(<?php echo $total; ?>, 10);});</script>
     490                        <?php
     491                }
    479492        }
    480493
    481         wp_nonce_field( 'get-comments', 'add_comment_nonce', false );
     494        ?>
     495        <p class="hide-if-no-js hidden" id="show-comments"><a href="#commentstatusdiv" onclick="commentsBox.get(<?php echo $total; ?>);return false;"><?php _e('Show comments'); ?></a> <img class="waiting" style="display:none;" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" /></p>
     496        <?php
    482497
    483         $wp_list_table = _get_list_table('WP_Post_Comments_List_Table');
    484         $wp_list_table->display( true );
    485 ?>
    486 <p class="hide-if-no-js"><a href="#commentstatusdiv" id="show-comments" onclick="commentsBox.get(<?php echo $total; ?>);return false;"><?php _e('Show comments'); ?></a> <img class="waiting" style="display:none;" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" /></p>
    487 <?php
    488         $hidden = get_hidden_meta_boxes('post');
    489         if ( ! in_array('commentsdiv', $hidden) ) { ?>
    490                 <script type="text/javascript">jQuery(document).ready(function(){commentsBox.get(<?php echo $total; ?>, 10);});</script>
    491 <?php
    492         }
    493498        wp_comment_trashnotice();
    494499}
    495500
  • wp-admin/includes/template.php

     
    314314<div id="com-reply" style="display:none;"><div id="replyrow" style="display:none;">
    315315<?php endif; ?>
    316316        <div id="replyhead" style="display:none;"><h5><?php _e( 'Reply to Comment' ); ?></h5></div>
    317 
     317        <div id="addhead" style="display:none;"><h5><?php _e('Add new Comment'); ?></h5></div>
    318318        <div id="edithead" style="display:none;">
    319319                <div class="inside">
    320320                <label for="author"><?php _e('Name') ?></label>
     
    343343        <p id="replysubmit" class="submit">
    344344        <a href="#comments-form" class="cancel button-secondary alignleft" tabindex="106"><?php _e('Cancel'); ?></a>
    345345        <a href="#comments-form" class="save button-primary alignright" tabindex="104">
     346        <span id="addbtn" style="display:none;"><?php _e('Add Comment'); ?></span>
    346347        <span id="savebtn" style="display:none;"><?php _e('Update Comment'); ?></span>
    347348        <span id="replybtn" style="display:none;"><?php _e('Submit Reply'); ?></span></a>
    348349        <img class="waiting" style="display:none;" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
  • wp-admin/js/edit-comments.dev.js

     
    345345        },
    346346
    347347        close : function() {
    348                 var c;
     348                var c, replyrow = $('#replyrow');
    349349
    350                 if ( this.cid ) {
     350                // replyrow is not showing?
     351                if ( replyrow.parent().is('#com-reply') )
     352                        return;
     353
     354                if ( this.cid && this.act == 'edit-comment' ) {
    351355                        c = $('#comment-' + this.cid);
     356                        c.fadeIn(300, function(){ c.show() }).css('backgroundColor', '');
     357                }
    352358
    353                         if ( typeof QTags != 'undefined' )
    354                                 QTags.closeAllTags('replycontent');
     359                // reset the Quicktags buttons
     360                if ( typeof QTags != 'undefined' )
     361                        QTags.closeAllTags('replycontent');
    355362
    356                         if ( this.act == 'edit-comment' )
    357                                 c.fadeIn(300, function(){ c.show() }).css('backgroundColor', '');
     363                $('#add-new-comment').css('display', '');
    358364
    359                         $('#replyrow').hide();
    360                         $('#com-reply').append( $('#replyrow') );
    361                         $('#replycontent').val('');
    362                         $('input', '#edithead').val('');
    363                         $('.error', '#replysubmit').html('').hide();
    364                         $('.waiting', '#replysubmit').hide();
    365                         $('#replycontent').css('height', '');
     365                replyrow.hide();
     366                $('#com-reply').append( replyrow );
     367                $('#replycontent').css('height', '').val('');
     368                $('#edithead input').val('');
     369                $('.error', replyrow).html('').hide();
     370                $('.waiting', replyrow).hide();
    366371
    367                         this.cid = '';
    368                 }
     372                this.cid = '';
    369373        },
    370374
    371         open : function(id, p, a) {
    372                 var t = this, editRow, rowData, act, c = $('#comment-' + id), h = c.height(), replyButton;
     375        open : function(comment_id, post_id, action) {
     376                var t = this, editRow, rowData, act, c = $('#comment-' + comment_id), h = c.height(), replyButton;
    373377
    374378                t.close();
    375                 t.cid = id;
     379                t.cid = comment_id;
    376380
    377381                editRow = $('#replyrow');
    378                 rowData = $('#inline-'+id);
    379                 act = t.act = (a == 'edit') ? 'edit-comment' : 'replyto-comment';
     382                rowData = $('#inline-'+comment_id);
     383                action = action || 'replyto';
     384                act = 'edit' == action ? 'edit' : 'replyto';
     385                act = t.act = act + '-comment';
    380386
    381387                $('#action', editRow).val(act);
    382                 $('#comment_post_ID', editRow).val(p);
    383                 $('#comment_ID', editRow).val(id);
     388                $('#comment_post_ID', editRow).val(post_id);
     389                $('#comment_ID', editRow).val(comment_id);
    384390
    385391                if ( h > 120 )
    386392                        $('#replycontent', editRow).css('height', (35+h) + 'px');
    387393
    388                 if ( a == 'edit' ) {
     394                if ( action == 'edit' ) {
    389395                        $('#author', editRow).val( $('div.author', rowData).text() );
    390396                        $('#author-email', editRow).val( $('div.author-email', rowData).text() );
    391397                        $('#author-url', editRow).val( $('div.author-url', rowData).text() );
    392398                        $('#status', editRow).val( $('div.comment_status', rowData).text() );
    393399                        $('#replycontent', editRow).val( $('textarea.comment', rowData).val() );
    394400                        $('#edithead, #savebtn', editRow).show();
    395                         $('#replyhead, #replybtn', editRow).hide();
     401                        $('#replyhead, #replybtn, #addhead, #addbtn', editRow).hide();
    396402
    397403                        c.after( editRow ).fadeOut('fast', function(){
    398404                                $('#replyrow').fadeIn(300, function(){ $(this).show() });
    399405                        });
    400                 } else {
    401                         replyButton = $('#replybtn', editRow);
    402                         $('#edithead, #savebtn', editRow).hide();
     406                } else if ( action == 'add' ) {
     407                        $('#addhead, #addbtn', editRow).show();
     408                        $('#replyhead, #replybtn, #edithead, #editbtn', editRow).hide();
     409                        $('#the-comment-list').prepend(editRow);
     410                        $('#replyrow').fadeIn(300);
     411                } else {
     412                        replyButton = $('#replybtn', editRow);
     413                        $('#edithead, #savebtn, #addhead, #addbtn', editRow).hide();
    403414                        $('#replyhead, #replybtn', editRow).show();
    404415                        c.after(editRow);
    405416
     
    442453                $('#replysubmit .waiting').show();
    443454
    444455                $('#replyrow input').not(':button').each(function() {
    445                         post[ $(this).attr('name') ] = $(this).val();
     456                        var t = $(this);
     457                        post[ t.attr('name') ] = t.val();
    446458                });
    447459
    448460                post.content = $('#replycontent').val();
     
    483495                r = r.responses[0];
    484496                c = r.data;
    485497                id = '#comment-' + r.id;
     498
    486499                if ( 'edit-comment' == t.act )
    487500                        $(id).remove();
    488501
     
    527540                if ( er )
    528541                        $('#replysubmit .error').html(er).show();
    529542
     543        },
     544
     545        addcomment: function(post_id) {
     546                var t = this;
     547
     548                $('#add-new-comment').fadeOut(200, function(){
     549                        t.open(0, post_id, 'add');
     550                        $('table.comments-box').css('display', '');
     551                        $('#no-comments').remove();
     552                });
    530553        }
    531554};
    532555
  • wp-admin/js/post.dev.js

     
    211211                                        if ( commentsBox.st > commentsBox.total )
    212212                                                $('#show-comments').hide();
    213213                                        else
    214                                                 $('#show-comments').html(postL10n.showcomm);
     214                                                $('#show-comments').show().children('a').html(postL10n.showcomm);
     215
    215216                                        return;
    216217                                } else if ( 1 == r ) {
    217                                         $('#show-comments').parent().html(postL10n.endcomm);
     218                                        $('#show-comments').html(postL10n.endcomm);
    218219                                        return;
    219220                                }
    220221
  • wp-includes/css/editor-buttons.dev.css

     
    10821082        border-top-right-radius: 3px;
    10831083        border-top-left-radius: 3px;
    10841084        padding: 2px 8px 0;
    1085         min-height: 30px;
     1085        min-height: 29px;
    10861086}
    10871087
    10881088.quicktags-toolbar > div {