Changeset 24698
- Timestamp:
- 07/13/2013 02:49:53 AM (11 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/css/wp-admin-rtl.css
r24680 r24698 1022 1022 .revisions img { 1023 1023 float: right; 1024 margin-right: 0; 1025 margin-left: 5px; 1024 margin: 5px 0 0 5px; 1026 1025 } 1027 1026 1028 1027 .revisions-tooltip { 1029 margin-left: -185px; 1028 margin-right: -73px; 1029 margin-left: 0; 1030 -webkit-transition: right 15ms; 1031 -moz-transition: right 15ms; 1032 -ms-transition: right 15ms; 1033 -o-transition: right 15ms; 1034 transition: right 15ms; 1030 1035 } 1031 1036 1032 1037 .revisions-tooltip-arrow { 1033 margin-left: 150px; 1038 right: 0; 1039 margin-left: 0; 1040 margin-right: 35px; 1041 } 1042 1043 .revisions-tooltip-image { 1044 float: right; 1045 margin: 2px 0 0 5px; 1034 1046 } 1035 1047 -
trunk/wp-admin/js/revisions.js
r24689 r24698 332 332 this.listenTo( this, 'change:from', this.changeRevisionHandler ); 333 333 this.listenTo( this, 'change:to', this.changeRevisionHandler ); 334 this.listenTo( this, 'change:compareTwoMode', this.changeMode ); 334 335 this.listenTo( this, 'update:revisions', this.updatedRevisions ); 335 336 this.listenTo( this.diffs, 'ensure:load', this.updateLoadingStatus ); … … 352 353 updateLoadingStatus: function() { 353 354 this.set( 'loading', ! this.diff() ); 355 }, 356 357 changeMode: function( model, value ) { 358 // If we were on the first revision before switching, we have to bump them over one 359 if ( value && 0 === this.revisions.indexOf( this.get('to') ) ) { 360 this.set({ 361 from: this.revisions.at(0), 362 to: this.revisions.at(1) 363 }); 364 } 354 365 }, 355 366 … … 621 632 // 100 to convert to a percentage 622 633 offset = 15 + (0.7 * offset * 100 ); // Now in a percentage 623 this.$el.css( 'left', offset + '%' );634 this.$el.css( isRtl ? 'right' : 'left', offset + '%' ); 624 635 } 625 636 }); … … 836 847 from: this.model.revisions.at( isRtl ? this.model.revisions.length - ui.values[1] - 1 : ui.values[0] ) 837 848 }; 838 movedRevision = ! isRtl && ui.value === ui.values[0] ? attributes.from : attributes.to; 849 if ( isRtl ) 850 movedRevision = ui.value === ui.values[1] ? attributes.from : attributes.to; 851 else 852 movedRevision = ui.value === ui.values[0] ? attributes.from : attributes.to; 839 853 } else { 840 854 sliderPosition = this.getSliderPosition( ui );
Note: See TracChangeset
for help on using the changeset viewer.