Ticket #24736: 24736.diff
File 24736.diff, 3.2 KB (added by , 11 years ago) |
---|
-
wp-admin/js/revisions.js
580 580 // The tickmarks view 581 581 revisions.view.Tickmarks = wp.Backbone.View.extend({ 582 582 className: 'revisions-tickmarks', 583 direction: isRtl ? 'right' : 'left', 583 584 584 585 initialize: function() { 585 586 this.listenTo( this.model, 'change:revision', this.reportTickPosition ); 586 587 }, 587 588 588 589 reportTickPosition: function( model, revision ) { 589 var elWidth, offset, tick, index = this.model.revisions.indexOf( revision ); 590 var offset, tick, index = this.model.revisions.indexOf( revision ), 591 divOffset = this.$el.offset(); 590 592 if ( index === this.model.revisions.length - 1 ) { 591 593 // Last one 592 tick = this.$('div:nth-of-type(' + index+ ')');594 tick = this.$('div:nth-of-type(' + ( index ) + ')'); 593 595 offset = tick.allPositions(); 594 elWidth = tick.outerWidth(); 595 // adjust596 597 // Position final tick at right edge of slider 596 598 _.extend( offset, { 597 right: offset.right + elWidth +1,598 left: offset.left + elWidth + 1599 } );599 left: this.$el.width() - 1, 600 right: this.$el.width() 601 } ); 600 602 } else { 601 603 // Normal tick 602 604 tick = this.$('div:nth-of-type(' + (index + 1) + ')'); … … 610 612 tickCount = this.model.revisions.length - 1; 611 613 tickWidth = 1 / tickCount; 612 614 613 _(tickCount).times( function(){ this.$el.append( '<div></div>' ); }, this ); 615 _(tickCount).times( function( index ) { 616 this.$el.append( '<div style="' + this.direction + ': ' + ( 100 * tickWidth * index ) + '%;"></div>' ); 617 }, this ); 614 618 615 this.$('div').css( 'width', ( 100 * tickWidth ) + '%' );616 619 } 617 620 }); 618 621 -
wp-admin/css/wp-admin-rtl.css
1026 1026 1027 1027 .revisions-tooltip { 1028 1028 margin-left: 0; 1029 margin-right: -70px;1029 margin-right: 118px; 1030 1030 -webkit-transition: right 15ms; 1031 1031 -moz-transition: right 15ms; 1032 - ms-transition: right 15ms;1032 -9ms-transition: right 15ms; 1033 1033 -o-transition: right 15ms; 1034 1034 transition: right 15ms; 1035 1035 } -
wp-admin/css/wp-admin.css
3532 3532 margin: 0 auto; 3533 3533 height: 0.8em; 3534 3534 top: 7px; 3535 width: 100%;3536 padding: 0 15%;3535 width: 70%; 3536 padding: 0; 3537 3537 -moz-box-sizing: border-box; 3538 3538 -webkit-box-sizing: border-box; 3539 3539 box-sizing: border-box; 3540 3540 } 3541 3541 3542 3542 .revisions-tickmarks > div { 3543 position: relative;3543 position: absolute; 3544 3544 height: 100%; 3545 float: left;3546 3545 border-style: solid; 3547 3546 border-width: 0 1px 0 0; 3548 3547 -moz-box-sizing: border-box; … … 3550 3549 box-sizing: border-box; 3551 3550 } 3552 3551 3553 .revisions-tickmarks > div:last-child {3554 border-width: 0;3555 }3556 3557 3552 .comparing-two-revisions .revisions-controls { 3558 3553 height: 140px; 3559 3554 } … … 3739 3734 position: absolute; 3740 3735 bottom: 105px; 3741 3736 margin-right: 0; 3742 margin-left: -70px;3737 margin-left: 118px; 3743 3738 line-height: 28px; 3744 3739 z-index: 1; 3745 max-width: 350px;3740 max-width: 250px; 3746 3741 min-width: 130px; 3747 3742 padding: 4px; 3748 3743 display: none;