Make WordPress Core

Ticket #23903: 23903.patch

File 23903.patch, 2.6 KB (added by faishal, 12 years ago)
  • css/wp-admin.css

     
    36213621        z-index: 1;
    36223622        margin-top: 20px;
    36233623}
     3624#revisions-diff div label.diff-label {
     3625        font-weight: bold;
     3626        display: block;
     3627        margin-top: 5px;
     3628        padding-left: 3px;
     3629        font-size: 14px;
     3630}
    36243631
    36253632.diff-header {
    36263633        height: 35px;
  • js/revisions.js

     
    593593                render: function() {
    594594                        var addHtml = '';
    595595                        var thediff;
    596 
     596                       
    597597                        // compare two revisions mode?
    598598                        if ( ! Diff.singleRevision ) {
    599599                                if ( this.draggingLeft ) {
     
    634634
    635635                        // hide the restore button when on the last sport/current post data
    636636                        $( '#restore-revision' ).toggle( ! Diff.revisions.at( Diff.rightDiff - 1 ).get( 'is_current_revision' ) );
    637 
     637                        if ( $( '#compare-two-revisions' ).is( ':checked' ) ) {
     638                            jQuery("#diff-title-to strong:first-child").show()
     639                        }else{
     640                            jQuery("#diff-title-to strong:first-child").html(" ")
     641                        }
    638642                        return this;
    639643                },
    640644
     
    651655                        if ( $( '#compare-two-revisions' ).is( ':checked' ) ) { // compare 2 mode
    652656                                Diff.singleRevision = false ;
    653657
    654                                 if ( 1 === Diff.rightDiff )
     658                                if ( 1 === Diff.rightDiff )
    655659                                        Diff.rightDiff = 2;
    656660
    657661                                Diff.revisionView.draggingLeft = false;
     
    661665                                Diff.revisionView.model = Diff.rightHandleRevisions;
    662666
    663667                        } else { // compare one mode
    664                                 Diff.singleRevision = true;
     668                                Diff.singleRevision = true;
    665669                                Diff.revisionView.draggingLeft = false;
    666670                                Diff.reloadModelSingle();
    667671                        }
  • includes/ajax-actions.php

     
    21522152                        // compare_to == 0 means first revision, so compare to a blank field to show whats changed
    21532153                        $diff = wp_text_diff_with_count( ( 0 == $compare_to ) ? '' : $left_content, $right_content, $args );
    21542154
    2155                         if ( isset( $diff[ 'html' ] ) )
     2155                        if ( isset( $diff[ 'html' ] ) ){
     2156                                $content.= "<label class='diff-label'>" .  __(ucfirst(str_replace("post_","",$field)) ." : ") ."</label>";
    21562157                                $content .= $diff[ 'html' ];
     2158                        }
    21572159
    21582160                        if ( isset( $diff[ 'lines_added' ] ) )
    21592161                                $lines_added = $lines_added + $diff[ 'lines_added' ];