Make WordPress Core

Ticket #24736: 24736.26.patch

File 24736.26.patch, 4.6 KB (added by markjaquith, 11 years ago)

Bump IE RTL flipped tooltip placement by one pixel.

  • wp-admin/css/wp-admin-rtl.css

    body.folded .revisions .loading-indicator { 
    10281028        margin: 5px 0 0 5px;
    10291029}
    10301030
     1031.revisions-controls .author-card .avatar {
     1032        margin-top: 0;
     1033}
     1034
    10311035.revisions-tooltip {
    10321036        margin-left: 0;
    1033         margin-right: -70px;
     1037        margin-right: -69px;
    10341038}
    10351039
    10361040.revisions-tooltip.flipped {
    body.folded .revisions .loading-indicator { 
    10421046        margin-right: -75px;
    10431047}
    10441048
     1049.ie8 .revisions-tooltip.flipped {
     1050        margin-left: -63px;
     1051}
     1052
    10451053.revisions-tooltip-arrow {
    10461054        right: 0;
    10471055        margin-left: 0;
    body.folded .revisions .loading-indicator { 
    10641072        left: 20px;
    10651073}
    10661074
     1075.ie8 .revisions-tooltip-arrow > span {
     1076        right: 21px;
     1077}
     1078
    10671079.revisions-tooltip img {
    10681080        float: right;
    10691081        margin: 2px 0 0 5px;
  • wp-admin/css/wp-admin.css

    td.plugin-title p { 
    35393539        margin: 0 auto;
    35403540        height: 0.8em;
    35413541        top: 7px;
    3542         width: 100%;
    3543         padding: 0 15%;
     3542        width: 70%;
    35443543        -moz-box-sizing: border-box;
    35453544        -webkit-box-sizing: border-box;
    35463545        box-sizing: border-box;
    35473546}
    35483547
    35493548.revisions-tickmarks > div {
    3550         position: relative;
     3549        position: absolute;
    35513550        height: 100%;
    3552         float: left;
    35533551        border-style: solid;
    35543552        border-width: 0 1px 0 0;
    35553553        -moz-box-sizing: border-box;
    td.plugin-title p { 
    35573555        box-sizing: border-box;
    35583556}
    35593557
    3560 .revisions-tickmarks > div:last-child {
     3558.revisions-tickmarks > div:first-child {
    35613559        border-width: 0;
    35623560}
    35633561
    table.diff .diff-addedline ins { 
    37643762        position: absolute;
    37653763        bottom: 105px;
    37663764        margin-right: 0;
    3767         margin-left: -70px;
     3765        margin-left: -69px;
    37683766        z-index: 1;
    37693767        max-width: 350px;
    37703768        min-width: 130px;
    table.diff .diff-addedline ins { 
    38243822}
    38253823
    38263824.ie8 .revisions-tooltip-arrow > span {
    3827         left: 14px;
     3825        left: 15px;
    38283826        top: -25px;
    38293827        -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476)";
    38303828}
    38313829
     3830.ie8 .revisions-tooltip.flipped .revisions-tooltip-arrow > span {
     3831        right: 25px;
     3832}
     3833
    38323834.revisions-tooltip,
    38333835.revisions-tooltip-arrow > span {
    38343836        border-width: 1px;
  • wp-admin/js/revisions.js

    window.wp = window.wp || {}; 
    615615        // The tickmarks view
    616616        revisions.view.Tickmarks = wp.Backbone.View.extend({
    617617                className: 'revisions-tickmarks',
     618                direction: isRtl ? 'right' : 'left',
    618619
    619620                initialize: function() {
    620621                        this.listenTo( this.model, 'change:revision', this.reportTickPosition );
    621622                },
    622623
    623624                reportTickPosition: function( model, revision ) {
    624                         var elWidth, offset, tick, index = this.model.revisions.indexOf( revision );
     625                        var offset, thisOffset, parentOffset, tick, index = this.model.revisions.indexOf( revision );
     626                        thisOffset = this.$el.allOffsets();
     627                        parentOffset = this.$el.parent().allOffsets();
    625628                        if ( index === this.model.revisions.length - 1 ) {
    626629                                // Last one
    627                                 tick = this.$('div:nth-of-type(' + index + ')');
    628                                 offset = tick.allPositions();
    629                                 elWidth = tick.outerWidth();
    630                                 _.extend( offset, {
    631                                         rightPlusWidth: offset.right,
    632                                         leftPlusWidth: offset.left
    633                                 });
     630                                offset = {
     631                                        rightPlusWidth: thisOffset.left - parentOffset.left + 1,
     632                                        leftPlusWidth: thisOffset.right - parentOffset.right + 1
     633                                };
    634634                        } else {
    635635                                // Normal tick
    636636                                tick = this.$('div:nth-of-type(' + (index + 1) + ')');
    637637                                offset = tick.allPositions();
    638638                                _.extend( offset, {
    639                                         leftPlusWidth: offset.left + tick.outerWidth() + 1,
    640                                         rightPlusWidth: offset.right + tick.outerWidth() + 1
     639                                        left: offset.left + thisOffset.left - parentOffset.left,
     640                                        right: offset.right + thisOffset.right - parentOffset.right
     641                                });
     642                                _.extend( offset, {
     643                                        leftPlusWidth: offset.left + tick.outerWidth(),
     644                                        rightPlusWidth: offset.right + tick.outerWidth()
    641645                                });
    642646                        }
    643647                        this.model.set({ offset: offset });
    window.wp = window.wp || {}; 
    648652                        tickCount = this.model.revisions.length - 1;
    649653                        tickWidth = 1 / tickCount;
    650654
    651                         _(tickCount).times( function(){ this.$el.append( '<div></div>' ); }, this );
    652 
    653                         this.$('div').css( 'width', ( 100 * tickWidth ) + '%' );
     655                        _(tickCount).times( function( index ){
     656                                this.$el.append( '<div style="' + this.direction + ': ' + ( 100 * tickWidth * index ) + '%"></div>' ); }, this );
    654657                }
    655658        });
    656659