Ticket #24736: 24736.12.patch
File 24736.12.patch, 22.2 KB (added by , 11 years ago) |
---|
-
wp-admin/css/colors-classic.css
table.diff .diff-addedline ins { 1486 1486 } 1487 1487 1488 1488 .revisions-tooltip, 1489 .revisions-tooltip-arrow :after{1489 .revisions-tooltip-arrow span { 1490 1490 border-color: #d1e5ee; 1491 1491 background-color: #fff; 1492 1492 } -
wp-admin/css/colors-fresh.css
table.diff .diff-addedline ins { 1380 1380 } 1381 1381 1382 1382 .revisions-tooltip, 1383 .revisions-tooltip-arrow :after{1383 .revisions-tooltip-arrow span { 1384 1384 border-color: #d7d7d7; 1385 1385 background-color: #fff; 1386 1386 } -
wp-admin/css/ie.css
table.ie-fixed { 630 630 * html #adminmenu div.wp-menu-image { 631 631 height: 29px; 632 632 } 633 634 /* Revisions */ 635 .revisions-tooltip-arrow span { 636 left: 25px; 637 top: -24px; 638 filter: progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476); /* IE7 */ 639 } 640 641 .revisions-controls .revisions-tickmarks > div { 642 margin-right: -1px; 643 border-width: 0 0 0 0; 644 border-style: none; 645 } 646 No newline at end of file -
wp-admin/css/wp-admin-rtl.css
th.sorted a span { 954 954 /*------------------------------------------------------------------------------ 955 955 11.2 - Post Revisions 956 956 ------------------------------------------------------------------------------*/ 957 .wp-slider .ui-slider-handle. left-handle:before,958 .wp-slider .ui-slider-handle. right-handle:before {957 .wp-slider .ui-slider-handle.from-handle:before, 958 .wp-slider .ui-slider-handle.to-handle:before { 959 959 height: 8px; 960 960 width: 7px; 961 961 } 962 962 963 .wp-slider .ui-slider-handle. left-handle:before {963 .wp-slider .ui-slider-handle.from-handle:before { 964 964 background-position: -5px -10px; 965 965 left: 6px; 966 966 } 967 967 968 .wp-slider .ui-slider-handle. right-handle:before {968 .wp-slider .ui-slider-handle.to-handle:before { 969 969 background-position: -4px -29px; 970 970 left: 6px; 971 971 } … … th.sorted a span { 1025 1025 } 1026 1026 1027 1027 .revisions-tooltip { 1028 margin-right: -73px;1029 1028 margin-left: 0; 1029 margin-right: -70px; 1030 1030 -webkit-transition: right 15ms; 1031 1031 -moz-transition: right 15ms; 1032 1032 -ms-transition: right 15ms; … … th.sorted a span { 1040 1040 margin-right: 35px; 1041 1041 } 1042 1042 1043 .revisions-tooltip-image { 1043 .revisions-tooltip-arrow > span { 1044 right: 20px; 1045 } 1046 1047 .revisions-tooltip img { 1044 1048 float: right; 1045 1049 margin: 2px 0 0 5px; 1046 1050 } 1047 1051 1052 .revisions-tickmarks > div { 1053 float: right; 1054 border-width: 0 0 0 1px; 1055 } 1056 1048 1057 /*------------------------------------------------------------------------------ 1049 1058 11.3 - Featured Images 1050 1059 ------------------------------------------------------------------------------*/ -
wp-admin/css/wp-admin.css
td.plugin-title p { 3500 3500 /*------------------------------------------------------------------------------ 3501 3501 11.2 - Post Revisions 3502 3502 ------------------------------------------------------------------------------*/ 3503 body.revision-php {3504 overflow-y: scroll; /* Force a scrollbar, so centering doesn't jump */3505 }3506 3507 3503 .revisions-control-frame, 3508 3504 .revisions-diff-frame { 3509 3505 position: relative; … … body.revision-php { 3522 3518 3523 3519 .revisions-tickmarks { 3524 3520 position: relative; 3525 margin: 0 auto 0;3521 margin: 0 auto; 3526 3522 height: 0.8em; 3527 3523 z-index: 2; 3528 3524 top: 7px; 3529 3525 width: 70%; 3530 3526 -moz-box-sizing: border-box; 3531 3527 -webkit-box-sizing: border-box; 3532 -ms-box-sizing: border-box; /* ie8 only */3533 3528 box-sizing: border-box; 3534 3529 } 3535 3530 … … body.revision-php { 3539 3534 float: left; 3540 3535 z-index: 10002; 3541 3536 border-style: solid; 3542 border-width: 0 0 0 1px;3537 border-width: 0 1px 0 0; 3543 3538 -moz-box-sizing: border-box; 3544 3539 -webkit-box-sizing: border-box; 3545 -ms-box-sizing: border-box; /* ie8 only */3546 3540 box-sizing: border-box; 3547 3541 } 3548 3542 3549 .revisions-tickmarks > div: first-of-type{3550 border- left-width: 0;3543 .revisions-tickmarks > div:last-child { 3544 border-width: 0; 3551 3545 } 3552 3546 3553 3547 .comparing-two-revisions .revisions-controls { … … body.revision-php { 3577 3571 -ms-transition: opacity 0.5s; 3578 3572 -o-transition: opacity 0.5s; 3579 3573 transition: opacity 0.5s; 3574 filter: alpha(opacity=0); /* ie8 and earlier */ 3580 3575 } 3581 3576 3582 3577 .revisions .loading-indicator span.spinner { … … body.revision-php { 3587 3582 3588 3583 .revisions.loading .loading-indicator { 3589 3584 opacity: 1; 3585 filter: alpha(opacity=100); /* ie8 and earlier */ 3590 3586 } 3591 3587 3592 3588 .revisions .diff { … … body.revision-php { 3599 3595 3600 3596 .revisions.loading .diff { 3601 3597 opacity: 0.5; 3598 filter: alpha(opacity=50); /* ie8 and earlier */ 3602 3599 } 3603 3600 3604 3601 .revisions.diff-error .diff { … … body.revision-php { 3630 3627 3631 3628 .wp-slider { 3632 3629 width: 70%; 3633 margin: 0 auto 0;3630 margin: 0 auto; 3634 3631 top: -3px; 3635 3632 } 3636 3633 … … table.diff .diff-addedline ins { 3723 3720 } 3724 3721 3725 3722 .revisions-tooltip { 3726 position: absolute; 3727 bottom: 105px; 3728 margin-left: -69px; 3723 position: fixed; 3724 margin-bottom: 22px; 3725 margin-right: 0; 3726 margin-left: -70px; 3729 3727 line-height: 28px; 3730 3728 z-index: 9999; 3731 3729 max-width: 350px; … … table.diff .diff-addedline ins { 3762 3760 z-index: 10000; 3763 3761 } 3764 3762 3765 .revisions-tooltip-arrow :after{3763 .revisions-tooltip-arrow > span { 3766 3764 content: ""; 3767 3765 position: absolute; 3768 3766 left: 20px; … … table.diff .diff-addedline ins { 3776 3774 tranform: rotate(45deg); 3777 3775 } 3778 3776 3777 .ie8 .revisions-tooltip-arrow > span { 3778 left: 14px; 3779 top: -25px; 3780 -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476)"; /* IE8 */ 3781 } 3782 3779 3783 .revisions-tooltip, 3780 .revisions-tooltip-arrow :after{3784 .revisions-tooltip-arrow > span { 3781 3785 border-width: 1px; 3782 3786 border-style: solid; 3783 3787 } … … div.revisions-controls > .wp-slider > .ui-slider-handle { 3817 3821 background: url(../images/arrows-pr.png) no-repeat -2px -47px; 3818 3822 } 3819 3823 3820 .wp-slider .ui-slider-handle. left-handle:before,3821 .wp-slider .ui-slider-handle. right-handle:before {3824 .wp-slider .ui-slider-handle.from-handle:before, 3825 .wp-slider .ui-slider-handle.to-handle:before { 3822 3826 height: 8px; 3823 3827 width: 7px; 3824 3828 } 3825 3829 3826 .wp-slider .ui-slider-handle. left-handle:before {3830 .wp-slider .ui-slider-handle.from-handle:before { 3827 3831 background-position: -5px -84px; 3828 3832 left: 7px; 3829 3833 } 3830 3834 3831 .wp-slider .ui-slider-handle. right-handle:before {3835 .wp-slider .ui-slider-handle.to-handle:before { 3832 3836 background-position: -4px -65px; 3833 3837 left: 5px; 3834 3838 } -
wp-admin/js/revisions.js
window.wp = window.wp || {}; 16 16 console.log.apply( console, arguments ); 17 17 }; 18 18 19 // Handy function to help with positioning 20 $.fn.allOffsets = function() { 21 var offset = this.offset() || {top: 0, left: 0}, win = $(window); 22 return _.extend( offset, { 23 right: win.width() - offset.left - this.outerWidth(), 24 bottom: win.height() - offset.top - this.outerHeight() 25 }); 26 }; 27 19 28 // wp_localize_script transforms top-level numbers into strings. Undo that. 20 29 if ( revisions.settings.to ) 21 30 revisions.settings.to = parseInt( revisions.settings.to, 10 ); … … window.wp = window.wp || {}; 125 134 revisions.model.Tooltip = Backbone.Model.extend({ 126 135 defaults: { 127 136 revision: null, 137 offset: {}, 128 138 hovering: false, // Whether the mouse is hovering 129 139 scrubbing: false // Whether the mouse is scrubbing 130 140 }, 131 141 132 142 initialize: function( options ) { 143 this.frame = options.frame; 133 144 this.revisions = options.revisions; 134 145 this.slider = options.slider; 135 146 136 147 this.listenTo( this.slider, 'hovered:revision', this.updateRevision ); 137 148 this.listenTo( this.slider, 'change:hovering', this.setHovering ); 138 149 this.listenTo( this.slider, 'change:scrubbing', this.setScrubbing ); 150 151 this.set({ revision: this.frame.diff() }); 139 152 }, 140 153 154 141 155 updateRevision: function( revision ) { 142 156 this.set({ revision: revision }); 143 157 }, … … window.wp = window.wp || {}; 475 489 render: function() { 476 490 wp.Backbone.View.prototype.render.apply( this, arguments ); 477 491 492 $('html').css( 'overflow-y', 'scroll' ); 478 493 $('#wpbody-content .wrap').append( this.el ); 479 494 this.updateCompareTwoMode(); 480 495 this.renderDiff( this.model.diff() ); … … window.wp = window.wp || {}; 524 539 revisions: this.model.revisions 525 540 }); 526 541 542 // Prep the tooltip model 543 var tooltip = new revisions.model.Tooltip({ 544 frame: this.model, 545 revisions: this.model.revisions, 546 slider: slider 547 }); 548 527 549 // Add the tooltip view 528 550 this.views.add( new revisions.view.Tooltip({ 529 model: new revisions.model.Tooltip({ 530 revisions: this.model.revisions, 531 slider: slider 532 }) 551 model: tooltip 533 552 }) ); 534 553 535 554 // Add the tickmarks view 536 555 this.views.add( new revisions.view.Tickmarks({ 537 model: t his.model556 model: tooltip 538 557 }) ); 539 558 540 559 // Add the slider view … … window.wp = window.wp || {}; 554 573 revisions.view.Tickmarks = wp.Backbone.View.extend({ 555 574 className: 'revisions-tickmarks', 556 575 576 initialize: function() { 577 this.listenTo( this.model, 'change:revision', this.reportTickPosition ); 578 }, 579 580 reportTickPosition: function( model, revision ) { 581 var elWidth, offset, tick, index = this.model.revisions.indexOf( revision ); 582 if ( index === this.model.revisions.length - 1 ) { 583 // Last one 584 offset = this.$el.allOffsets(); 585 elWidth = this.$el.outerWidth(); 586 // adjust 587 _.extend( offset, { 588 right: offset.right + elWidth + 1, 589 left: offset.left + elWidth + 1 590 }); 591 } else { 592 // Normal tick 593 tick = this.$('div:nth-of-type(' + (index + 1) + ')'); 594 offset = tick.allOffsets(); 595 } 596 this.model.set({ offset: offset }); 597 }, 598 557 599 ready: function() { 558 600 var tickCount, tickWidth; 559 601 tickCount = this.model.revisions.length - 1; 560 602 tickWidth = 1 / tickCount; 561 603 562 604 _(tickCount).times( function(){ this.$el.append( '<div></div>' ); }, this ); 605 563 606 this.$('div').css( 'width', ( 100 * tickWidth ) + '%' ); 564 607 } 565 608 }); … … window.wp = window.wp || {}; 625 668 revisions.view.Tooltip = wp.Backbone.View.extend({ 626 669 className: 'revisions-tooltip', 627 670 template: wp.template('revisions-tooltip'), 671 direction: isRtl ? 'right' : 'left', 628 672 629 673 initialize: function( options ) { 630 this.listenTo( this.model, 'change: revision', this.render );674 this.listenTo( this.model, 'change:offset', this.render ); 631 675 this.listenTo( this.model, 'change:hovering', this.toggleVisibility ); 632 676 this.listenTo( this.model, 'change:scrubbing', this.toggleVisibility ); 633 677 }, 634 678 679 prepare: function() { 680 return this.model.get('revision').toJSON(); 681 }, 682 683 render: function() { 684 var css = {}; 685 wp.Backbone.View.prototype.render.apply( this, arguments ); 686 css[this.direction] = this.model.get('offset')[this.direction] + 'px'; 687 css.bottom = this.model.get('offset').bottom + 'px'; 688 this.$el.css( css ); 689 }, 690 635 691 visible: function() { 636 692 return this.model.get( 'scrubbing' ) || this.model.get( 'hovering' ); 637 693 }, … … window.wp = window.wp || {}; 642 698 else 643 699 this.$el.stop().fadeTo( this.el.style.opacity * 300, 0, function(){ $(this).hide(); } ); 644 700 return; 645 },646 647 render: function() {648 var offset;649 // Check if a revision exists.650 if ( _.isNull( this.model.get('revision') ) )651 return;652 653 this.$el.html( this.template( this.model.get('revision').toJSON() ) );654 655 // Set the position.656 offset = this.model.revisions.indexOf( this.model.get('revision') ) / ( this.model.revisions.length - 1 );657 // 15% to get us to the start of the slider658 // 0.7 to convert the slider-relative percentage to a page-relative percentage659 // 100 to convert to a percentage660 offset = 15 + (0.7 * offset * 100 ); // Now in a percentage661 this.$el.css( isRtl ? 'right' : 'left', offset + '%' );662 701 } 663 702 }); 664 703 … … window.wp = window.wp || {}; 681 720 this.disabledButtonCheck(); 682 721 }, 683 722 684 // Go to a specific model index, taking into account RTL mode.723 // Go to a specific model index 685 724 gotoModel: function( toIndex ) { 686 725 var attributes = { 687 to: this.model.revisions.at( isRtl ? this.model.revisions.length - toIndex - 1 : toIndex ) // Reverse directions for RTL.726 to: this.model.revisions.at( toIndex ) 688 727 }; 689 728 // If we're at the first revision, unset 'from'. 690 if ( isRtl ? this.model.revisions.length - toIndex - 1 : toIndex ) // Reverse directions for RTL691 attributes.from = this.model.revisions.at( isRtl ? this.model.revisions.length - toIndex - 2 :toIndex - 1 );729 if ( toIndex ) 730 attributes.from = this.model.revisions.at( toIndex - 1 ); 692 731 else 693 732 this.model.unset('from', { silent: true }); 694 733 695 734 this.model.set( attributes ); 696 735 }, 697 736 698 // Go to the 'next' revision , direction takes into account RTL mode.737 // Go to the 'next' revision 699 738 nextRevision: function() { 700 var toIndex = isRtl ? this.model.revisions.length - this.model.revisions.indexOf( this.model.get('to') ) - 1 : this.model.revisions.indexOf( this.model.get('to') ); 701 toIndex = isRtl ? toIndex - 1 : toIndex + 1; 739 var toIndex = this.model.revisions.indexOf( this.model.get('to') ) + 1; 702 740 this.gotoModel( toIndex ); 703 741 }, 704 742 705 // Go to the 'previous' revision , direction takes into account RTL mode.743 // Go to the 'previous' revision 706 744 previousRevision: function() { 707 var toIndex = isRtl ? this.model.revisions.length - this.model.revisions.indexOf( this.model.get('to') ) - 1 : this.model.revisions.indexOf( this.model.get('to') ); 708 toIndex = isRtl ? toIndex + 1 : toIndex - 1; 745 var toIndex = this.model.revisions.indexOf( this.model.get('to') ) - 1; 709 746 this.gotoModel( toIndex ); 710 747 }, 711 748 … … window.wp = window.wp || {}; 729 766 // The slider view. 730 767 revisions.view.Slider = wp.Backbone.View.extend({ 731 768 className: 'wp-slider', 769 direction: isRtl ? 'right' : 'left', 732 770 733 771 events: { 734 772 'mousemove' : 'mouseMove' … … window.wp = window.wp || {}; 757 795 758 796 mouseMove: function( e ) { 759 797 var zoneCount = this.model.revisions.length - 1, // One fewer zone than models 760 slider Left = this.$el.offset().left, // Leftedge of slider798 sliderFrom = this.$el.allOffsets()[this.direction], // "From" edge of slider 761 799 sliderWidth = this.$el.width(), // Width of slider 762 800 tickWidth = sliderWidth / zoneCount, // Calculated width of zone 763 actualX = e.clientX - sliderLeft, // Offset of mouse position in slider 764 currentModelIndex = Math.floor( ( actualX + ( tickWidth / 2 ) ) / tickWidth ); // Calculate the model index 765 766 // Reverse direction in RTL mode. 767 if ( isRtl ) 768 currentModelIndex = this.model.revisions.length - currentModelIndex - 1; 801 actualX = e.pageX - sliderFrom; // Offset of mouse position in slider 802 actualX = isRtl ? sliderWidth - actualX : actualX; 803 var currentModelIndex = Math.floor( ( actualX + ( tickWidth / 2 ) ) / tickWidth ); // Calculate the model index 769 804 770 805 // Ensure sane value for currentModelIndex. 771 806 if ( currentModelIndex < 0 ) … … window.wp = window.wp || {}; 773 808 else if ( currentModelIndex >= this.model.revisions.length ) 774 809 currentModelIndex = this.model.revisions.length - 1; 775 810 776 // Update the tooltip mode l811 // Update the tooltip mode 777 812 this.model.set({ hoveredRevision: this.model.revisions.at( currentModelIndex ) }); 778 813 }, 779 814 … … window.wp = window.wp || {}; 792 827 if ( this.model.get('compareTwoMode') ) { 793 828 // in RTL mode the 'left handle' is the second in the slider, 'right' is first 794 829 handles.first() 795 .toggleClass( ' right-handle', !! isRtl )796 .toggleClass( ' left-handle', ! isRtl );830 .toggleClass( 'to-handle', !! isRtl ) 831 .toggleClass( 'from-handle', ! isRtl ); 797 832 handles.last() 798 .toggleClass( ' left-handle', !! isRtl )799 .toggleClass( ' right-handle', ! isRtl );833 .toggleClass( 'from-handle', !! isRtl ) 834 .toggleClass( 'to-handle', ! isRtl ); 800 835 } else { 801 handles.removeClass(' left-handle right-handle');836 handles.removeClass('from-handle to-handle'); 802 837 } 803 838 }, 804 839 805 getSliderPosition: function( ui ){806 return isRtl ? this.model.revisions.length - ui.value - 1 : ui.value;807 },808 809 840 start: function( event, ui ) { 810 841 this.model.set({ scrubbing: true }); 811 842 812 843 // Track the mouse position to enable smooth dragging, 813 844 // overrides default jQuery UI step behavior. 814 845 $( window ).on( 'mousemove.wp.revisions', { view: this }, function( e ) { 815 var view = e.data.view, 816 leftDragBoundary = view.$el.offset().left, // Initial left boundary 817 sliderOffset = leftDragBoundary, 818 sliderRightEdge = leftDragBoundary + view.$el.width(), 819 rightDragBoundary = sliderRightEdge, // Initial right boundary 820 leftDragReset = 0, // Initial left drag reset 821 rightDragReset = sliderRightEdge - sliderOffset; // Initial right drag reset 846 var view = e.data.view, 847 leftDragBoundary = view.$el.offset().left, 848 sliderOffset = leftDragBoundary, 849 sliderRightEdge = leftDragBoundary + view.$el.width(), 850 rightDragBoundary = sliderRightEdge, 851 leftDragReset = '0', 852 rightDragReset = '100%', 853 handle = $( ui.handle ); 822 854 823 855 // In two handle mode, ensure handles can't be dragged past each other. 824 856 // Adjust left/right boundaries and reset points. 825 857 if ( view.model.get('compareTwoMode') ) { 826 var rightHandle = $( ui.handle ).parent().find('.right-handle'), 827 leftHandle = $( ui.handle ).parent().find('.left-handle'); 828 829 if ( $( ui.handle ).hasClass('left-handle') ) { 830 // Dragging the left handle, boundary is right handle. 831 // RTL mode calculations reverse directions. 832 if ( isRtl ) { 833 leftDragBoundary = rightHandle.offset().left + rightHandle.width(); 834 leftDragReset = leftDragBoundary - sliderOffset; 835 } else { 836 rightDragBoundary = rightHandle.offset().left; 837 rightDragReset = rightDragBoundary - sliderOffset; 838 } 839 } else { 840 // Dragging the right handle, boundary is the left handle. 841 // RTL mode calculations reverse directions. 842 if ( isRtl ) { 843 rightDragBoundary = leftHandle.offset().left; 844 rightDragReset = rightDragBoundary - sliderOffset; 845 } else { 846 leftDragBoundary = leftHandle.offset().left + leftHandle.width() ; 847 leftDragReset = leftDragBoundary - sliderOffset; 848 } 858 var handles = handle.parent().find('.ui-slider-handle'); 859 if ( handle.is( handles.first() ) ) { // We're the left handle 860 rightDragBoundary = handles.last().offset().left; 861 rightDragReset = rightDragBoundary - sliderOffset; 862 } else { // We're the right handle 863 leftDragBoundary = handles.first().offset().left + handles.first().width(); 864 leftDragReset = leftDragBoundary - sliderOffset; 849 865 } 850 866 } 851 867 852 868 // Follow mouse movements, as long as handle remains inside slider. 853 if ( e. clientX < leftDragBoundary ) {854 $( ui.handle ).css( 'left', leftDragReset ); // Mouse to left of slider.855 } else if ( e. clientX > rightDragBoundary ) {856 $( ui.handle ).css( 'left', rightDragReset ); // Mouse to right of slider.869 if ( e.pageX < leftDragBoundary ) { 870 handle.css( 'left', leftDragReset ); // Mouse to left of slider. 871 } else if ( e.pageX > rightDragBoundary ) { 872 handle.css( 'left', rightDragReset ); // Mouse to right of slider. 857 873 } else { 858 $( ui.handle ).css( 'left', e.clientX - sliderOffset ); // Mouse in slider.874 handle.css( 'left', e.pageX - sliderOffset ); // Mouse in slider. 859 875 } 860 876 } ); 861 877 }, 862 878 879 getPosition: function( position ) { 880 return isRtl ? this.model.revisions.length - position - 1: position; 881 }, 882 863 883 // Responds to slide events 864 884 slide: function( event, ui ) { 865 var attributes, movedRevision , sliderPosition;885 var attributes, movedRevision; 866 886 // Compare two revisions mode 867 887 if ( this.model.get('compareTwoMode') ) { 868 888 // Prevent sliders from occupying same spot 869 889 if ( ui.values[1] === ui.values[0] ) 870 890 return false; 871 891 if ( isRtl ) 892 ui.values.reverse(); 872 893 attributes = { 873 to: this.model.revisions.at( isRtl ? this.model.revisions.length - ui.values[0] - 1 : ui.values[1]),874 from: this.model.revisions.at( isRtl ? this.model.revisions.length - ui.values[1] - 1 : ui.values[0])894 from: this.model.revisions.at( this.getPosition( ui.values[0] ) ), 895 to: this.model.revisions.at( this.getPosition( ui.values[1] ) ) 875 896 }; 876 if ( isRtl )877 movedRevision = ui.value === ui.values[1] ? attributes.from : attributes.to;878 else879 movedRevision = ui.value === ui.values[0] ? attributes.from : attributes.to;880 897 } else { 881 sliderPosition = this.getSliderPosition( ui );882 898 attributes = { 883 to: this.model.revisions.at( sliderPosition)899 to: this.model.revisions.at( this.getPosition( ui.value ) ) 884 900 }; 885 movedRevision = attributes.to;886 901 // If we're at the first revision, unset 'from'. 887 if ( sliderPosition ) // Reverse directions for RTL.888 attributes.from = this.model.revisions.at( sliderPosition - 1);902 if ( this.getPosition( ui.value ) > 0 ) 903 attributes.from = this.model.revisions.at( this.getPosition( ui.value ) - 1 ); 889 904 else 890 905 attributes.from = undefined; 891 906 } 907 movedRevision = this.model.revisions.at( this.getPosition( ui.value ) ); 892 908 893 909 // If we are scrubbing, a scrub to a revision is considered a hover 894 910 if ( this.model.get('scrubbing') ) -
wp-admin/revision.php
require_once( './admin-header.php' ); 138 138 ({{ data.dateShort }}) 139 139 <# } #> 140 140 </div> 141 <div class="revisions-tooltip-arrow">< /div>141 <div class="revisions-tooltip-arrow"><span></span></div> 142 142 </script> 143 143 144 144 <script id="tmpl-revisions-checkbox" type="text/html">